Hello, I coded what was supposed to be a simple indicator to add specific indicators to the chart, unfortunately when I change the period or timeframe of any of the indicators, it duplicates,
I checked on the forum for a solution and was told to add the indicators in the OnInit, I have done so but issue persists.
Please this is the complete indicator, can you let me know what is wrong?
Thanks.
You just can't suppose you will get the handle of an indicator remaining on the chart this way.
Already discussed on the forum. You need to search if you want more details.
You just can't suppose you will get the handle of an indicator remaining on the chart this way.
Already discussed on the forum. You need to search if you want more details.
Dominik said how to proceed in general.
I don't know what you are expecting to do, so I can't say anything about a solution.
If I use deinit, when I change indicator periods and go to a different timeframe, the period changes to default.
Is there no way to avoid this?
That’s my question
If I use deinit, when I change indicator periods and go to a different timeframe, the period changes to default.
Is there no way to avoid this?
That’s my question
hmm. I did this instead and it solved the problem... or so it seems.
But thank you Dominik, you always help out.
int number = ChartIndicatorsTotal(0,0); Print(number); if(number<2)
- 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, I coded what was supposed to be a simple indicator to add specific indicators to the chart, unfortunately when I change the period or timeframe of any of the indicators, it duplicates,
I checked on the forum for a solution and was told to add the indicators in the OnInit, I have done so but issue persists.
Please this is the complete indicator, can you let me know what is wrong?
Thanks.