红柱买指标同花顺副图源码分享
var20:=REF(LOW,1);
var30:=SMA(ABS(LOW-var20),3,1)/SMA(MAX(LOW-var20,0),3,1)*100;var40:=EMA(IF(CLOSE*1.3,var30*10,var30/10),3);var50:=LLV(LOW,30);var60:=HHV(var40,30);var70:=IF(MA(CLOSE,58),1,0);var80:=EMA(IF(LOW<=var50,(var40+var60*2)/2,0),3)/618*var70;var90:=IF(var80>100,100,var80);庄来了别放过:STICKLINE(var90>-120,0,var90,6,1),colorred;var4:=((HHV(HIGH,9) - CLOSE)/(HHV(HIGH,9) - LLV(LOW,9)))*(100) - 70;var5:=((CLOSE - LLV(LOW,60))/(HHV(HIGH,60) - LLV(LOW,60)))*(100);var7:=SMA(((CLOSE - LLV(LOW,9))/(HHV(HIGH,9) - LLV(LOW,9)))*(100),3,1);var8:=LLV(LOW,34);varc:=EMA(((((2)*(CLOSE) + HIGH + LOW)/(4) - var8)/(HHV(HIGH,34) - var8))*(100),8);vard:=EMA(varc,5);vare:=((HHV(HIGH,9) - CLOSE)/(HHV(HIGH,9) - LLV(LOW,9)))*(100) - 70;var11:=SMA(((CLOSE - LLV(LOW,9))/(HHV(HIGH,9) - LLV(LOW,9)))*(100),3,1);var12:=SMA(var11,3,1) + 100;var13:=var12 - SMA(vare,9,1) + 100;var14:=ZIG(3,13);建仓:=IF((varc > 17) AND (varc < 59) AND (varc - vard >= 0),10,(-10));猎豹:=IF((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),10,45);丰收:=IF((varc > 70) AND (varc - vard >= 0),77,82);牛:=IF((var13 > 100),var13 - 100,0);顶:=IF((REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),95,55);风:=IF((varc - vard > 0),varc,vard);STICKLINE((REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),CLOSE,OPEN,5,0),color66ff00;STICKLINE((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),CLOSE,OPEN,5,0),coloryellow;DRAWLINE((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),LOW - (LOW)*(0.08),(REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),LOW - (LOW)*(0.05),0),linethick5,color070084;DRAWLINE((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),LOW - (LOW)*(0.08),(REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),LOW - (LOW)*(0.05),0),linethick4,color0000a3;DRAWLINE((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),LOW - (LOW)*(0.08),(REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),LOW - (LOW)*(0.05),0),linethick3,color0000b7;DRAWLINE((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),LOW - (LOW)*(0.08),(REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),LOW - (LOW)*(0.05),0),linethick2,color0000cd;DRAWLINE((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),LOW - (LOW)*(0.08),(REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),LOW - (LOW)*(0.05),0),linethick1,color077bf3;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,5,0),colorff5b00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,4.5,0),colorff6c00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,4,0),colorff7b00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,3.5,0),colorff9c00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,2,0),colorffbe00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,1,0),colorffcc00;STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,0.5,0),colorcccccc;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,5,0),color070084;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,4.5,0),color0000a3;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,4,0),color0000b7;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,3.5,0),color0000cd;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,2,0),color0000e9;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1,0),color0754e9;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1,0),color076ef3;STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,0.5,0),color077bf3;STICKLINE((CLOSE > OPEN),OPEN,LOW,0.5,0),color0726ca;STICKLINE((CLOSE > OPEN),CLOSE,HIGH,0.5,0),color0726ca;STICKLINE((OPEN > CLOSE),CLOSE,LOW,0.5,0),colorde9100;STICKLINE((OPEN > CLOSE),OPEN,HIGH,0.5,0),colorde9100;买:DRAWTEXT((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),LOW - (LOW)*(0.05),'买'),colorred;卖:DRAWTEXT((REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),LOW - (LOW)*(0.03),'卖'),color66ff00;STICKLINE((REF(var14,2) < REF(var14,1)) AND (var14 < REF(var14,1)),CLOSE,OPEN,5,0),color66ff00;STICKLINE((REF(var14,2) > REF(var14,1)) AND (var14 > REF(var14,1)),CLOSE,OPEN,5,0),coloryellow;
未来函数检测结果如下:
该公式包含未来函数:ZIG
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR20赋值:1日前的最低价
VAR30赋值:SMA(最低价-VAR20的绝对值,3,1)/SMA(最低价-VAR20和0较大值,3,1)*100
如果收盘价*1.3返回VAR30*10否则返回VAR30/10
VAR50赋值:30日内最低价最低值
VAR60赋值:30日内VAR40最高值
VAR70赋值:IF(收盘价的58日简单移动平均,1,0)
VAR80赋值:EMA(IF(最低价<=VAR50,(VAR40+VAR60*2)/2,0),3)/618*VAR70
如果VAR80>100返回100否则返回VAR80
当满足条件VAR90>-120时,在0和VAR90之间画柱状线
VAR4赋值:((9日内最高价最高值 - 收盘价)/(9日内最高价最高值 - 9日内最低价最低值))*(100) - 70
VAR5赋值:((收盘价 - 60日内最低价最低值)/(60日内最高价最高值 - 60日内最低价最低值))*(100)
VAR7赋值:SMA(((收盘价 - 9日内最低价最低值)/(9日内最高价最高值 - 9日内最低价最低值))*(100),3,1)
VAR8赋值:34日内最低价最低值
VARC赋值:EMA(((((2)*(收盘价) + 最高价 + 最低价)/(4) - VAR8)/(34日内最高价最高值 - VAR8))*(100),8)
VARD赋值:VARC的5日指数移动平均
VARE赋值:((9日内最高价最高值 - 收盘价)/(9日内最高价最高值 - 9日内最低价最低值))*(100) - 70
VAR11赋值:SMA(((收盘价 - 9日内最低价最低值)/(9日内最高价最高值 - 9日内最低价最低值))*(100),3,1)
VAR11的3日[1日权重]移动平均
VARE的9日[1日权重]移动平均
VAR14赋值:ZIG(3,13)
建仓赋值:IF((VARC > 17) AND (VARC < 59) AND (VARC - VARD >= 0),10,(-10))
猎豹赋值:IF((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),10,45)
丰收赋值:IF((VARC > 70) AND (VARC - VARD >= 0),77,82)
牛赋值:IF((VAR13 > 100),VAR13 - 100,0)
顶赋值:IF((2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),95,55)
风赋值:IF((VARC - VARD > 0),VARC,VARD)
STICKLINE((2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),收盘价,开盘价,5,0),COLOR66FF00
STICKLINE((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),收盘价,开盘价,5,0),画黄色
DRAWLINE((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),最低价 - (最低价)*(0.08),(2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),最低价 - (最低价)*(0.05),0),LINETHICK5,COLOR070084
DRAWLINE((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),最低价 - (最低价)*(0.08),(2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),最低价 - (最低价)*(0.05),0),LINETHICK4,COLOR0000A3
DRAWLINE((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),最低价 - (最低价)*(0.08),(2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),最低价 - (最低价)*(0.05),0), 线宽为3,COLOR0000B7
DRAWLINE((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),最低价 - (最低价)*(0.08),(2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),最低价 - (最低价)*(0.05),0), 线宽为2,COLOR0000CD
DRAWLINE((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),最低价 - (最低价)*(0.08),(2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),最低价 - (最低价)*(0.05),0),LINETHICK1,COLOR077BF3
STICKLINE((开盘价 >= 收盘价),收盘价,开盘价,5,0),COLORFF5B00
STICKLINE((开盘价 >= 收盘价),收盘价,开盘价,4.5,0),COLORFF6C00
STICKLINE((开盘价 >= 收盘价),收盘价,开盘价,4,0),COLORFF7B00
STICKLINE((开盘价 >= 收盘价),收盘价,开盘价,3.5,0),COLORFF9C00
STICKLINE((开盘价 >= 收盘价),收盘价,开盘价,2,0),COLORFFBE00
STICKLINE((开盘价 >= 收盘价),收盘价,开盘价,1,0),COLORFFCC00
STICKLINE((开盘价 >= 收盘价),收盘价,开盘价,0.5,0),COLORCCCCCC
STICKLINE((收盘价 >= 开盘价),收盘价,开盘价,5,0),COLOR070084
STICKLINE((收盘价 >= 开盘价),收盘价,开盘价,4.5,0),COLOR0000A3
STICKLINE((收盘价 >= 开盘价),收盘价,开盘价,4,0),COLOR0000B7
STICKLINE((收盘价 >= 开盘价),收盘价,开盘价,3.5,0),COLOR0000CD
STICKLINE((收盘价 >= 开盘价),收盘价,开盘价,2,0),COLOR0000E9
STICKLINE((收盘价 >= 开盘价),收盘价,开盘价,1,0),COLOR0754E9
STICKLINE((收盘价 >= 开盘价),收盘价,开盘价,1,0),COLOR076EF3
STICKLINE((收盘价 >= 开盘价),收盘价,开盘价,0.5,0),COLOR077BF3
STICKLINE((收盘价 > 开盘价),开盘价,最低价,0.5,0),COLOR0726CA
STICKLINE((收盘价 > 开盘价),收盘价,最高价,0.5,0),COLOR0726CA
STICKLINE((开盘价 > 收盘价),收盘价,最低价,0.5,0),COLORDE9100
STICKLINE((开盘价 > 收盘价),开盘价,最高价,0.5,0),COLORDE9100
输出买:DRAWTEXT((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),最低价 - (最低价)*(0.05),'买'),画红色
输出卖:DRAWTEXT((2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),最低价 - (最低价)*(0.03),'卖'),COLOR66FF00
STICKLINE((2日前的VAR14 < 1日前的VAR14) AND (VAR14 < 1日前的VAR14),收盘价,开盘价,5,0),COLOR66FF00
STICKLINE((2日前的VAR14 > 1日前的VAR14) AND (VAR14 > 1日前的VAR14),收盘价,开盘价,5,0),画黄色