威力巨大主图通达信公式 主图 源码附图
NN:=11;M:=6;
N:=25;
M1:=3;
M2:=3;
M3:=6;
M4:=6;
M5:=9;
M6:=9;
UPPER4:=(1+M5/100)*MA(CLOSE,N);
LOWER4:=(1-M6/100)*MA(CLOSE,N);
UPPER5:=(1+M1/100)*MA(CLOSE,N);
LOWER5:=(1-M2/100)*MA(CLOSE,N);
ENE2:=(UPPER5+LOWER5)/2;
{STICKLINE(CLOSE>LOWER5,LOWER5,UPPER4,1,-1),COLORRED;
STICKLINE(CLOSE<LOWER5,LOWER5,LOWER4,1,-1),COLORGREEN;}
DRAWBAND(CLOSE,RGB(85,0,0),LOWER5,RGB(0,85,0));
UPPER:=(1+M1/100)*MA(CLOSE,N);
LOWER:(1-M2/100)*MA(CLOSE,N),COLORYELLOW;
UPPER2:=(1+M3/100)*MA(CLOSE,N),COLORWHITE;
LOWER2:=(1-M4/100)*MA(CLOSE,N),COLORWHITE;
UPPER3:=(1+M5/100)*MA(CLOSE,N),COLORWHITE;
LOWER3:=(1-M6/100)*MA(CLOSE,N),COLORWHITE;
ENE:=(UPPER+LOWER)/2;
MA5:MA(C,5),COLORWHITE;
MA20:MA(C,20),COLORWHITE,LINETHICK4;
角度5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416,NODRAW;
IF(角度5>0,MA5,DRAWNULL),LINETHICK2,COLORRED;
角度20:=ATAN((MA20/REF(MA20,1)-1)*100)*180/3.1416,NODRAW;
IF(角度20>0,MA20,DRAWNULL),LINETHICK4,COLORRED;
X1A:=30;
X1B:HHV(C,X1A),COLORMAGENTA,LINETHICK3;
X1C:=IF(ISLASTBAR,BARSLAST(C=CONST(X1B))+1,1/0);
X1D:=IF(X1C=1,' 1',IF(X1C=2,' 2',IF(X1C=3,' 3',IF(X1C=4,' 4',IF(X1C=5,' 5',
IF(X1C=6,' 6',IF(X1C=7,' 7',IF(X1C=8,' 8',IF(X1C=9,' 9',IF(X1C=10,' 10',
IF(X1C=11,' 11',IF(X1C=12,' 12',IF(X1C=13,' 13',IF(X1C=14,' 14',IF(X1C=15,' 15',
IF(X1C=16,' 16',IF(X1C=17,' 17',IF(X1C=18,' 18',IF(X1C=19,' 19',IF(X1C=20,' 20',
IF(X1C=21,' 21',IF(X1C=22,' 22',IF(X1C=23,' 23',IF(X1C=24,' 24',IF(X1C=25,' 25',
IF(X1C=26,' 26',IF(X1C=27,' 27',IF(X1C=28,' 28',IF(X1C=29,' 29',IF(X1C=30,' 30',' 0'))))))))))))))))))))))))))))));
X1E:DRAWTEXT(ISLASTBAR,X1B,X1D),COLORFF5500;
{股票指标网}
X2A:=30;
X2B:LLV(C,X2A),COLORMAGENTA,LINETHICK3;
X2C:=IF(ISLASTBAR,BARSLAST(C=CONST(X2B))+1,1/0);
X2D:=IF(X2C=1,' 1',IF(X2C=2,' 2',IF(X2C=3,' 3',IF(X2C=4,' 4',IF(X2C=5,' 5',
IF(X2C=6,' 6',IF(X2C=7,' 7',IF(X2C=8,' 8',IF(X2C=9,' 9',IF(X2C=10,' 10',
IF(X2C=11,' 11',IF(X2C=12,' 12',IF(X2C=13,' 13',IF(X2C=14,' 14',IF(X2C=15,' 15',
IF(X2C=16,' 16',IF(X2C=17,' 17',IF(X2C=18,' 18',IF(X2C=19,' 19',IF(X2C=20,' 20',
IF(X2C=21,' 21',IF(X2C=22,' 22',IF(X2C=23,' 23',IF(X2C=24,' 24',IF(X2C=25,' 25',
IF(X2C=26,' 26',IF(X2C=27,' 27',IF(X2C=28,' 28',IF(X2C=29,' 29',IF(X2C=30,' 30',' 0'))))))))))))))))))))))))))))));
X2E:DRAWTEXT(ISLASTBAR,X2B,X2D),COLORFF00FF;
CV:=CLOSE;
BBIBOLL:=(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4;
UPR:BBIBOLL+M*STD(BBIBOLL,NN),COLORWHITE,DOTLINE,LINETHICK1;
DWN:BBIBOLL-M*STD(BBIBOLL,NN),COLORWHITE,DOTLINE,LINETHICK1;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(MA5<BBIBOLL AND C<MA5,H,L,0,0),COLORGRAY;
STICKLINE(MA5<BBIBOLL AND C<MA5,O,C,3,1),COLORGRAY;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
NN赋值:11
M赋值:6
N赋值:25
M1:=3
M2:=3
M3:=6
M4:=6
M5:=9
M6:=9
UPPER4赋值:(1+M5/100)*收盘价的N日简单移动平均
LOWER4赋值:(1-M6/100)*收盘价的N日简单移动平均
UPPER5赋值:(1+M1/100)*收盘价的N日简单移动平均
LOWER5赋值:(1-M2/100)*收盘价的N日简单移动平均
ENE2:=(UPPER5+LOWER5)/2
当满足条件收盘价>LOWER5时,在LOWER5和UPPER4之间画柱状线
当满足条件收盘价}
DRAWBAND(收盘价,RGB(85,0,0),LOWER5,RGB(0,85,0))
UPPER赋值:(1+M1/100)*收盘价的N日简单移动平均
输出LOWER:(1-M2/100)*收盘价的N日简单移动平均,画黄色
UPPER2:=(1+M3/100)*收盘价的N日简单移动平均,画白色
LOWER2:=(1-M4/100)*收盘价的N日简单移动平均,画白色
UPPER3:=(1+M5/100)*收盘价的N日简单移动平均,画白色
LOWER3:=(1-M6/100)*收盘价的N日简单移动平均,画白色
ENE:=(UPPER+LOWER)/2
MA5:C的5日简单移动平均,画白色
MA20:C的20日简单移动平均,画白色,LINETHICK4
角度5赋值:ATAN((MA5/1日前的MA5-1)*100)*180/3.1416,NODRAW
如果角度5>0返回MA5否则返回DRAWNULL
角度20赋值:ATAN((MA20/1日前的MA20-1)*100)*180/3.1416,NODRAW
如果角度20>0返回MA20否则返回DRAWNULL
X1A赋值:30
输出X1B:X1A日内C最高值,COLORMAGENTA,LINETHICK3
X1C赋值:IF(ISLASTBAR,上次C=CONST(X1B距今天数)+1,1/0)
X1D赋值:IF(X1C=1,' 1',IF(X1C=2,' 2',IF(X1C=3,' 3',IF(X1C=4,' 4',IF(X1C=5,' 5',
IF(X1C=6,' 6',IF(X1C=7,' 7',IF(X1C=8,' 8',IF(X1C=9,' 9',IF(X1C=10,' 10',
IF(X1C=11,' 11',IF(X1C=12,' 12',IF(X1C=13,' 13',IF(X1C=14,' 14',IF(X1C=15,' 15',
IF(X1C=16,' 16',IF(X1C=17,' 17',IF(X1C=18,' 18',IF(X1C=19,' 19',IF(X1C=20,' 20',
IF(X1C=21,' 21',IF(X1C=22,' 22',IF(X1C=23,' 23',IF(X1C=24,' 24',IF(X1C=25,' 25',
IF(X1C=26,' 26',IF(X1C=27,' 27',IF(X1C=28,' 28',IF(X1C=29,' 29',IF(X1C=30,' 30',' 0'))))))))))))))))))))))))))))))
当满足条件ISLASTBAR时,在X1B和X1D位置书写文字
{股票指标网}
X2A赋值:30
输出X2B:X2A日内C最低值,COLORMAGENTA,LINETHICK3
X2C赋值:IF(ISLASTBAR,上次C=CONST(X2B距今天数)+1,1/0)
X2D赋值:IF(X2C=1,' 1',IF(X2C=2,' 2',IF(X2C=3,' 3',IF(X2C=4,' 4',IF(X2C=5,' 5',
IF(X2C=6,' 6',IF(X2C=7,' 7',IF(X2C=8,' 8',IF(X2C=9,' 9',IF(X2C=10,' 10',
IF(X2C=11,' 11',IF(X2C=12,' 12',IF(X2C=13,' 13',IF(X2C=14,' 14',IF(X2C=15,' 15',
IF(X2C=16,' 16',IF(X2C=17,' 17',IF(X2C=18,' 18',IF(X2C=19,' 19',IF(X2C=20,' 20',
IF(X2C=21,' 21',IF(X2C=22,' 22',IF(X2C=23,' 23',IF(X2C=24,' 24',IF(X2C=25,' 25',
IF(X2C=26,' 26',IF(X2C=27,' 27',IF(X2C=28,' 28',IF(X2C=29,' 29',IF(X2C=30,' 30',' 0'))))))))))))))))))))))))))))))
当满足条件ISLASTBAR时,在X2B和X2D位置书写文字
CV赋值:收盘价
BBIBOLL赋值:(CV的3日简单移动平均+CV的6日简单移动平均+CV的12日简单移动平均+CV的24日简单移动平均)/4
输出UPR:BBIBOLL+M*BBIBOLL的NN估算标准差,画白色,DOTLINE,LINETHICK1
DW输出N:BBIBOLL-M*BBIBOLL的NN估算标准差,画白色,DOTLINE,LINETHICK1
DRAWKLINE(最高价,OPEN,最低价,收盘价)
当满足条件MA5当满足条件MA5