What you posted here is an EA not an indicator. The code provided in the documentation (your link) is a script, not an indicator. You can't mix all type of programs.
you're right! But how can I get IndicatorParameters inside an EA?
Is this not possible?
you're right! But how can I get IndicatorParameters inside an EA?
Is this not possible?
Of course it's possible. Your EA seems ok, provided that you define/save/run it as an EA.
Of course it's possible. Your EA seems ok, provided that you define/save/run it as an EA.
Good. But it give me error 4014, why? (I defined/saved/run it as an EA)
Do you read and understand what I wrote ? Where is located your mq5 file ?
You never mentioned error (4014) was in the tester up to now...I guess I have to read your mind. Will check.
I'm used to code EA, so I know what I'm doing. I have this error in tester. If I attached it to the chart I have error 4006...
- After some tests. You can get rid of error 4006 by using GetLastError() function only when there is an error with IndicatorParameters()
if(params==-1) Print("Last error:",GetLastError());
But it's weird that GetLastError() reports an error when there is not.
- About Strategy Tester. IndicatorParameters() doesn't work, which seems logical as there is no point to use a function to retrieve indicator's parameters when you can only use your own indicator (and so your are supposed to know the parameters).
ERR_FUNCTION_NOT_ALLOWED |
System function is not allowed to call |
- After some tests. You can get rid of error 4006 by using GetLastError() function only when there is an error with IndicatorParameters()
But it's weird that GetLastError() reports an error when there is not.
- About Strategy Tester. IndicatorParameters() doesn't work, which seems logical as there is no point to use a function to retrieve indicator's parameters when you can only use your own indicator (and so your are supposed to know the parameters).
ERR_FUNCTION_NOT_ALLOWED |
System function is not allowed to call |
Thank you very much, really appreciated. I was using this function because I want to use the same indicator with different parameters (variable parameters), but I don't want to use IndicatorRelease if I'm using the same parameters.
Thnks again!
- 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, this code, when run, give me error 4014. Can you guess why? I copied it from https://www.mql5.com/en/docs/series/indicatorparameters
Thanks