通达信底部探测主图 主图指标公式源码
B1:=MA(C,1);
B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1);
SMA2:=MA(B2,3);
三抢买入:IF(LLV(MA(B2,8),3)< B2,LLV(MA(B2,8),3),B2);
IF(B2>SMA2,B2,DRAWNULL),COLORRED,LINETHICK4;
IF(B2< SMA2,B2,DRAWNULL),COLORGREEN,LINETHICK4;
三抢卖出:HHV(MA(B2,1),13),COLORYELLOW;
VAR1:=(2*CLOSE+HIGH+LOW)/4;
VAR2:=MA(VAR1,7);
VAR3:=VAR2-MA(VAR1,7/2)< 0;
VAR4:=VAR2-MA(VAR1,7/2)>0;
VAR5:=BARSLAST(VAR3);
VAR6:=0-BARSLAST(VAR4);
VAR7:=IF(VAR3<=0,VAR5,VAR6);
STICKLINE(三抢卖出>B2 AND B2>SMA2,三抢卖出,B2,0,1),COLORLIBLUE;
STICKLINE(三抢卖出>SMA2 AND B2< SMA2,三抢卖出,SMA2,0,1),COLORBLUE;
VAR11:=(CLOSE*2+HIGH+LOW)/4;
VAR21:=EMA(VAR11,13)-EMA(VAR11,34);
VAR31:=EMA(VAR21,5);
STICKLINE((C>=O),OPEN,LOW,0,0),COLOR0726CA;
STICKLINE((C>=O),CLOSE,HIGH,0,0),COLOR0726CA;
STICKLINE((C< O),CLOSE,LOW,0,0),COLORDE9100;
STICKLINE((C< O),OPEN,HIGH,0,0),COLORDE9100;
STICKLINE((C< O),CLOSE,OPEN,4,0),COLORFF5B00;
STICKLINE((C< O),CLOSE,OPEN,3.4,0),COLORFF6C00;
STICKLINE((C< O),CLOSE,OPEN,2.8,0),COLORFF7B00;
STICKLINE((C< O),CLOSE,OPEN,2.2,0),COLORFF9C00;
STICKLINE((C< O),CLOSE,OPEN,1.6,0),COLORFFBE00;
STICKLINE((C< O),CLOSE,OPEN,1,0),COLORFFCC00;
STICKLINE((C< O),CLOSE,OPEN,0.3,0),COLORFFFF00;
STICKLINE((C>O),CLOSE,OPEN,4,0),COLOR070084;
STICKLINE((C>O),CLOSE,OPEN,3.4,0),COLOR0000A3;
STICKLINE((C>O),CLOSE,OPEN,2.8,0),COLOR0000B7;
STICKLINE((C>O),CLOSE,OPEN,2.2,0),COLOR0000CD;
STICKLINE((C>O),CLOSE,OPEN,1.6,0),COLOR0000E9;
STICKLINE((C>O),CLOSE,OPEN,1,0),COLOR0754E9;
STICKLINE((C>O),CLOSE,OPEN,0.5,0),COLOR076EF3;
STICKLINE((C>O),CLOSE,OPEN,0.2,0),COLOR077BF3;
VAR2A:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));
VAR3A:=((REF(VAR2A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR4A:=((REF(VAR3A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR5A:=((REF(VAR4A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR6A:=((REF(VAR5A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR7A:=((REF(VAR6A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR8A:=((REF(VAR7A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR9A:=((REF(VAR8A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VARAA:=((REF(VAR9A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VARBA:=((REF(VARAA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VARCA:=((REF(VARBA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VARDA:=((REF(VARCA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAREAA:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));
VARFA:=((REF(VAREAA,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR10A:=((REF(VARFA,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR11A:=((REF(VAR10A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR12A:=((REF(VAR11A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR13A:=((REF(VAR12A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR14A:=((REF(VAR13A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR15A:=((REF(VAR14A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR16A:=((REF(VAR15A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR17A:=((REF(VAR16A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR18A:=((REF(VAR17A,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >= REF(CLOSE,2)));
VAR19A:=((REF(VAR18A,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <= REF(CLOSE,2)));
VAR1A:=(REF((((((((((((VAREAA OR VARFA) OR VAR10A) OR VAR11A) OR VAR12A) OR VAR13A) OR VAR14A) OR VAR15A) OR VAR16A) OR VAR17A) OR VAR18A) OR VAR19A),1) ANDVAR2A);
STICKLINE(VAR1A,O,O+(C-O)/3,4,0),COLOR1029FF;
STICKLINE(VAR1A,O,O+(C-O)/3,3.4,0),COLOR1040FF;
STICKLINE(VAR1A,O,O+(C-O)/3,2.8,0),COLOR1083FF;
STICKLINE(VAR1A,O,O+(C-O)/3,2.2,0),COLOR10ABFF;
STICKLINE(VAR1A,O,O+(C-O)/3,1.6,0),COLOR10D0FF;
STICKLINE(VAR1A,O,O+(C-O)/3,1,0),COLOR10FFFF;
STICKLINE(VAR1A,O,O+(C-O)/3,0.3,0),COLOR00FFFF;
AA:=(REF((((((((((((VAR2A OR VAR3A) OR VAR4A) OR VAR5A) OR VAR6A) OR VAR7A) OR VAR8A) OR VAR9A)OR VARAA) OR VARBA) OR VARCA) OR VARDA),1) AND VAREAA);{分析
STICKLINE(AA,O,O+(C-O)/3,4.3,0),COLOR009900;
STICKLINE(AA,O,O+(C-O)/3,3.2,0),COLOR00AA00;
STICKLINE(AA,O,O+(C-O)/3,2.4,0),COLOR00BB00;
STICKLINE(AA,O,O+(C-O)/3,1.7,0),COLOR00CC00;
STICKLINE(AA,O,O+(C-O)/3,1.1,0),COLOR00DD00;
STICKLINE(AA,O,O+(C-O)/3,0.5,0),COLOR00EE00;
STICKLINE(AA,O,O+(C-O)/3,0.2,0),COLOR00FF00;
A13:=EMA(CLOSE,55);
A14:=MA(CLOSE,75);
A15:=EMA(A14,3);
A16:=EMA(A15,3);
A17:=(HIGH + LOW) / 5;
A18:=(MA(A17,4)) - (MA(A17,34));
A19:=CROSS(A18,0);
A20:=CROSS(0,A18);
A21:=BARSLAST(A19);
A22:=BARSLAST(A20);
A23:=REF(A19,1);
A24:=REF(A20,1);
A25:=BARSLAST(A23);
A26:=BARSLAST(A24);
A27:=IF((A25 < A26),(REF((HHV(HIGH,2)),A25)),(REF((LLV(LOW,2)),A26)));
A28:=(((REF(CLOSE,1)) <= (REF(A27,1))) AND (CLOSE > A27)) AND (A21 < A22);
A29:=(((REF(CLOSE,1)) >= (REF(A27,1))) AND (CLOSE < A27)) AND (A22 < A21);
A30:=A28 AND ((COUNT(A28,A21)) = 1);
A31:=A29 AND ((COUNT(A29,A22)) = 1);
A32:=A30 AND ((REF(BARSLAST(A31),1)) < (REF(BARSLAST(A30),1)));
A33:=A31 AND ((REF(BARSLAST(A31),1)) > (REF(BARSLAST(A30),1)));
DRAWTEXT(A32,SMA2*0.99,'←锁喉'),COLORYELLOW;
AC:=AMOUNT/(VOL);
YY:=MA(AC,13);
LLL:=(C-YY)/YY*100;
MIDC := MA(CLOSE,22);
UPPERC:= MIDC + 2*STD(C,22);
LOWERC:= MIDC - 2*STD(C,22);
BBA:=(C-LOWERC)/(UPPERC-LOWERC);
LIFENGCYC:=(REF(LLL,1)< -15 AND REF(BBA,1)< 0 AND LLL>REF(LLL,1));
STICKLINE(LIFENGCYC,LOW*0.93,LOW*0.95,6,0)COLORRED;
STICKLINE(LIFENGCYC>0,C,O,4,0),COLORRED;
STICKLINE(LIFENGCYC>0,C,O,3.4,0),COLOR1029FF;
STICKLINE(LIFENGCYC>0,C,O,2.8,0),COLOR1040FF;
STICKLINE(LIFENGCYC>0,C,O,2.2,0),COLOR1083FF;
STICKLINE(LIFENGCYC>0,C,O,1.6,0),COLOR10ABFF;
STICKLINE(LIFENGCYC>0,C,O,1,0),COLOR10D0FF;
STICKLINE(LIFENGCYC>0,C,O,0.3,0),COLOR10FFFF;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
B1赋值:C的1日简单移动平均
B1的2日[1日权重]移动平均
SMA2赋值:B2的3日简单移动平均
输出三抢买入:IF(LLV(B2的8日简单移动平均,3)< B2,LLV(B2的8日简单移动平均,3),B2)
2的B2日[DRAWNULL日权重]移动平均
2的B2日[DRAWNULL日权重]移动平均
输出三抢卖出:HHV(B2的1日简单移动平均,13),画黄色
VAR1赋值:(2*收盘价+最高价+最低价)/4
VAR2赋值:VAR1的7日简单移动平均
VAR3赋值:VAR2-VAR1的7/2日简单移动平均< 0
VAR4赋值:VAR2-VAR1的7/2日简单移动平均>0
VAR5赋值:上次VAR3距今天数
VAR6赋值:0-上次VAR4距今天数
如果VAR3<=0返回VAR5否则返回VAR6
当满足条件三抢卖出>B2 AND B2>SMA2时,在三抢卖出和B2之间画柱状线
当满足条件三抢卖出>SMA2 AND B2< SMA2时,在三抢卖出和SMA2之间画柱状线
VAR11:=(收盘价*2+最高价+最低价)/4
VAR21:=VAR11的13日指数移动平均-VAR11的34日指数移动平均
VAR31:=VAR21的5日指数移动平均
STICKLINE((C>=O),开盘价,最低价,0,0),COLOR0726CA
STICKLINE((C>=O),收盘价,最高价,0,0),COLOR0726CA
STICKLINE((C< O),收盘价,最低价,0,0),COLORDE9100
STICKLINE((C< O),开盘价,最高价,0,0),COLORDE9100
STICKLINE((C< O),收盘价,开盘价,4,0),COLORFF5B00
STICKLINE((C< O),收盘价,开盘价,3.4,0),COLORFF6C00
STICKLINE((C< O),收盘价,开盘价,2.8,0),COLORFF7B00
STICKLINE((C< O),收盘价,开盘价,2.2,0),COLORFF9C00
STICKLINE((C< O),收盘价,开盘价,1.6,0),COLORFFBE00
STICKLINE((C< O),收盘价,开盘价,1,0),COLORFFCC00
STICKLINE((C< O),收盘价,开盘价,0.3,0),COLORFFFF00
STICKLINE((C>O),收盘价,开盘价,4,0),COLOR070084
STICKLINE((C>O),收盘价,开盘价,3.4,0),COLOR0000A3
STICKLINE((C>O),收盘价,开盘价,2.8,0),COLOR0000B7
STICKLINE((C>O),收盘价,开盘价,2.2,0),COLOR0000CD
STICKLINE((C>O),收盘价,开盘价,1.6,0),COLOR0000E9
STICKLINE((C>O),收盘价,开盘价,1,0),COLOR0754E9
STICKLINE((C>O),收盘价,开盘价,0.5,0),COLOR076EF3
STICKLINE((C>O),收盘价,开盘价,0.2,0),COLOR077BF3
VAR2A:=((收盘价 > 1日前的收盘价) AND (收盘价 > 2日前的收盘价))
VAR3A:=((1日前的VAR2A AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAR4A:=((1日前的VAR3A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR5A:=((1日前的VAR4A AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAR6A:=((1日前的VAR5A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR7A:=((1日前的VAR6A AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAR8A赋值:((1日前的VAR7A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR9A赋值:((1日前的VAR8A AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VARAA赋值:((1日前的VAR9A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VARBA赋值:((1日前的VARAA AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VARCA赋值:((1日前的VARBA AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VARDA赋值:((1日前的VARCA AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAREAA赋值:((收盘价 < 1日前的收盘价) AND (收盘价 < 2日前的收盘价))
VARFA赋值:((1日前的VAREAA AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR10A:=((1日前的VARFA AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAR11A:=((1日前的VAR10A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR12A:=((1日前的VAR11A AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAR13A:=((1日前的VAR12A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR14A:=((1日前的VAR13A AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAR15A:=((1日前的VAR14A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR16A:=((1日前的VAR15A AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAR17A:=((1日前的VAR16A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR18A:=((1日前的VAR17A AND (收盘价 <= 1日前的收盘价)) AND (收盘价 >= 2日前的收盘价))
VAR19A:=((1日前的VAR18A AND (收盘价 >= 1日前的收盘价)) AND (收盘价 <= 2日前的收盘价))
VAR1A:=(REF((((((((((((VAREAA OR VARFA) OR VAR10A) OR VAR11A) OR VAR12A) OR VAR13A) OR VAR14A) OR VAR15A) OR VAR16A) OR VAR17A) OR VAR18A) OR VAR19A),1) ANDVAR2A)
STICKLINE(VAR1A,O,O+(C-O)/3,4,0),COLOR1029FF
STICKLINE(VAR1A,O,O+(C-O)/3,3.4,0),COLOR1040FF
STICKLINE(VAR1A,O,O+(C-O)/3,2.8,0),COLOR1083FF
STICKLINE(VAR1A,O,O+(C-O)/3,2.2,0),COLOR10ABFF
STICKLINE(VAR1A,O,O+(C-O)/3,1.6,0),COLOR10D0FF
STICKLINE(VAR1A,O,O+(C-O)/3,1,0),COLOR10FFFF
STICKLINE(VAR1A,O,O+(C-O)/3,0.3,0),COLOR00FFFF
AA赋值:(REF((((((((((((VAR2A OR VAR3A) OR VAR4A) OR VAR5A) OR VAR6A) OR VAR7A) OR VAR8A) OR VAR9A)OR VARAA) OR VARBA) OR VARCA) OR VARDA),1) AND VAREAA)
{分析STICKLINE(AA,O,O+(C-O)/3,4.3,0),COLOR009900
STICKLINE(AA,O,O+(C-O)/3,3.2,0),COLOR00AA00
STICKLINE(AA,O,O+(C-O)/3,2.4,0),COLOR00BB00
STICKLINE(AA,O,O+(C-O)/3,1.7,0),COLOR00CC00
STICKLINE(AA,O,O+(C-O)/3,1.1,0),COLOR00DD00
STICKLINE(AA,O,O+(C-O)/3,0.5,0),COLOR00EE00
STICKLINE(AA,O,O+(C-O)/3,0.2,0),COLOR00FF00
A13赋值:收盘价的55日指数移动平均
A14赋值:收盘价的75日简单移动平均
A15赋值:A14的3日指数移动平均
A16赋值:A15的3日指数移动平均
A17赋值:(最高价 + 最低价) / 5
A18赋值:(A17的4日简单移动平均) - (A17的34日简单移动平均)
A19赋值:A18上穿0
A20赋值:0上穿A18
A21赋值:上次A19距今天数
A22赋值:上次A20距今天数
A23赋值:1日前的A19
A24赋值:1日前的A20
A25赋值:上次A23距今天数
A26赋值:上次A24距今天数
A27赋值:IF((A25 < A26),(REF((2日内最高价最高值),A25)),(REF((2日内最低价最低值),A26)))
A28赋值:(((1日前的收盘价) <= (1日前的A27)) AND (收盘价 > A27)) AND (A21 < A22)
A29赋值:(((1日前的收盘价) >= (1日前的A27)) AND (收盘价 < A27)) AND (A22 < A21)
A30赋值:A28 AND ((统计A21日满足A28的天数) = 1)
A31赋值:A29 AND ((统计A22日满足A29的天数) = 1)
A32赋值:A30 AND ((REF(上次A31距今天数,1)) < (REF(BARSLAST(A30),1)))
A33赋值:A31 AND ((REF(上次A31距今天数,1)) > (REF(BARSLAST(A30),1)))
当满足条件A32时,在SMA2*0.99和'←锁喉'位置书写文字
AC赋值:成交额/(成交量)
YY赋值:AC的13日简单移动平均
LLL赋值:(C-YY)/YY*100
MIDC := 收盘价的22日简单移动平均
UPPERC赋值: MIDC + 2*C的22估算标准差
LOWERC赋值: MIDC - 2*C的22估算标准差
BBA赋值:(C-LOWERC)/(UPPERC-LOWERC)
LIFENGCYC赋值:(1日前的LLL< -15 AND 1日前的BBA< 0 AND LLL>1日前的LLL)
当满足条件LIFENGCYC时,在最低价*0.93和最低价*0.95之间画柱状线
当满足条件LIFENGCYC>0时,在C和O之间画柱状线
当满足条件LIFENGCYC>0时,在C和O之间画柱状线
当满足条件LIFENGCYC>0时,在C和O之间画柱状线
当满足条件LIFENGCYC>0时,在C和O之间画柱状线
当满足条件LIFENGCYC>0时,在C和O之间画柱状线
当满足条件LIFENGCYC>0时,在C和O之间画柱状线
当满足条件LIFENGCYC>0时,在C和O之间画柱状线