CheckTrailingStopShort

Prüft die Notwendigkeit Short-Position-Eigenschaften zu ändern.

virtual bool  CheckTrailingStopShort()

Rückgabewert

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

Hinweis

Prüft die Notwendigkeit die Parameter einer Short-Position zu ändern (Aufruf der CheckTrailingStopShort()-Methode des Trailing-Objekts). Wenn die Bedienung erfüllt ist, ändert sie die Short-Position-Parameter entsprechend den Einstellungen des Trailing-Objekts (Aufruf der Methode TrailingStopShort()).

Implementierung

//+------------------------------------------------------------------+
//| Check for trailing stop/profit short position                    |
//| INPUT:  no.                                                      |
//| OUTPUT: true-if trade operation processed, false otherwise.      |
//| REMARK: no.                                                      |
//+------------------------------------------------------------------+
bool CExpert::CheckTrailingStopShort()
  {
   double sl=EMPTY_VALUE;
   double tp=EMPTY_VALUE;
//--- check for short trailing stop operations
   if(m_trailing.CheckTrailingStopShort(GetPointer(m_position),sl,tp))
     {
      if(sl==EMPTY_VALUE) sl=m_position.StopLoss();
      if(tp==EMPTY_VALUE) tp=m_position.TakeProfit();
      //--- short trailing stop operations
      return(TrailingStopShort(sl,tp));
     }
//--- return without operations
   return(false);
  }