同花顺长中短线主图公式代码源码[同花顺公式]
相关标签:
用法:快速反应,灵敏度高,0线下金叉买,0线上死叉卖。
原理解析:
源码:
N:=5;N1:=3;
TG:(MA(CLOSE,5)+MA(CLOSE,8)+MA(CLOSE,13)+MA(CLOSE,21))/4;
AA:HHV(TG,3);
BB:LLV(TG,3);
趋势线:=MA(TG,N),coloryellow;
PARTLINE(趋势线,趋势线>REF(趋势线,1),RGB(255,0,0),趋势线<REF(趋势线,1),RGB(0,255,0)),LINETHICK1;
FILLRGN(趋势线,REF(趋势线,1),趋势线>REF(趋势线,1),RGB(255,0,0),趋势线<=REF(趋势线,1),RGB(0,255,0) );
STICKLINE(BB >趋势线 ,BB,趋势线,1,1),COLOR0000AA;
STICKLINE(BB <趋势线 ,BB,趋势线,1,1),COLOR008800;
STICKLINE(BB-REF(BB,1)>0 ,AA,BB,7,0),color0000DD;
STICKLINE(BB-REF(BB,1)<0 ,BB,AA,7,0),color008800;
PARTLINE(AA,AA>REF(AA,1),RGB(255,0,0),AA<REF(AA,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(BB,BB>REF(BB,1),RGB(255,0,0),BB<REF(BB,1),RGB(0,255,0)),LINETHICK1;
TG1:=(MA(CLOSE,2)+MA(CLOSE,3)+MA(CLOSE,4)+MA(CLOSE,5))/4;
AA1:HHV(TG1,3);
PARTLINE(AA1,AA1>REF(AA1,1),RGB(255,0,255),AA1<REF(AA1,1),RGB(0,55,250)),LINETHICK2;
趋势线1:=MA(TG,N1),coloryellow;
PARTLINE(趋势线1,趋势线1>REF(趋势线1,1),RGB(255,255,0),趋势线1<REF(趋势线1,1),RGB(0,55,255)),LINETHICK1;
FILLRGN(趋势线1,REF(趋势线1,2),趋势线1>REF(趋势线1,2),RGB(255,255,0),趋势线1<=REF(趋势线1,2),RGB(0,55,255) );
V1:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9);
HY1:=REF(EMA(V1,3),1);
实时线:=MA(CLOSE,2),Color006400;
神秘线:=HY1,Color400080;
DRAWTEXT(CROSS(CLOSE,HY1),LOW,'买点'),LINETHICK2,coloryellow;
DRAWTEXT(CROSS(HY1,CLOSE),HIGH*1.02,'卖点'),LINETHICK3,colorwhite;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,0.5,0),Color787800;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,8,0),ColorA0A000;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,7,0),ColorB4B400;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,6,0),ColorC8C000;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,5,0),ColorD2D200;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,4,0),ColorDCDC00;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,3,0),ColorE6E600;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,2,0),ColorF0F000;
STICKLINE(CLOSE < OPEN,CLOSE,OPEN,1,0),ColorFFFF00;
STICKLINE(CLOSE>OPEN,HIGH,LOW,0.5,0) ,COLORFFBBFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLORFF00FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLORFF22FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLORFF44FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLORFF66FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLORFF88FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLORFF99FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLORFFAAFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLORFFBBFF;{来源:www.cxh99.com 程序化交易}
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容