- Init
- Magic
- InitSignal
- InitTrailing
- InitMoney
- InitTrade
- Deinit
- OnTickProcess
- OnTradeProcess
- OnTimerProcess
- OnChartEventProcess
- OnBookEventProcess
- MaxOrders
- Signal
- ValidationSettings
- InitIndicators
- OnTick
- OnTrade
- OnTimer
- OnChartEvent
- OnBookEvent
- InitParameters
- DeinitTrade
- DeinitSignal
- DeinitTrailing
- DeinitMoney
- DeinitIndicators
- Refresh
- Processing
- SelectPosition
- CheckOpen
- CheckOpenLong
- CheckOpenShort
- OpenLong
- OpenShort
- CheckReverse
- CheckReverseLong
- CheckReverseShort
- ReverseLong
- ReverseShort
- CheckClose
- CheckCloseLong
- CheckCloseShort
- CloseAll
- Close
- CloseLong
- CloseShort
- CheckTrailingStop
- CheckTrailingStopLong
- CheckTrailingStopShort
- TrailingStopLong
- TrailingStopShort
- CheckTrailingOrderLong
- CheckTrailingOrderShort
- TrailingOrderLong
- TrailingOrderShort
- CheckDeleteOrderLong
- CheckDeleteOrderShort
- DeleteOrders
- DeleteOrder
- DeleteOrderLong
- DeleteOrderShort
- LotOpenLong
- LotOpenShort
- LotReverse
- PrepareHistoryDate
- HistoryPoint
- CheckTradeState
- WaitEvent
- NoWaitEvent
- TradeEventPositionStopTake
- TradeEventOrderTriggered
- TradeEventPositionOpened
- TradeEventPositionVolumeChanged
- TradeEventPositionModified
- TradeEventPositionClosed
- TradeEventOrderPlaced
- TradeEventOrderModified
- TradeEventOrderDeleted
- TradeEventNotIdentified
- TimeframeAdd
- TimeframesFlags
ReverseShort
Performs reverse operation of a short position.
virtual bool ReverseShort(
|
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 position reverse volume (LotReverse(...) method) and perform trade operation of the short position reverse (Buy() 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
//+------------------------------------------------------------------+ |