作者:彩虹 移动止赢就是到口的肉就不要吐出去了 哈哈和。。。 这样形容你明白吗? 其实也不是这个意思 是赢到尽头的意思 速成班不必学会怎样写Traingstop copy&Press就可以了 子程式如下: /////////////////////// void TrailingStop() { for(cnt=OrdersTotal();cnt>=0;cnt--) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() == Symbol() )//&& OrderMagicNumber()==MAGICMA) { if (OrderType()==OP_SELL) { if(TrailingStop>0) { if((OrderOpenPrice()-Ask)>(Point*TrailingStop)) { if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0)) { OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red); return(0); } } } } if (OrderType()==OP_BUY) { if(TrailingStop>0) { if(Bid-OrderOpenPrice()>Point*TrailingStop) { if(OrderStopLoss()<Bid-Point*TrailingStop) { OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green); return(0); } } } } } } }//end TrailingStop //////////////////////////////////// 这TrailingStop是可以一直用的 所以我们要加在start那边加 TrailingStop(); 发现新的词句 cnt TrailingStop 我们更正如下: int cnt; double TrailingStop=0; 按“编写” 0错误 0警告 厉害,哈哈和。。。 加入成功 把double TrailingStop=0; 0改成10,就可以操作了 改成这样也可以 extern double TrailingStop=10; 自己试一试看看效果如何? 怎样?容易吗? 哈哈和。。。 |
|