CloseShort

Schließt eine Short-Position.

virtual bool  CloseShort(
   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 Short-Position (Aufruf der Methode von Handelsobjekt Buy(...)).

Implementierung

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