The code has nothing to do with your tester errors. You have not downloaded history for all lower timeframes.
Why did you post your MT4 question in the MT5 EA section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon.
The code has nothing to do with your tester errors. You have not downloaded history for all lower timeframes.
Why did you post your MT4 question in the MT5 EA section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon.
Hi Williams!
I have updated the History of the pair and when performing the backtesting no operation has been opened for me and this is the backtestig report, why does it not open operations for me? Where is the error?
Many thanks in advance.
if(OrderSend(NULL,Type,Lotes,Precio,10,SL,0,Comentario + _Symbol + Tipo,MagicNumber,0,clrNONE) < 1)
Be careful with NULL.
- On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
- Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
- Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
- MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
- Cloud Protector Bug? - MQL4 programming forum (2020)
Be careful with NULL.
- On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
- Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
- Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
- MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
- Cloud Protector Bug? - MQL4 programming forum (2020)
Thanks a lot.
All the best.
int OnInit(){ PriceLow1 = iCustom(NULL, PERIOD_CURRENT, "..\\Indicators\\MultiZigZag_V4", "12,12,12", "5,5,5", "8,8,8", "225000,45000,1000", "1,5,60", 3, 0, vela);don't try to use any price (or indicator) or server related functions in OnInit (or on load or in OnTimer before you've received a tick), as there may be no connection/chart yet:
- Terminal starts.
- Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
- OnInit is called.
- For indicators OnCalculate is called with any existing history.
- Human may have to enter password, connection to server begins.
- New history is received, OnCalculate called again.
- A new tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent, account information and prices are valid.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone!
I need help, I have made an Expert Advisor, and in my opinion it should not have problems but when I go through Backtesting, it gives me some errors that I am not aware of and that I cannot find in Metacuotes to solve it either. Could someone help me and tell me where I have made the mistake of the code?
I attach the code and a photo of the errors it gives me.