黄金短战均线主图指标源码[大智慧公式]
[code]P1:=3;P2:=8;P3:=13;P4:=34;P5:=120;P6:=250;
MA1:MA(CLOSE,P1),COloryellow;
MA2:MA(CLOSE,P2),COlorFF00FF;
MA3:MA(CLOSE,P3),COlor00FF00;
MA4:MA(CLOSE,P4),COlorFFFFFF;
MA5:MA(CLOSE,P5),COlorFFFF00;
MA6:MA(CLOSE,P6),COlorred;
VAR2:=EMA((SLOPE(EMA(CLOSE,20),10))*(34) + CLOSE,30);
VAR3:=EMA(VAR2,3);
VAR4:=EMA(VAR3,3);
A1:=COST(95);
A2:=COST(5);
LY:=((A1 - A2)*(100))/(A1 + A2);
DRAWICON((LY > REF(LY,1)),(LOW)*(0.98),8),COlor008000;
DRAWTEXT((VAR4 > 90),(LOW)*(0.95),'★加仓'),COloryellow;
DRAWTEXT((VAR4 > 90),(LOW)*(0.99),'★'),COloryellow;
VAR1:=(HIGH + LOW + OPEN + (2)*(CLOSE))/(5);
HY3:=IF((COUNT((VAR3 < 20),5) >= 1) and (COUNT((VAR1 = LLV(VAR1,10)),10) >= 1) and (CLOSE >= (OPEN)*(1.038)) and (VOL > (MA(VOL,5))*(1.2)),1,0);
DRAWTEXT(HY3,LOW,'▲买入'),COloryellow;
VARR1:=((SMA(MAX(CLOSE - REF(CLOSE,1),0),6,1))/(SMA(ABS(CLOSE - REF(CLOSE,1)),6,1)))*(100);
DRAWICON(CROSS(82,VARR1),HIGH,2),COloryellow;
DRAWTEXT(CROSS(82,VARR1),HIGH,'▲风险↓'),COloryellow;
EL1:=EMA(LOW,6);
EL2:=EMA((EMA(LOW,34))*(1),2) - 0.16;
DRAWICON(CROSS(EL1,EL2),EL1,10),COlor00FF00;
V1:=REF(CLOSE,1);
V2:=((SMA(MAX(CLOSE - V1,0),6,1))/(SMA(ABS(CLOSE - V1),6,1)))*(100);
DRAWICON(IF(CROSS(81,V2),1,0),(HIGH)*(1.01),11),COlorFFFFFF;
VAR41:=EMA(((100)*(CLOSE - LLV(LOW,34)))/(HHV(HIGH,34) - LLV(LOW,34)),3);
VAR42:=EMA(((100)*(INDEXC - LLV(INDEXL,34)))/(HHV(INDEXH,34) - LLV(INDEXL,34)),3);
VAR4A:=(REF(VAR41,1) > 92) and (VAR41 < 92);
DRAWTEXT(VAR4A,HIGH + 0.12,'短卖'),COlor00FF00;
[/code]
[attach]5814[/attach]
页:
[1]