TrailingStopLong

Ändert die Eigenschaften einer Long-Position.

virtual bool  TrailingStopLong(
   double    sl,    // Preis von Stop Loss
   double    tp,    // Preis von Take Profit
   )

Parameter

sl

[in] Preis von Stop Loss.

tp

[in] Preis von Take Profit.

Rückgabewert

Gibt true zurück wenn eine Operation ausgeführt ist, ansonsten gibt false zurück.

Hinweis

Ändert die Position (Aufruf der Methode PositionModify() eines Handelsobjekts).

Implementierung

//+------------------------------------------------------------------+
//| Trailing stop/profit long position                               |
//| INPUT:  sl - new stop loss,                                      |
//|         tp - new take profit.                                    |
//| OUTPUT: true-if trade operation successful, false otherwise.     |
//| REMARK: no.                                                      |
//+------------------------------------------------------------------+
bool CExpert::TrailingStopLong(double sl,double tp)
  {
   return(m_trade.PositionModify(m_symbol.Name(),sl,tp));
  }