Franzel Botha:
I got this EA we wrote
been testing it on demo accounts and works great.
But for some reason it does not trade on my real account
- Who's we? Why aren't you asking them?
- So you didn't find all the bugs, no supprise there?
- We are not going to debug your
hundreds of lines of code. Use the debugger or print out your variables,
including _LastError
and
find out why.
OrderSelect( i, SELECT_BY_POS, MODE_TRADES ); return OrderSend(Symbol(),order_type,lot,price,10,sl,tp,StringConcatenate(magic_number+" "+Symbol()),magic_number,0,clrNONE);
Check your return codes for errors, report them and you would know why. Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
Only those functions that return a value (e.g. iClose, MarketInfo, etc.) must you call ResetLastError before in order to check after.
- Who's we? Why aren't you asking them?
- So you didn't find all the bugs, no supprise there?
- We are not going to debug your hundreds of lines of code. Use the debugger or print out your variables, including _LastError and find out why.
No need to be rude.
1. a family member and I did the project together and we got stuck.
2. there are no bugs when the indicators are loaded and the EA works %100 on a demo account. just refuses to trade on real account.
3. I am not asking for anyone to debug the Coding. I want to know if I need to insert a specific command so that it will trade on a real account.
sorry but he was rude.
I just asked a simple question and he bombarded me.
He usually does so (bombard), but only in order to help.
He usually does so (bombard), but only in order to help.
could have done it in a more presentable way though. but its ok. I apologize.
One of the inaccuracies.
OrderSelect( i, SELECT_BY_POS, MODE_TRADES );
It will be more correct
if( !OrderSelect( i, SELECT_BY_POS, MODE_TRADES ) ) continue;And so all OrderSelect
One of the inaccuracies.
It will be more correct
great. thank you for the indication
One of the inaccuracies.
It will be more correct
I cleaned up the code and did as you said Thank you so much for the direction. I am only sitting with these two warnings now.
you maybe got any idea what it could be?
Stating the first one at the first magic number
implicit conversion from 'number' to 'string' Super MA Quantum v7 MA200.mq4 208 78
Stating the second one
possible use of uninitialized variable 'lastTradeTime' Super MA Quantum v7 MA200.mq4 270 8
return OrderSend(Symbol(),order_type,lot,price,10,sl,tp,StringConcatenate(magic_number+" "+Symbol()),magic_number,0,clrNONE); return lastTradeTime;
return lastTradeTime=0;

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is there any instructions required for the EA to work on a real account?
I have tested it with the Indicators as well over and over.
But for some reason it does not trade on my real account