智能仓位通达信公式 主图 源码附图

VAR1:=IF(YEAR>2999 AND MONTH>5,0,1);
 
VAR2:=IF(HIGH=CLOSE,1.10*CLOSE,HIGH)*VAR1;
 
VAR3:=IF(HIGH=CLOSE,0.90*CLOSE,LOW)*VAR1;
 
短期值1:=EMA((HIGH+LOW)/2,5);
 
顶部线1:=EMA(EMA(VAR2,6)*1.05,8);
 
底部线1:=EMA(EMA(VAR3,6)*0.97,8);
 
VARA1:=EXPMA(CLOSE,5);
 
VARB1:=EXPMA(CLOSE,10);
 
VARC1:=EXPMA(CLOSE,20);
 
VARD1:=EXPMA(CLOSE,50);
 
VARE1:=(VARA1+VARB1+VARC1+VARD1)/4;
 
天线1:MA(VARE1,4);
 
天线2:=MA(VARE1,5)+MA(VARE1,5)*0.03;
 
天线3:MA(VARE1,4)-MA(VARE1,4)*0.03;
 
NOTEXT天线01:IF(天线1>REF(天线1,1),天线1,DRAWNULL),COLORRED;
 
NOTEXT天线11:IF(天线1<REF(天线1,1),天线1,DRAWNULL),COLORGREEN;
 
NOTEXT天线03:IF(天线3>REF(天线3,1),天线3,DRAWNULL),COLORRED;
 
NOTEXT天线13:IF(天线3<REF(天线3,1),天线3,DRAWNULL),COLORGREEN;
 
STICKLINE(天线1>REF(天线1,1),天线1,天线3,0,0),COLORRED;
 
STICKLINE(天线1<REF(天线1,1),天线1,天线3,0,0),COLORGREEN;
 
空:=REF(C,1)>REF(天线3,1) AND C<天线3;
 
多:=REF(C,1)<REF(天线1,1) AND C>天线1;
 
空1:=TFILTER(多,空,2);
 
多1:=TFILTER(多,空,1);
 
VAR11:=IF(YEAR>2999 AND MONTH>5,0,1);
 
VAR12:=IF(HIGH=CLOSE,1.10*CLOSE,HIGH)*VAR11;
 
VAR13:=IF(HIGH=CLOSE,0.90*CLOSE,LOW)*VAR11;
 
长期值2:=EMA((HIGH+LOW)/2,5);
 
顶部线2:=EMA(EMA(VAR12,6)*1.05,8);
 
底部线2:=EMA(EMA(VAR13,6)*0.97,8);
 
VAR18:=(HIGH+LOW+CLOSE)/3;
 
VARA2:=EMA(CLOSE,5);
 
VARB2:=EMA(CLOSE,10);
 
VARC2:=EMA(CLOSE,20);
 
VARD2:=EMA(CLOSE,50);
 
VARE2:=(VARA2+VARB2+VARC2+VARD2)/4;
 
天线12:=EMA(VARE2,60);
 
天线22:=EMA(VARE2,60)+EMA(VARE2,60)*0.03;
 
天线32:=EMA(VARE2,55)-EMA(VARE2,55)*0.03;
 
NOTEXT天线012:IF(天线12>REF(天线12,1),天线12,DRAWNULL),COLORMAGENTA;
 
NOTEXT天线112:IF(天线12<REF(天线12,1),天线12,DRAWNULL),COLORBLUE;
 
NOTEXT天线032:IF(天线32>REF(天线32,1),天线32,DRAWNULL),COLORMAGENTA;
 
NOTEXT天线132:IF(天线32<REF(天线32,1),天线32,DRAWNULL),COLORBLUE;
 
STICKLINE(天线12>REF(天线12,1),天线12,天线32,0,0),COLORMAGENTA;
 
STICKLINE(天线12<REF(天线12,1),天线12,天线32,0,0),COLORBLUE;
 
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
A1:=C>REF(C,4);
NT:=BARSLASTCOUNT(A1);
TJ11:=NT=9;
TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);
AY:=(BACKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;
DRAWTEXT(AY>0,H*1.02,VAR2STR(AY,0)),COLORFF00FF;
DRAWTEXT(NT=9,H*1.02,'9'),COLORGREEN;
B1:=C<REF(C,4);
NT0:=BARSLASTCOUNT(B1);
TJ21:=NT0=9 ;
TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);
AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;
DRAWTEXT(AY1>0,L*0.98,VAR2STR(AY1,0)),COLORFF00FF;
DRAWTEXT(NT0=9,L*0.98,'9'),COLORGREEN;
 
AR3:=LLV(HIGH,240);
AR4:=100*(CLOSE-AR3)/AR3;
AR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
AR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
AR7:=0;
AR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
AR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
AR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
AR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
AR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
AR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
AR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
AR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
AR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
AR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
AR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
AR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=AR10;
买2:=(AR11+AR13+AR15+AR17);
卖1:=(AR12+AR14+AR16+AR18);
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'买'),COLORRED;
DRAWTEXT(卖1>0,HIGH*1,'止盈'),COLORGREEN;
 
 



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

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

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