Thanks for sharing.
To solve the mini account use this code insted of yours
int GenerateMagicNoNumber(int seed, string symbol, int timeFrame)
{
int isymbol = 0;
if (StringFind(symbol,"EURUSD")>=0>=0) isymbol = 1;
else if (StringFind(symbol,"GBPUSD")>=0) isymbol = 2;
else if (StringFind(symbol,"USDJPY")>=0) isymbol = 3;
else if (StringFind(symbol,"USDCHF")>=0) isymbol = 4;
else if (StringFind(symbol,"AUDUSD")>=0) isymbol = 5;
else if (StringFind(symbol,"USDCAD")>=0) isymbol = 6;
else if (StringFind(symbol,"EURGBP")>=0) isymbol = 7;
else if (StringFind(symbol,"EURJPY")>=0) isymbol = 8;
else if (StringFind(symbol,"EURCHF")>=0) isymbol = 9;
else if (StringFind(symbol,"EURAUD")>=0) isymbol = 10;
else if (StringFind(symbol,"EURCAD")>=0) isymbol = 11;
else if (StringFind(symbol,"GBPUSD")>=0) isymbol = 12;
else if (StringFind(symbol,"GBPJPY")>=0) isymbol = 13;
else if (StringFind(symbol,"GBPCHF")>=0) isymbol = 14;
else if (StringFind(symbol,"GBPAUD")>=0) isymbol = 15;
else if (StringFind(symbol,"GBPCAD")>=0) isymbol = 16;
return (StrToInteger(StringConcatenate(seed, isymbol, timeFrame)));
}Thanks for sharing.
To solve the mini account use this code insted of yours
int GenerateMagicNoNumber(int seed, string symbol, int timeFrame)
{
int isymbol = 0;
if (StringFind(symbol,"EURUSD")>=0>=0) isymbol = 1;
else if (StringFind(symbol,"GBPUSD")>=0) isymbol = 2;
else if (StringFind(symbol,"USDJPY")>=0) isymbol = 3;
else if (StringFind(symbol,"USDCHF")>=0) isymbol = 4;
else if (StringFind(symbol,"AUDUSD")>=0) isymbol = 5;
else if (StringFind(symbol,"USDCAD")>=0) isymbol = 6;
else if (StringFind(symbol,"EURGBP")>=0) isymbol = 7;
else if (StringFind(symbol,"EURJPY")>=0) isymbol = 8;
else if (StringFind(symbol,"EURCHF")>=0) isymbol = 9;
else if (StringFind(symbol,"EURAUD")>=0) isymbol = 10;
else if (StringFind(symbol,"EURCAD")>=0) isymbol = 11;
else if (StringFind(symbol,"GBPUSD")>=0) isymbol = 12;
else if (StringFind(symbol,"GBPJPY")>=0) isymbol = 13;
else if (StringFind(symbol,"GBPCHF")>=0) isymbol = 14;
else if (StringFind(symbol,"GBPAUD")>=0) isymbol = 15;
else if (StringFind(symbol,"GBPCAD")>=0) isymbol = 16;
return (StrToInteger(StringConcatenate(seed, isymbol, timeFrame)));
}It will not work at IBFX mini account. The crosses at IBFX is Ex. EURUSDm and not EURUSD for mini accounts.
It will not work at IBFX mini account. The crosses at IBFX is Ex. EURUSDm and not EURUSD for mini accounts.
I know that, thats why I am testing if the string is found.
StringFind will return >= 0 if find a substring within a string. Since EURUSD can be found in EURUSD and in EURUSDm you don't have to warry if the account is mini or not. It will work on both
I know that, thats why I am testing if the string is found. StringFind will return >= 0 if find a substring within a string. Since EURUSD can be found in EURUSD and in EURUSDm you don't have to warry if the account is mini or not. It will work on both
Thank you I will test with the new code.
Roets
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi there,
I have programmed the following EA to trade over a longer term. The EA have showed in backtesting to be profitable. The EA works on H1 and maybe higher timeframes. The EA is programmed to work on mini accounts. If you want to let it work on full account you must delete the "m" at the end of each cross in the code to make the Magic numbers.
Backtest Stats
Account growth over 4 months = 90%
Average drawdown over 4 months = 5.3%
Average pip per day = 22 pips
Average profitable trades = 67%
The above results was without MM.
Can you guys and gals test this EA on demo accounts. Maybe we can share our results and improve the EA.
I have found that if you add to many indicators and checks you dont get very var with an EA. We need to make it as simple as possible.
I will start forward testing on demo account from today.