I have two set of classes to deal with Hedge and Netting accounts. My EA code is like below
CTradeHedge TradeHedge;
CTradeNetting TradeNetting;
// Default Value
CTradeHedge Trade
In all my functions I've used "Trade" identifier. Like this
Trade.SellStop(sym, vol, price, sl, tp);
Is it possible to set global "Trade" identifier based on account hedge type? I've tried changing it inside OnInit but it just becomes a local variable and the global variable doesn't change
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I have two set of classes to deal with Hedge and Netting accounts. My EA code is like below
In all my functions I've used "Trade" identifier. Like this
Is it possible to set global "Trade" identifier based on account hedge type? I've tried changing it inside OnInit but it just becomes a local variable and the global variable doesn't change