- extern int 警戒均线=60;
- int mark=0;
- int start()
- {
- if( iHigh(0,0,0) >= iMA(0,0,警戒均线,0,MODE_EMA,PRICE_CLOSE,0)
- && iHigh(0,0,1) < iMA(0,0,警戒均线,0,MODE_EMA,PRICE_CLOSE,1)
- && mark != 1 )
- {
- Alert(Symbol(),"向上触及",警戒均线,"均线");
- mark = 1;
- }
- if( iLow(0,0,0) <= iMA(0,0,警戒均线,0,MODE_EMA,PRICE_CLOSE,0)
- && iLow(0,0,1) > iMA(0,0,警戒均线,0,MODE_EMA,PRICE_CLOSE,1)
- && mark != 2 )
- {
- Alert(Symbol(),"向下触及",警戒均线,"均线");
- mark = 2;
- }
- return(0);
- }
复制代码
|