同花顺天地人公式
收盘价短期均线向上突破长期均线,买入信号。收盘价短期均线向下跌破长期均线,卖出信号。
参数:SHORT 短期天数 LONG 长期天数
源码
IF((short+5)<=LONG AND CROSS(MA(CLOSE,SHORT),MA(CLOSE,LONG)))
BUY;
IF((short+5)<=LONG AND CROSS(MA(CLOSE,LONG),MA(CLOSE,SHORT)))
SELL;
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
UPPERL: MA(HIGH,30)*(1+15/100),colorwhite;
LOWERL: MA(LOW,30)*(1-15/100),COLOR00FF00;
MA25:MA(CLOSE,M5),colorred,LINETHICK2;
TY:=C;
AA1:=REF(TY,10)=HHV(TY,2*10+1); BB1:=FILTER(AA1,10); C1:=BACKSET(BB1,10+1); HD:=FILTER(C1,10);
AA2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(AA2,10); CC2:=BACKSET(B2,10+1); LD:=FILTER(CC2,10);
前期高位:REF(H,BARSLAST(HD)),COLOR00FF00,POINTDOT,LINETHICK3;
前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,POINTDOT,LINETHICK3;