|
ReverseLong
Performs reverse operation of a long position.
virtual bool ReverseLong(
|
Parameters
price
[in] Market entry price.
sl
[in] Stop Loss price.
tp
[in] Take Profit price.
Return Value
true - trade operation has been executed, otherwise - false.
Note
It gets the position reverse volume (LotReverse() method) and reverses a long position (Sell() method of Trade object) if trading volume is not equal to 0.
In the "hedging" mode of position accounting, position reversal is performed as the closure of the existing position and opening of a new opposite one with the remaining volume.
Implementation
//+------------------------------------------------------------------+ |