Hedge_Buy

Reference tnarrow Trade Functions tnarrow Hedge_Buy

HEDGE_BUY

Hedge all Buy Orders in a strategy session.

(Hedge_Buy)

Calling this function hedges all buy orders in the session. An equivalent Sell orders are instantly traded. If Hedge Magnitude of the session is greater than 1, the sell orders are multiplied by this magnitude. If we call this function and after we perform a Buy Order, by calling again this function it adjusts the hedge only by the difference.

  


Parameters

none

Returned value

none

Example:

(IF (AndS PROGRESS S_BUY P_H1)
(IF (>= T_HEDGESELLPROFIT 0)
(CLOSE_HEDGE_BUY)
)
(ELSE (IF (< T_PROFITBUY -500)
(HEDGE_BUY)
)
)
)