天狼资金线
公式不错的。
本指标的源码,可以用于电脑版本,也可以用于手机app版本。
VAR1:=100;
VAR2:=90;
VAR3:=80;
VAR4:=50;
VAR5:=10;
STICKLINE(VAR1,100,100,4.2,0),COLORBROWN;
STICKLINE(VAR2,90,90,0.5,0),COLORLICYAN;
STICKLINE(VAR3,80,80,4.2,0),POINTDOT,COLORBROWN;
STICKLINE(VAR5,0,5,4.2,0),LINESTICK,COLOR4D4D4D;
VAR6:=REF(LOW,1);
VAR7:=SMA(ABS(LOW-VAR6),3,1)/SMA(MAX(LOW-VAR6,0),3,1)*100;
VAR8:=EMA(IF(CLOSE*1.3,VAR7*10,VAR7/10),3);
VAR9:=LLV(LOW,30);
VAR10:=HHV(VAR8,30);
VAR11:=IF(MA(CLOSE,58),1,0);
VAR12:=EMA(IF(LOW<=VAR9,(VAR8+VAR10*2)/2,0),3)/999*VAR11;
VAR13:=IF(VAR12>100,100,VAR12);
STICKLINE(VAR13>0,0,VAR13*1.2,3,0),COLORBROWN;
STICKLINE(VAR13>0,0,VAR13*1.2,2,0),COLOR00B0B0;
STICKLINE(VAR13>0,0,VAR13*1.2,0.8,0),COLOR00D2D2;
VAR14:=3;
VAR15:=3;
VAR16:=3;
VAR17:=2;
VAR18:=SMA(IF(CLOSE>REF(CLOSE,1),CLOSE-REF(CLOSE,1),0),VAR14,1);
VAR19:=SMA(IF(CLOSE<=REF(CLOSE,1),ABS(CLOSE-REF(CLOSE,1)),0),VAR14,1);
VAR20:=100*VAR18/(VAR18+VAR19);
VAR21:=EMA(VAR20,3);
顶底背离买卖线:EMA(VAR21,3),COLORLIMAGENTA,LINETHICK2;
VAR22:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;
实时主力线:SMA(VAR22,7,1),COLORWHITE;
机构线:SMA(SMA(VAR22,7,1),3,1),COLORYELLOW;
散户线:SMA(SMA(VAR22,7,1),7,1),COLOR80FF00;
VAR23:=EMA(VAR21,3);
VAR24:=99;
VAR25:=80;
VAR26:=5;
VAR27:=(CLOSE-LLV(LOW,VAR15))/(HHV(HIGH,VAR15)-LLV(LOW,VAR15))*100;
VAR28:=SMA(VAR22,VAR16,1);
VAR29:=EMA(VAR28,VAR17);
VAR30:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
VAR31:=REF(EMA(VAR30,3),1);
VAR32:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VAR33:=IF(CLOSE>OPEN,VAR32*(HIGH-LOW),IF(CLOSE<OPEN,VAR32*(HIGH-OPEN+CLOSE-LOW),VOL/2))+IF(CLOSE>OPEN,0-VAR32*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-VAR32*(HIGH-LOW),0-VOL/2));
VAR34:=VAR33/20/1.15;
VAR35:=VAR34*0.55+REF(VAR34,1)*0.33+REF(VAR34,2)*0.22;
VAR36:=EMA(VAR35,2);
VAR37:=VAR36/1000;
VAR38:=50;
蓝色卖出:IF(VAR21<VAR23 AND VAR29<REF(VAR29,1) AND VAR37<=0,50,DRAWNULL AND MA(CLOSE,3)<REF(MA(CLOSE,3),1)),NODRAW,COLORBLUE,LINETHICK3;
减仓:IF(VAR21>=VAR23 AND VAR29>=REF(VAR29,1) AND MA(CLOSE,3)>=REF(MA(CLOSE,3),1) OR (VAR29>=REF(VAR29,1) AND VAR37>0 AND MA(CLOSE,3)>=REF(MA(CLOSE,3),1)) OR (VAR21>=VAR23 AND VAR37>0 AND MA(CLOSE,3)>=REF(MA(CLOSE,3),1)) OR (VAR21>=VAR23 AND VAR37>0 AND VAR29>=REF(VAR29,1)),50,DRAWNULL),NODRAW,COLORLIBLUE,LINETHICK3;
红色买进:IF(VAR21>=VAR23 AND VAR29>=REF(VAR29,1) AND VAR37>0 AND MA(CLOSE,3)>=REF(MA(CLOSE,3),1),50,DRAWNULL),NODRAW,COLORRED,LINETHICK3;
VAR39:=40;
STICKLINE(VAR39,(-0.5),(-7),4.2,0),COLORLIBLUE;
STICKLINE(蓝色卖出,(-0.5),(-7),4.2,0),COLORBLUE;
STICKLINE(减仓,(-0.5),(-7),4.2,0),COLORLIBLUE;
STICKLINE(红色买进,(-0.5),(-7),4.2,0),COLORRED;
VAR40:=EMA(VAR21,3);
VAR41:=EMA(CLOSE,12)-EMA(CLOSE,26);
VAR42:=EMA(VAR41,9);
VAR43:=BARSLAST(REF(CROSS(VAR41,VAR42),1));
VAR44:=REF(CLOSE,VAR43+1)>CLOSE AND REF(VAR41,VAR43+1)<VAR41 AND CROSS(VAR41,VAR42);
VAR45:=BARSLAST(REF(CROSS(VAR42,VAR41),1));
VAR46:=REF(CLOSE,VAR45+1)<CLOSE AND REF(VAR41,VAR45+1)>VAR41 AND CROSS(VAR42,VAR41);
MACD底背:IF(VAR44>0,(-0.1),0),NODRAW,COLORMAGENTA;
MACD顶背:IF(VAR46>0,0.1,0),NODRAW,COLORGREEN;
STICKLINE(VAR44>0,107,100,3,0),COLORMAGENTA;
STICKLINE(VAR46>0,107,100,3,0),COLORGREEN;
|