When indicator parameter changes, values of an array remain same as before

 
Hello.
I want to plot some indicator lines and sometimes add or remove some of them.
For this, i using an 2D array that each column filling a buffer in calculate method.
How and where should i declare this Array[][] so that when i change indicator parameters , values and calculations of this array remain same as before ? because i dont want to just for removing a line all calculations run again.
 

The buffer for indicator (lines) can only be one dimensional.

For your purpose you have to use several (2) indicator buffer.

 
Carl Schreiber:

The buffer for indicator (lines) can only be one dimensional.

For your purpose you have to use several (2) indicator buffer.



Each column of my 2D array Assign to one buffer . i had never say multidimensional buffer

 
Alireza Rezaee:

Each column of my 2D array Assign to one buffer . i had never say multidimensional buffer

Array[][]  == Multidimensional.


Array[] == Single (2D).

 

<< i had never say multidimensional buffer >>

Hey guys
Question is absolutely clear
My question wasn't about arrays, absolutely nothing to do with arrays, forget arrays.
Nobody here can answer my question?


"I want to plot some indicator lines and sometimes add or remove some of them.
For this, i using an 2D array that each column filling a buffer in calculate method.
How and where should i declare this Array[][] so that when i change indicator parameters , values and calculations of this array remain same as before ? because i dont want to just for removing a line all calculations run again."

How should i declare this "Variable" so that when i change indicator parameters , values and calculations of this "Variable" remain same as before ?

 
Alireza Rezaee:

<< i had never say multidimensional buffer >>

Hey guys
Question is absolutely clear
My question wasn't about arrays, absolutely nothing to do with arrays, forget arrays.
Nobody here can answer my question?


"I want to plot some indicator lines and sometimes add or remove some of them.
For this, i using an 2D array that each column filling a buffer in calculate method.
How and where should i declare this Array[][] so that when i change indicator parameters , values and calculations of this array remain same as before ? because i dont want to just for removing a line all calculations run again."

How should i declare this "Variable" so that when i change indicator parameters , values and calculations of this "Variable" remain same as before ?

Save the array to a file and restore it on init
 
Mladen Rakic:
Save the array to a file and restore it on init
although it needs some work but i consider this for last way , if there is no other way possible.
 
Alireza Rezaee:
although it needs some work but i consider this for last way , if there is no other way possible.

Some work?

All you need is two lines of code :

   FileWriteArray()
   FileReadArray()

 
Mladen Rakic:

Some work?

All you need is two lines of code :

   FileWriteArray()
   FileReadArray()

Sure , its so useful and simple specifically when using for objectives i mentioned above.(instant changes  in single timeframe).

but when it comes to multi timeframe charts and new bars receives , i should consider which is best and fastest ? calculate algorithm over and over again or just write or read arrays  for all time frames and repeat it when new bars comes.

Reason: