hello everyone,
I found for anyone a problem to solve (you are welcome XD), for who likes brain/coding exercices :
Attached is a MTF indicator sample that plots one Sma for each added DataSeries ( 2 added series + the Primary = 3 series).
The goal is to allow the user -from the indicator window- to on/off switch the plots, AND/OR the added series (implying an on/off switch of the plots too).
We could add the series by default whithout any enabling parameter, and just on/off switch the plots only, but instead we try to have the option to eventually not add another series at all (for performance purposes for example).
In the sample below, if we enable all parameters, the plots are functioning great.
But if we disable isSc1On ("is scale 1 on"), then we cause an outside the bounds of the array error.
This is due to the Closes[1] disapearance, causing Closes[2] to become Closes[1]. (but Closes[2] is not written Closes[1]... )
Would anyone be able to tell and show us a trick, to make the disabling of a secondary an available option ?
Is this just not possible ?
Comment