通达信顶底判断副图 指标 源码

SHORT:=12;
LONG:=26;
MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;


右红起N:=BARSLASTCOUNT(MACD>0),NODRAW;
右红股高:=HHV(H,右红起N),NODRAW;
左红股高:=REF(右红股高,BARSLAST(CROSS(0,MACD))+1),NODRAW;
右红柱高:=HHV(MACD,右红起N),NODRAW;
左红柱高:=REF(右红柱高,BARSLAST(CROSS(0,MACD))+1),NODRAW;
HZDB:=MACD>0&&右红股高>左红股高&&右红柱高<左红柱高&&REF(BARSLASTCOUNT(MACD<0),右红起N)>=3,NODRAW;
STICKLINE(REFX(HZDB&&MACD<REF(MACD,1),1)&&MACD>REF(MACD,1),0,MACD,2,0),COLORFF00FF;
STICKLINE(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=1,0,MACD,2,0),COLORFF00FF;
STICKLINE(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=2,0,MACD,2,0),COLORFF00FF;
STICKLINE(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=3,0,MACD,2,0),COLORFF00FF;




DRAWNUMBER(REFX(HZDB&&MACD<REF(MACD,1),1)&&MACD>REF(MACD,1),MACD,0),DRAWABOVE;
DRAWNUMBER(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=1,MACD,1),DRAWABOVE;
DRAWNUMBER(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=2,MACD,2),DRAWABOVE;


DRAWTEXT(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=3&&EVERY(HZDB,3),0,'变'),COLORGREEN;
DRAWTEXT(HZDB&&MACD<REF(MACD,1)&&BARSLASTCOUNT(MACD<REF(MACD,1))=3&&EVERY(HZDB,3),MACD,'③'),DRAWABOVE,COLORGREEN;


VAR1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VAR2:=2*ABS(VAR1);
VAR3:=100-(100-3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1),15,1));
VAR4:=100-(100-3*SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,20,1),15,1));
VAR5:=(HIGH+LOW+CLOSE)/3;
VAR6:=(VAR5-MA(VAR5,10))/(0.015*AVEDEV(VAR5,10));
VAR7:=(VAR5-MA(VAR5,30))/(0.015*AVEDEV(VAR5,30));
VAR8:=IF(VAR6>=150 AND VAR6<200 AND VAR7>=150 AND VAR7<200,10,0);
VAR9:=IF(VAR6<=-150 AND VAR6>-200 AND VAR7<=-150 AND VAR7>-200,-10,VAR8);
VARA:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VARB:=100-ABS(VARA);




右绿起N:=BARSLASTCOUNT(MACD<0),NODRAW;
右绿股低:=LLV(L,右绿起N),NODRAW;
左绿股低:=REF(右绿股低,BARSLAST(CROSS(MACD,0))+1),NODRAW;
右绿柱低:=LLV(MACD,右绿起N),NODRAW;
左绿柱低:=REF(右绿柱低,BARSLAST(CROSS(MACD,0))+1),NODRAW;
LZDB:=MACD<0&&右绿股低<左绿股低&&右绿柱低>左绿柱低&&REF(BARSLASTCOUNT(MACD>0),右绿起N)>=3;


STICKLINE(REFX(LZDB&&MACD>REF(MACD,1),1)&&MACD<REF(MACD,1),0,MACD,2,0),COLORGREEN;
STICKLINE(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=1,0,MACD,2,0),COLORGREEN;
STICKLINE(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=2,0,MACD,2,0),COLORGREEN;
STICKLINE(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=3,0,MACD,2,0),COLORGREEN;


DRAWNUMBER(REFX(LZDB&&MACD>REF(MACD,1),1)&&MACD<REF(MACD,1),MACD,0);
DRAWNUMBER(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=1,MACD,1);
DRAWNUMBER(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=2,MACD,2);


DRAWTEXT(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=3&&EVERY(LZDB,3),0,'变'),COLORRED;
DRAWTEXT(LZDB&&MACD>REF(MACD,1)&&BARSLASTCOUNT(MACD>REF(MACD,1))=3&&EVERY(LZDB,3),MACD,'③'),COLORRED;






未来函数检测结果如下:
该公式包含未来函数:REFX
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图