红色涨,绿色跌,本指标从淘宝网购买很好用的
//VAR1:=(HHV(HIGH,12) - LLV(LOW,12));
//VAR2:=(HHV(HIGH,12) - CLOSE);
//VAR3:=(CLOSE - LLV(LOW,N));
//VAR4:=(((VAR2 / VAR1) * 100) - 0);
//VAR5:=(((CLOSE - LLV(LOW,60)) / (HHV(HIGH,60) - LLV(LOW,60))) * 100);
//VAR6:=((((3 * CLOSE) + HIGH) + LOW) / 5);
VAR6:=((((3* REF(CLOSE,1)) + REF(HIGH,1)) + REF(LOW,1))/ 5);
//VAR7:=SMA(((VAR3 / VAR1) * 100),3,1);
VAR8:=LLV(LOW,24);
//VAR9:=(SMA(VAR7,3,1) - SmA(VAR4,9,1));
//VAR10:=IF((VAR9 > 100),(VAR9 - 100),0);
VAR11:=HHV(REF(HIGH,1),24);
VAR12:=EMA((((VAR6 - VAR8) / (VAR11 - VAR8))*10000),12);
VAR13:=EMA(((0.61803 * REF(VAR12,1)) + (0.38197 * VAR12)),2);
STICKLINE(((VAR12 - VAR13) > 0),VAR12,VAR13,8,0), colorred;
STICKLINE(((VAR12 - VAR13) < 0),VAR12,VAR13,8,0), colorcyan;
//低位绿变红看多:EMA(VAR13,5), colorred;
//高位红变绿减仓:99, colorcyan;
A1:10000;
A2:0;
IF(VAR12>VAR13)
{
TIPTEXT(var12/var13<1.02,var13,"SOS");
}
IF(VAR12<VAR13)
{
TIPTEXT(var12/var13>0.98,var13,"SOS");
}
//A3:50;
//A4:80;
//A5:20;
//A6:VAR12;
//A7:VAR13;
//IF(VAR12<2000)
// {
//DRAWNUMBER(CROSS(VAR12,VAR13),VAR13-2,O);
// IF(CROSS(VAR12,VAR13))
// BUY;
//}
//IF(VAR12>8000)
//{ DRAWNUMBER(CROSS(VAR13,VAR12),VAR12+2,O);
// IF(CROSS(VAR13,VAR12))
// SELL;
//}
IF(VAR12<13120)
{
DRAWNUMBER(CROSS(VAR12,VAR13),VAR13-2,O);
IF(CROSS(VAR12,VAR13))
BUY;
}
IF(VAR12>0.6880)
{ DRAWNUMBER(CROSS(VAR13,VAR12),VAR12+2,O);
IF(CROSS(VAR13,VAR12))
SELL;
}