Hello. Can someone please help with this error?
Try returning different integer values instead of using INIT_FAILED everywhere. You will notice what is failing.
Hello. Can someone please help with this error?
I believe the error may be caused by one or more of the several classes from which you are attempting to create objects. I believe it will be necessary for you to troubleshoot each class to ensure object instantiation can be achieved from the given class.
Also print out the indicator name to locate the failure.
if(!RSI.Create(Symb.Name(), TimeFrame, RSIPeriod, RSIPrice)) printf("RSI"); return INIT_FAILED;
INIT_FAILED | Initialization failed. There is no point in continuing the test due to unavoidable errors. For example, it is impossible to create an indicator necessary for the EA operation. The return of this value means the same as returning the value different from zero – EA initialization in the tester failed. |
- www.mql5.com
I believe the error may be caused by one or more of the several classes from which you are attempting to create objects. I believe it will be necessary for you to troubleshoot each class to ensure object instantiation can be achieved from the given class.
INIT_FAILED | Initialization failed. There is no point in continuing the test due to unavoidable errors. For example, it is impossible to create an indicator necessary for the EA operation. The return of this value means the same as returning the value different from zero – EA initialization in the tester failed. |
It's not printing anything but thanks for your help
if(!RSI.Create(Symb.Name(), TimeFrame, RSIPeriod, RSIPrice)) printf("RSI"); return INIT_FAILED; //--- if(!CCI.Create(Symb.Name(), TimeFrame, CCIPeriod, CCIPrice)) printf("CCI"); return INIT_FAILED; //--- if(!ATR.Create(Symb.Name(), TimeFrame, ATRPeriod)) printf("ATR"); return INIT_FAILED; //--- if(!MACD.Create(Symb.Name(), TimeFrame, FastPeriod, SlowPeriod, SignalPeriod, MACDPrice)) printf("MACD"); return INIT_FAILED;
Max Brown #:
if(!RSI.Create(Symb.Name(), TimeFrame, RSIPeriod, RSIPrice)) printf("RSI"); return INIT_FAILED;
Also print out the indicator name to locate the failure.
No braces mean that init will always fail!
It should be
if(!RSI.Create(Symb.Name(), TimeFrame, RSIPeriod, RSIPrice)) { printf("RSI"); return INIT_FAILED; }
- 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. Can someone please help with this error?