CloseLong

Schließt eine Long-Position.

virtual bool  CloseLong(
   double    price    // Preis
   )

Parameter

price

[in] Markteintrittspreis.

Rückgabewert

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

Hinweis

Schließt eine Long-Position (Aufruf der Methode von Handelsobjekt Sell(...)).

Implementierung

//+------------------------------------------------------------------+
//| Long position close                                              |
//| INPUT:  price - price for close.                                 |
//| OUTPUT: true-if trade operation processed, false otherwise.      |
//| REMARK: no.                                                      |
//+------------------------------------------------------------------+
bool CExpert::CloseLong(double price)
  {
   if(price==EMPTY_VALUEreturn(false);
//---
   return(m_trade.Sell(m_position.Volume(),price,0,0));
  }