Forum on trading, automated trading systems and testing trading strategies
Is this the proper way to check if an account is a hedging account?
Jose Francisco Casado Fernandez, 2017.09.30 01:46
Yes, it's all right. Also, you can use a separate function like this:
int OnInit() { if (!IsHedging) { Print("This is not a hedging account. This EA can only be run on hedging accounts!"); return (INIT_FAILED); } return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ bool IsHedging() { ENUM_ACCOUNT_MARGIN_MODE margmod = (ENUM_ACCOUNT_MARGIN_MODE)AccountInfoInteger(ACCOUNT_MARGIN_MODE); return(margmod==ACCOUNT_MARGIN_MODE_RETAIL_HEDGING); } //+------------------------------------------------------------------+
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
Can someone knows how get information about account info Hedging possibilities in mql5 ?
Thank you !
Ghen