妙在三红主图寻底部区域 源码分享
RSV:=((HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13)))*(100);LWR1:=SMA(RSV,3,1);LWR2:=SMA(LWR1,5,1);VAR3aa:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4aa:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3aa>0),91,0);DRAWTEXT(FILTER((VAR4aa>90),34),(LOW)*(0.94999998),'加仓'),Color00FFFF;DRAWTEXT(FILTER((VAR4aa>90),34),(LOW)*(0.99000001),'★'),Color00FFFF;A1aa:=9;A2aa:=(REF(CLOSE,A1aa+1)<CLOSE);DRAWTEXT(FILTER((A2aa>0),34),(HIGH)*(1.02),''),colorgreen;Var1:=REF(CLOSE,1);Var2:=MA(CLOSE,5);Var3:=SMA(MAX(CLOSE-Var1,0),6,1)/SMA(ABS(CLOSE-Var1),6,1)*100;Var4:=SMA(MAX(CLOSE-Var1,0),12,1)/SMA(ABS(CLOSE-Var1),12,1)*100;Var5:=SMA(MAX(CLOSE-Var1,0),24,1)/SMA(ABS(CLOSE-Var1),24,1)*100;Var6:=IF(CROSS(Var3,Var5),LOW,REF(LOW,BARSLAST(CROSS(Var3,Var5))));Var7:=IF(CROSS(Var5,Var3),HIGH,REF(HIGH,BARSLAST(CROSS(Var5,Var3))));Var8:=IF(CLOSE>=MA(CLOSE,20),80,50);Var9:=IF(CLOSE>=MA(CLOSE,20),50,20);VarA:=IF(Var3<Var8 AND REF(Var3,1)>=Var8,HHV(REF(HIGH,1),BARSLAST(Var3>=Var8 AND REF(Var3,1)<Var8)-1),REF(HHV(REF(HIGH,1),BARSLAST(Var3>=Var8 AND REF(Var3,1)<Var8)-1),BARSLAST(Var3<Var8 AND REF(Var3,1))));VarB:=IF(HIGH>VarA,LOW,REF(LOW,BARSLAST(HIGH>VarA)));VarC:=IF(HIGH>VarA,Var3,REF(Var3,BARSLAST(HIGH>VarA)));VarD:=IF(HIGH>VarB AND Var3<VarC AND Var3<Var5,HIGH,REF(HIGH,BARSLAST(HIGH>VarB AND Var3<VarC AND Var3<Var5)));VarE:=IF(Var3>Var9 AND REF(Var3,1)<=Var9,LLV(REF(LOW,1),BARSLAST(Var3<=Var9 AND REF(Var3,1)>Var9)-1),REF(LLV(REF(LOW,1),BARSLAST(Var3<=Var9 AND REF(Var3,1)>Var9)-1),BARSLAST(Var3>Var9 AND REF(Var3,1))));VarF:=IF(LOW<VarE,HIGH,REF(HIGH,BARSLAST(LOW<VarE)));Var10:=IF(LOW<VarE,Var3,REF(Var3,BARSLAST(LOW<VarE)));Var11:=IF(LOW<VarF AND Var3>Var10 AND Var3>Var5,LOW,REF(LOW,BARSLAST(LOW<VarF AND Var3>Var10 AND Var3>Var5)));压力线: Var11,COLORFF00FF ,LINETHICK2 ;支撑线: VarD,,colorffffff,LINETHICK2 ;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
RSV赋值:((13日内最高价最高值-收盘价)/(13日内最高价最高值-13日内最低价最低值))*(100)
RSV的3日[1日权重]移动平均
LWR1的5日[1日权重]移动平均
VAR3AA赋值:IF((收盘价>1日前的收盘价),88,0)
VAR4AA赋值:IF(((收盘价)/(1日前的收盘价)>1.05) AND ((最高价)/(收盘价)<1.01) AND (VAR3AA>0),91,0)
DRAWTEXT(FILTER((VAR4AA>90),34),(最低价)*(0.94999998),'加仓'),COLOR00FFFF
DRAWTEXT(FILTER((VAR4AA>90),34),(最低价)*(0.99000001),'★'),COLOR00FFFF
A1AA赋值:9
A2AA赋值:(A1AA+1日前的收盘价<收盘价)
DRAWTEXT(FILTER((A2AA>0),34),(最高价)*(1.02),''),画绿色
VAR1赋值:1日前的收盘价
VAR2赋值:收盘价的5日简单移动平均
VAR3赋值:SMA(收盘价-VAR1和0较大值,6,1)/SMA(收盘价-VAR1的绝对值,6,1)*100
VAR4赋值:SMA(收盘价-VAR1和0较大值,12,1)/SMA(收盘价-VAR1的绝对值,12,1)*100
VAR5赋值:SMA(收盘价-VAR1和0较大值,24,1)/SMA(收盘价-VAR1的绝对值,24,1)*100
VAR6赋值:IF(VAR3上穿VAR5,最低价,REF(最低价,上次VAR3上穿VAR5距今天数))
VAR7赋值:IF(VAR5上穿VAR3,最高价,REF(最高价,上次VAR5上穿VAR3距今天数))
VAR8赋值:IF(收盘价>=收盘价的20日简单移动平均,80,50)
VAR9赋值:IF(收盘价>=收盘价的20日简单移动平均,50,20)
VARA赋值:IF(VAR3=VAR8,HHV(1日前的最高价,上次VAR3>=VAR8 AND 1日前的VAR3=VAR8 AND 1日前的VAR3VARB赋值:IF(最高价>VARA,最低价,REF(最低价,上次最高价>VARA距今天数))
VARC赋值:IF(最高价>VARA,VAR3,REF(VAR3,上次最高价>VARA距今天数))
VARD赋值:IF(最高价>VARB AND VAR3VARB AND VAR3VARE赋值:IF(VAR3>VAR9 AND 1日前的VAR3<=VAR9,LLV(1日前的最低价,上次VAR3<=VAR9 AND 1日前的VAR3>VAR9距今天数-1),REF(LLV(1日前的最低价,上次VAR3<=VAR9 AND 1日前的VAR3>VAR9距今天数-1),BARSLAST(VAR3>VAR9 AND 1日前的VAR3)))
VARF赋值:IF(最低价VAR10:=IF(最低价VAR11:=IF(最低价VAR10 AND VAR3>VAR5,最低价,REF(最低价,上次最低价VAR10 AND VAR3>VAR5距今天数))
输出压力线: VAR11,COLORFF00FF , 线宽为2
输出支撑线: VARD,,COLORFFFFFF, 线宽为2