【大智慧】一张主图(波段线、趋势线、天线、地线)-指标公式源码
VA1:=IF((CLOSE < 800),((AMOUNT / VOL) / 100),((((CLOSE * 2) + HIGH) + LOW) / 4));
VA2:=((HHV(HIGH,15)) + (LLV(LOW,30))) / 2; VA3:=EMA((MA(VA1,5)),10); VA4:=EMA((MA(VA1,15)),10); VA5:=EMA((MA(VA1,13)),21); VA6:=((VA3 + VA4) + VA5) / 3;
波段线:EMA((MA(CLOSE,5)),5),colorFB333F,linethick2;
PARTLINE(波段线,波段线 > (REF(波段线,3)),RGB(255,255,0)),linethick2; 趋势线:((((REF(VA6,1)) + VA6) + (REF(VA6,2))) / 3); PARTLINE(趋势线,CLOSE > VA2,RGB(225,0,0),CLOSE <= VA2,RGB(66,188,255)),colorffff00,linethick3;
天线:MA(REF(HHV(CLOSE,30),1),2),LINETHICK2,Color80e9ff; 地线:MA(REF(LLV(CLOSE,30),1),2),LINETHICK2,Color669900; SD:=HHV(HIGH,13)=HIGH AND HIGH>REF(HIGH,1); SD1:=FILTER(SD,12);
SF:=LLV(LOW,13)=LOW AND LOW箱顶:REF(HIGH,TSS1),LINETHICK0,COLORRED; TSS2:=BARSLAST(SF1);
箱底:REF(LOW,TSS2),LINETHICK0,COLORGREEN;
STICKLINE(OPEN>=CLOSE,HIGH,LOW,0.5 ,0 ),COLOR00FF00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR005500; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR006600; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR007700; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR009900; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00BB00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00DD00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00; STICKLINE(CLOSE>OPEN,HIGH,LOW,0.5,0 ),COLOR0000FF; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000055;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR000066; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR000077; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR000099; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000bb; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000dd; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000ff; AA1:=MA(CLOSE,20);
AA2:=(CLOSE > MA(CLOSE,5)); AA3:=(MA(CLOSE,5) > MA(CLOSE,10)); AA4:=(CLOSE > MA(CLOSE,10)); AA5:=(MA(CLOSE,5) > MA(CLOSE,20)); AA6:=(CLOSE > MA(CLOSE,20)); AA7:=REF(AA1,1); AA8:=(AA1 > AA7);
AAX:=(((((IF(AA2,10,(0 - 10)) + IF(AA3,10,(0 - 10))) + IF(AA4,10,(0 - 10))) + IF(AA5,10,(0 - 10))) + IF(AA6,10,(0 - 10))) + IF(AA8,10,(0 - 10))); DSLX:=(CLOSE / INDEXC); DSLX1:=MA(DSLX,5); DSLX2:=MA(DSLX,10); V1:=MA(VOL,5); V2:=MA(VOL,10);
T := BARSLAST(DISPSTATUS=1)+1;
IF BARSTATUS=2 and c<200 and ((CROSS(AAX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)) THEN
DRAWTEXTREL(500,20,'的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右。'),colorRED,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((CROSS(AAX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)) THEN
DRAWTEXTREL(500,20,'虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右。'),colorYELLOW,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((CROSS(AAX,1) AND (V1 > V2)) AND (DSLX < DSLX1)) THEN
DRAWTEXTREL(500,20,'量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右。'),colorYELLOW,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((CROSS(AAX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)) THEN
DRAWTEXTREL(500,20,'形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右。'),colorYELLOW,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((CROSS(1,AAX) AND (V1 >= V2)) AND (DSLX >= DSLX1)) THEN
DRAWTEXTREL(500,20,'形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望。'),colorGREEN,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((CROSS(1,AAX) AND (V1 < V2)) AND (DSLX >= DSLX1)) THEN
DRAWTEXTREL(500,20,'随大盘一起下跌,呈明显缩量走势,考虑到大盘风险,减持或清仓。'),colorGREEN,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((CROSS(1,AAX) AND (V1 >= V2)) AND (DSLX < DSLX1)) THEN
DRAWTEXTREL(500,20,'放量下跌,走势明显偏弱,离场观望。'),colorGREEN,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((CROSS(1,AAX) AND (V1 < V2)) AND (DSLX < DSLX1)) THEN
DRAWTEXTREL(500,20,'缩量下跌,走势偏弱,离场观望。'),colorGREEN,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((((AAX >= 1) AND (REF(AAX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) THEN
DRAWTEXTREL(500,20,'形态良好,强势明显,量能充足,可以继续持有。'),colorRED,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((((AAX >= 1) AND (REF(AAX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) THEN
DRAWTEXTREL(500,20,'上行趋势不变,强势依然,但量能开始转弱,注意风险。'),colorRED,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((((AAX >= 1) AND (REF(AAX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) THEN
DRAWTEXTREL(500,20,'仍然具备上涨潜力,但股性偏弱,可考虑减仓。'),colorGREEN,LINETHICK2,ALIGN1;
IF BARSTATUS=2 and c<200 and ((((AAX >= 1) AND (REF(AAX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) THEN