-
if(OrdersTotal() == 0)
Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.)
Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 and MetaTrader 4 - MQL4 programming forum -
OrderSend(Symbol(),OP_BUY,LotSize,Ask,3,OrderOpenPrice()-Pips*SL,OrderOpenPrice()+Pips*TP,NULL,0,0,Green);
Check your return codes for errors and report them.
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 - You can not use any
Trade Functions until you select an order.
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
Hey guys,
I wanted to build a really simple EA based on MT4's built-in Pivot Points indicator that would sell if prices reach resistance levels and buy if they reach support levels. I have not used the iCustom function a lot and so that might be why it does not work although I am not sure since the S & R levels seem to appear fine when I try to backtest the EA. The problem is that the EA won't enter any trades even if the conditions are met.
Here is what I have as a foundation for the strategy:
Any ideas as to why it can't trade?
Thanks a lot!