C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- {㊣神獒掌控主图选股公式㊣}
- input:N(88,1,1111),N1(888,1,1111);
- {DRAWGBK((CLOSE > 0),STRIP(RGB(4,1,28),RGB(4,1,35),0));}
- a1:=IF((CLOSE < 800),((AMOUNT / VOL) / 100),((((CLOSE * 2) + HIGH) + LOW) / 4));
- a2:=((HHV(HIGH,15)) + (LLV(LOW,30))) / 2;
- a3:=EMA((MA(a1,5)),10);
- a4:=EMA((MA(a1,15)),10);
- a5:=EMA((MA(a1,13)),21);
- a6:=((a3 + a4) + a5) / 3;
- 决策线:=EMA((MA(CLOSE,5)),3);
- {决策线:EMA((MA(CLOSE,5)),3),colorGreen;
- PARTLINE(决策线,决策线 > (REF(决策线,3)),RGB(255,0,0)),linethick1,colorRed; }
- 多空带:=((((REF(a6,1)) + a6) + (REF(a6,2))) / 3);
- {多空带:((((REF(a6,1)) + a6) + (REF(a6,2))) / 3),linethick0;}
- a7:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.191;
- a8:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.236;
- a9:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.809;
- a10:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.764;
- a11:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.618;
- 地线:=(a9);
- 天线:=(a7);
- 支撑线:=(a10);
- 阻力线:=(a8);
- {地线:(a9),linethick1,Coloryellow;
- 天线:(a7),linethick1,ColorFF0000;
- 支撑线:(a10),linethick2,Color73740F;
- 阻力线:(a8),linethick2,Color509046;}
- a12:=((EMA((MA(a1,3)),3)) + (WMA(a1,5))) / 2;
- a13:=REF(a12,1);
- a14:=BARSCOUNT(CLOSE);
- a15:=IF((a14 = 1),0,(((a12 - a13) / a13) * 100));
- a16:=REF(CLOSE,1);
- a17:=IF((a14 = 1),0,(((CLOSE - a16) / a16) * 100));
- a18:=IF((a14 = 1),((CLOSE + OPEN) / 2),a13);
- a19:=REF(a12,2);
- a20:=((a12 + a13) + a19) / 3;
- a21:=((ABS((a12 - a20)) + ABS((a13 - a20))) + ABS((a19 - a20))) / 3;
- a22:=IF((a14 < 3),0,((a21 / a12) * 100));
- a23:=IF((((a15 > 0.5) AND ((a22 > 0.215) OR (LOW > a18))) AND (CLOSE >= OPEN)),1,0);
- a24:=IF((((a15 < (0 - 0.3)) AND ((a22 > 0.2) OR (HIGH < a18))) AND ((OPEN >= CLOSE) OR (a17 < -1))),1,0);
- {FILLRGN((((REF(a6,1)) + a6) + (REF(a6,2))) / 3,(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.985,CLOSE > a2,RGB(250,0,0),CLOSE < a2,RGB(101,0,185));}
- B:=((COUNT(a23,BARSLAST(a24))) = 1) AND a23;
- D:=((COUNT(a24,BARSLAST(a23))) = 1) AND a24;
- {B:((COUNT(a23,BARSLAST(a24))) = 1) AND a23,linethick0;
- D:((COUNT(a24,BARSLAST(a23))) = 1) AND a24,linethick0; }
- 正买点: if(B,5,0);
- {DRAWTEXT(B,(LOW * 0.98),'㊣'),linethick3,ALIGN1,colorWhite;}
- S卖点: if(D,5,0);
- {DRAWTEXT(D,(HIGH * 1.035),'S'),linethick3,ALIGN1,colorGreen;}
- {STICKLINE(((B > 0) OR (D > 0)),a1,(a1 * 0.998),8,0),ColorFF0000;}
- a25:=(EMA(CLOSE,12)) - (EMA(CLOSE,26));
- a26:=EMA(a25,9);
- a27:=2 * (a25 - a26);
- a28:=IF((((((((REF(a27,1)) < (REF(a27,2))) AND ((REF(a27,2)) < (REF(a27,3)))) AND (a27 > (REF(a27,1)))) AND (a27 >= 0)) AND ((LLV(a27,4)) > 0)) AND (COUNT((a27 < 0.18),5))),(a27 * 2),0);
- a29:=IF(((COUNT((CROSS(a26,a25)),8)) AND (CROSS(a25,a26))),(a27 * 4),0);
- a30:=(a28 > 0) AND (CLOSE >= (((REF(a6,1)) + a6) + (REF(a6,2))) / 3);
- {DRAWICON(a30,LOW,12),ALIGN1;}
- a31:=(((CLOSE / a16) - 1) * 100) >= 7;
- a32:=HIGH - ((HIGH - LOW) / 3);
- a33:=LOW + ((HIGH - LOW) / 3);
- a34:=(CLOSE > 0) AND a31;
- a35:=((HIGH - LOW) * 0.618) + LOW;
- a36:=((HIGH - LOW) * 0.382) + LOW;
- {STICKLINE(a34,a32,a33,8,0),colorYellow;
- STICKLINE(a34,((HIGH + LOW) / 2),((HIGH + LOW) / 2),8,0);
- STICKLINE(a34,CLOSE,a35,8,0),colorRed;
- STICKLINE(a34,CLOSE,a35,7,0),Color1414FF;
- STICKLINE(a34,CLOSE,a35,6,0),Color2828FF;
- STICKLINE(a34,CLOSE,a35,5,0),Color3D3DFF;
- STICKLINE(a34,CLOSE,a35,4,0),Color5151FF;
- STICKLINE(a34,CLOSE,a35,3,0),Color6565FF;
- STICKLINE(a34,CLOSE,a35,2,0),Color7A7AFF;
- STICKLINE(a34,CLOSE,a35,1,0),Color8E8EFF;
- STICKLINE(a34,a36,OPEN,8,0),colorGreen;
- STICKLINE(a34,a36,OPEN,7,0),Color28FF28;
- STICKLINE(a34,a36,OPEN,6,0),Color3DFF3D;
- STICKLINE(a34,a36,OPEN,5,0),Color51FF51;
- STICKLINE(a34,a36,OPEN,4,0),Color65FF65;
- STICKLINE(a34,a36,OPEN,3,0),Color7AFF7A;
- STICKLINE(a34,a36,OPEN,2,0),Color8EFF8E;
- STICKLINE(a34,a36,OPEN,1,0),ColorA2FFA2;}
- a37:=((CLOSE - (EMA(a1,25))) / (EMA(a1,25))) * 100;
- 卖出点: if(((a37 > 12) AND (CROSS(决策线,CLOSE))),5,0);
- {DRAWTEXT(((a37 > 12) AND (CROSS(决策线,CLOSE))),HIGH,'卖出');}
- a38:=BIGORDER(1,2);
- a39:=BIGORDER(2,2);
- a40:=(((a38 - a39) * VOL) / CAPITAL) * 500;
- {DRAWTEXT(((a40 > 0.5) OR (LAST((a40 > 0)) > 1)),((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.002),'● '),colorYellow;
- DRAWTEXT((a40 > 1),((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.002),'★'),ColorFF0087;
- DRAWTEXT((a40 > 2),((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.002),'★'),colorBlack;
- DRAWTEXT((((((REF(a40,1)) >= (HHV(a40,20))) AND (a40 >= (LLV(a40,20)))) AND ((REF(a40,1)) > 2.5)) AND (a40 < -2.5)),(HIGH * 1.02),'◤反转'),colorGreen; }
- 出货: if(((((OPEN / a16) > 1.03) AND (CLOSE < OPEN)) AND (a40 < 0)),5,0);
- {DRAWTEXT(((((OPEN / a16) > 1.03) AND (CLOSE < OPEN)) AND (a40 < 0)),HIGH,'出货'),colorMagenta;}
- a41:=LOW < a11;
- {DRAWICON(a41,LOW,1);
- DRAWICON((((CROSS(CLOSE,(REF(a9,1)))) AND (a15 < -3)) OR (((LOW < 支撑线) AND (CLOSE > 支撑线)) AND (a15 < -3.5))),LOW,7),ALIGN1;
- DRAWICON(((CROSS((REF(a7,1)),CLOSE)) AND (a40 < 0)),(HIGH * 1.015),8),ALIGN1; }
- 三分一仓进: if(((CROSS(CLOSE,(REF(a9,1)))) AND (a40 > 0)),5,0);
- 三分一仓出:if(((CROSS((REF(a7,1)),CLOSE)) AND (a40 < 0)),5,0);
- 二分一仓进:if((CROSS(CLOSE,(REF(a10,1)))),5,0);
- {DRAWTEXT(((CROSS(CLOSE,(REF(a9,1)))) AND (a40 > 0)),LOW,'1/3仓'),colorMagenta;
- DRAWTEXT(((CROSS((REF(a7,1)),CLOSE)) AND (a40 < 0)),(HIGH * 1.05),'1/3仓出'),Color00DB00;
- DRAWTEXT((CROSS(CLOSE,(REF(a10,1)))),(LOW * 0.96),'仓1/2'),colorYellow;
- DRAWTEXT((CROSS(CLOSE,(REF(((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.681),1)))),(LOW * 0.98),'1/2仓'),Color005EFF;
- STICKLINE(((CLOSE > 0) AND (DISPSTATUS = 2)),((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.15),((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.15),20,0),colorWhite;
- STICKLINE(((CLOSE > 0) AND (DISPSTATUS = 2)),((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.85),((((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.85),20,0);}
- 满仓出击:if(a41,5,0);
- {DRAWTEXT(a41,HIGH,'满仓出击');}
- a42:=(CYC(8) - (REF(CYC(8),1))) / (REF(CYC(8),1));
- a43:=((SMA((MAX((CLOSE - a16),0)),5,1)) / (SMA(ABS((CLOSE - a16)),5,1))) * 100;
- 小顶:if(((((CROSS(90,a43)) AND (a40 < 0)) AND ((CLOSE / OPEN) <= 0.985)) OR (((a43 > 90) AND (a40 < 0)) AND ((CLOSE / OPEN) <= 0.985))),5,0);
- {DRAWTEXT(((((CROSS(90,a43)) AND (a40 < 0)) AND ((CLOSE / OPEN) <= 0.985)) OR (((a43 > 90) AND (a40 < 0)) AND ((CLOSE / OPEN) <= 0.985))),(HIGH * 1.04),'▼'),ALIGN1,colorGreen;}
- 波段小底: if(((((CROSS(a43,10)) AND (a40 > 0)) OR ((a43 < 10) AND (a40 > 0))) OR (((LOW < 支撑线) AND (CLOSE > 支撑线)) AND (a40 > 0))),5,0);
- {DRAWTEXT(((((CROSS(a43,10)) AND (a40 > 0)) OR ((a43 < 10) AND (a40 > 0))) OR (((LOW < 支撑线) AND (CLOSE > 支撑线)) AND (a40 > 0))),(LOW * 0.97),'▲'),ALIGN1,colorRed;}
- 波段大底: if(((CROSS(a43,10)) AND (a15 < -4)),5,0);
- {DRAWTEXT(((CROSS(a43,10)) AND (a15 < -4)),(LOW * 0.92),'◢◣'),ALIGN1,colorRed;}
- 波段小底2: if((((a15 < -5) AND (a37 < -24)) AND (a43 < 12)),5,0);
- {DRAWTEXT((((a15 < -5) AND (a37 < -24)) AND (a43 < 12)),(LOW * 0.95),'▲'),ALIGN1,colorMagenta;}
- 中期大底: if(((((a15 < -3) AND (a40 > 0)) AND (LOW <= 地线)) AND (CLOSE > 地线)),5,0);
- {DRAWTEXT(((((a15 < -3) AND (a40 > 0)) AND (LOW <= 地线)) AND (CLOSE > 地线)),(LOW * 0.94),'◆'),ALIGN1,colorYellow;
- DRAWTEXT(((CLOSE > 0) AND (DISPSTATUS = 2)),(决策线 * 0.9),'多空价:'+REF(a6,1)),MOVE10,ALIGN2,colorYellow; }
- {DRAWTEXT(((CLOSE > 0) AND (DISPSTATUS = 2)),(a7 * 1.05),'天线:'+a7),MOVE10,ALIGN2,ColorFF8748;
- DRAWTEXT(((CLOSE > 0) AND (DISPSTATUS = 2)),(a9 * 0.96),'地线:'+a9),MOVE10,ALIGN2,Color766A6C;
- DRAWTEXT(((CLOSE > 0) AND (DISPSTATUS = 2)),(决策线 * 0.95),'决策价:'+决策线),MOVE10,ALIGN2,colorRed;
- PARTLINE(支撑线,(MA(a1,10)) > (MA(a1,240)),RGB(255,0,255)),linethick2,colorMagenta; }
- a44:=LOW > (REF(HIGH,1));
- a45:=HIGH < (REF(LOW,1));
- {PARTLINE(地线,(MA(a1,10)) > (MA(a1,72)),RGB(255,255,0)),linethick1,colorYellow;
- DRAWTEXT(a44,((REF(HIGH,1)) * 1.003),'─'),ALIGN1,colorWhite;
- DRAWTEXT(a44,(LOW * 1.003),'─'),ALIGN1,colorWhite;
- DRAWTEXT(a45,((REF(LOW,1)) * 1.003),'─'),ALIGN1,colorGreen;
- DRAWTEXT(a45,(HIGH * 1.003),'─'),ALIGN1,colorGreen;
- DRAWTEXTREL(0,0,'评级:'+Extrastring('评级')),colorCyan;
- DRAWTEXTABS(1,15,'所属板块:'+BKNAME),ColorAFFF00;
- DRAWTEXTREL(0,130,'每股收益:'+NUMTOSTRN(FINANCE2(3),3)+'元'+' 市盈率:'+NUMTOSTRN(DYNAINFO(39),2)+'元'+' 市净率:'+NUMTOSTRN((CLOSE / FINANCE2(4)),2)+'元'+' 净资产:'+NUMTOSTRN(FINANCE2(4),2)+'元'),Color00C0FF;}