//+------------------------------------------------------------------+
//| トレイリング売りリミット/ストップ注文 |
//| 入力:delta - price change. |
//| 出力:取引操作が処理された場合は true、 それ以外の場合は false |
//| メモ:なし |
//+------------------------------------------------------------------+
bool CExpert::TrailingOrderShort(double delta)
{
ulong ticket=m_order.Ticket();
double price =m_order.PriceOpen()-delta;
double sl =m_order.StopLoss()-delta;
double tp =m_order.TakeProfit()-delta;
//--- modifying the short order
return(m_trade.OrderModify(ticket,price,sl,tp,m_order.TypeTime(),m_order.TimeExpiration()));
}
|