C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- {军师与将军 0.9测试版 飞狐/通达信
- 目标:
- 挑战长线利润极限
- 使用前提:
- 要求您必须事先了解长线投资理念
- 简介:
- 1、黄格:军师,潜在行情的策划者,喜欢拿一把羽毛扇!
- 2、红色:将军与他的千军万马,经常踏平一切战场!
- 3、蓝线:神秘成本线,强弱分水岭。
-
- 参数:
- x 一般设置为60-120 代表成本均线的平滑度
- y 1 默认不要变
-
- 用法:
- 找军师,设埋伏:X设置小一些(60左右),黄块儿呈扁平状效果最佳!
- 找将军,踏平股市:X可以稍微大一些(60-120左右),红色就是持股的象征!
- }
-
- a1:=cost(95);
- a2:=cost(85);
- a3:=cost(75);
- a4:=cost(65);
- a5:=cost(55);
- a6:=cost(45);
- a7:=cost(35);
- a8:=cost(25);
- a9:=cost(15);
- a10:=cost(10);
- a11:=cost(8);
- a12:=cost(6);
- a13:=cost(4);
- a14:=cost(2);
-
- b1:ma(a1,x),colorgray;
- b2:ma(a2,x),colorgray;
- b3:ma(a3,x),colorgray;
- b4:ma(a4,x),colorgray;
- b5:ma(a5,x),colorgray;
- b6:ma(a6,x),colorgray;
- b7:ma(a7,x),colorgray;
- b8:ma(a8,x),colorgray;
- b9:ma(a9,x),colorgray;
- b10:ma(a10,x),colorgray;
- b11:ma(a11,x),colorgray;
- b12:ma(a12,x),colorgray;
- b13:ma(a13,x),colorgray;
- b14:ma(a14,x),colorgray;
- dis1:=a1-a14;
- dis2:=a2-a13;
- dis3:=a3-a12;
- dis4:=a4-a11;
- dis5:=a5-a10;
- dis6:=a6-a9;
- dis0:=(a1+a2+a3+a4+a5+a6)/6;
- dis00:ma(dis0,49),linethick3,colorblue;
- 向下:=if(dis00<ref(dis00,Y),1,0);
- 一直向上:=if(dis00>=ref(dis00,Y) and count(向下,50)<30,1,0);
- 红色将军:if(b14>=ref(b14,y)and b13 >= ref(b13,y) and b12 >= ref(b12,y) and b11 >= ref(b11,y) and b10 >= ref(b10,y) and 一直向上,1,0),colorred,linethick0;
- stickline(红色将军,b14,b1,5,0),colorred;
- hahaha1:if(b1>=ref(b1,y),1,0),linethick0;
- stickline(hahaha1,b1,b3,5,0),ColorC0A6D1;
- 黄色军师:if(b1<ref(b1,Y) and b14>=ref(b14,Y) and b13>ref(b13,Y) and b12>ref(b12,Y) and b11>ref(b11,Y)and count(红色将军,70)<20 and count(红色将军,210)<40 and(c/hhv(c,500)<0.65 or c/hhv(c,1000)<0.65 or c/hhv(c,1500)<0.65 or c/hhv(c,2000)<0.65),1,0),coloryellow,linethick0;
- stickline(黄色军师,b6,b11,4,0),coloryellow;
- 军师在此:=if(黄色军师 and count(黄色军师,50)<=1,1,0);
- drawtext(军师在此,a14,'>>军师在此<<'),coloryellow;
- dis000:ma(dis0,49),linethick5,colorblue;
- abc:=ema(c,15),colorred,linethick1;
- stickline(c<abc,h,l,0.4,2),COLORgreen;
- stickline(c<abc,o,c,8,2),COLORgreen;
- stickline(c>abc,h,l,0.4,0),colorred;
- stickline(c>abc,o,c,8,0),colorred;
C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- {军师与将军 0.91测试版 飞狐/大智慧2/通达信 DESIGNED BY 老大7777
- 目标:
- 挑战长线利润极限
- 使用前提:
- 要求您必须事先了解长线投资理念
- 简介:
- 1、黄格:军师,潜在行情的策划者,喜欢拿一把羽毛扇!
- 2、红色:将军与他的千军万马,经常踏平一切战场!
- 3、蓝线:神秘成本线,强弱分水岭。
- 更新:
- 1、增加副军师,更多的胜利机会!
- 2、修改军师算法,更加聪明!
- 3、除去将军算法的一个BUG,并修改算法。
- 参数:
- X 一般设置为60-120 代表成本均线的平滑度
- Y 1 默认不要变
-
- 用法:
- 找军师,设埋伏:X设置小一些(60左右),黄块儿呈扁平状效果最佳!
- 找将军,踏平股市:X可以稍微大一些(60-120左右),红色就是持股的象征!
-
- 选股:
- 1、绿色军师=1
- 2、黄色军师=1
- }
-
- 股龄:=(BARSCOUNT(CLOSE));
- A1:=COST(95);
- A2:=COST(85);
- A3:=COST(75);
- A4:=COST(65);
- A5:=COST(55);
- A6:=COST(45);
- A7:=COST(35);
- A8:=COST(25);
- A9:=COST(15);
- A10:=COST(10);
- A11:=COST(8);
- A12:=COST(6);
- A13:=COST(4);
- A14:=COST(2);
-
- B1:MA(A1,X),COLORGRAY;
- B2:MA(A2,X),COLORGRAY;
- B3:MA(A3,X),COLORGRAY;
- B4:MA(A4,X),COLORGRAY;
- B5:MA(A5,X),COLORGRAY;
- B6:MA(A6,X),COLORGRAY;
- B7:MA(A7,X),COLORGRAY;
- B8:MA(A8,X),COLORGRAY;
- B9:MA(A9,X),COLORGRAY;
- B10:MA(A10,X),COLORGRAY;
- B11:MA(A11,X),COLORGRAY;
- B12:MA(A12,X),COLORGRAY;
- B13:MA(A13,X),COLORGRAY;
- B14:MA(A14,X),COLORGRAY;
-
- DIS1:=A1-A14;
- DIS2:=A2-A13;
- DIS3:=A3-A12;
- DIS4:=A4-A11;
- DIS5:=A5-A10;
- DIS6:=A6-A9;
- DIS0:=(A1+A2+A3+A4+A5+A6)/6;
- DIS00:MA(DIS0,49),LINETHICK3,COLORBLUE;
- 向下:=IF(DIS00<REF(DIS00,Y),1,0);
- 一直向上:=IF(COUNT(向下,60)<30,1,0);
-
- 红色将军:IF(B14>=REF(B14,Y)AND B13 >= REF(B13,Y) AND B12 >= REF(B12,Y) AND B11 >= REF(B11,Y) AND B10 >= REF(B10,Y) AND 一直向上,1,0),COLORRED,LINETHICK0;
- STICKLINE(红色将军,B14,B1,5,0),COLORRED;
- HAHAHA1:IF(B1>=REF(B1,Y),1,0),LINETHICK0;
- STICKLINE(HAHAHA1,B1,B3,5,0),COLORC0A6D1;
- 绿色军师0:=IF((B1<=REF(B1,Y) OR B2<REF(B2,Y) OR B3<REF(B3,Y) OR B4<REF(B4,Y) OR B5<REF(B5,Y)) AND B14>=REF(B14,Y) AND B13>REF(B13,Y) AND (B12>REF(B12,Y) OR B11>REF(B11,Y))AND COUNT(红色将军,70)<35 AND C/LLV(C,170)<1.8,1,0);
- 绿色军师1:=IF(股龄>990 AND 绿色军师0 AND C/LLV(C,1000)<4.5,1,0);
- 绿色军师2:=IF(股龄>490 AND 绿色军师0 AND C/LLV(C,500)<2.5,1,绿色军师1);
- 绿色军师:IF(股龄<490 AND 绿色军师0,1,绿色军师2),COLORGREEN,LINETHICK0;
- STICKLINE(绿色军师,B6,B11,4,0),COLORGREEN;
- 副军师在此:=IF(绿色军师 AND COUNT(绿色军师,50)<=1,1,0);
- DRAWTEXT(副军师在此,A14*0.87,'>>副军师在此<<'),COLORGREEN;
- 黄色军师0:=IF(B1<=REF(B1,Y) AND B14>=REF(B14,Y) AND B13>REF(B13,Y) AND B12>REF(B12,Y) AND B11>REF(B11,Y)AND COUNT(红色将军,70)<35 AND COUNT(红色将军,210)<40 AND C/LLV(C,170)<1.8,1,0);
- 黄色军师1:=IF(股龄>990 AND 黄色军师0 AND C/LLV(C,1000)<3.5,1,0);
- 黄色军师2:=IF(股龄>490 AND 黄色军师0 AND C/LLV(C,500)<2.5,1,黄色军师1);
- 黄色军师:IF(股龄<490 AND 黄色军师0,1,黄色军师2),COLORYELLOW,LINETHICK0;
- STICKLINE(黄色军师,B6,B11,4,0),COLORYELLOW;
- 军师在此:=IF(黄色军师 AND COUNT(黄色军师,50)<=1,1,0);
- DRAWTEXT(军师在此,A14,'>>军师在此<<'),COLORYELLOW;
- DIS000:MA(DIS0,49),LINETHICK5,COLORBLUE;
- ABC:=EMA(C,15);
- STICKLINE(C<ABC,H,L,0.4,2),COLORGREEN;
- STICKLINE(C<ABC,O,C,8,2),COLORGREEN;
- STICKLINE(C>ABC,H,L,0.4,0),COLORRED;
- STICKLINE(C>ABC,O,C,8,0),COLORRED;