Unfortunately I can not solve a problem and ask for support.
In a chart Write, I set calculations that I want to use in another chart Read.
For the sake of simplicity we assume that in chart Write with 1000 bars I count a counter from 1 to 1000.
My (public static int) WriteArray [0] correctly displays these numbers for every bar from 1 - 1000.
I would now like to use the result of this calculation in chart Read (1000 bars).
I assign ReadArray = Write.WriteArray and get the value 1000.
(ReadArray [0] = Write.WriteArray [0] returns the value 0.)
The chart Read should represent all (!) Numbers from 1 - 1000 from bar 1 to bar 1000.
I tried to read the ReadArray or the Write.WriteArray with the methods
for (int i = 0; i <(..) Array.Length; i ++) {...}
foreach {...}
while {...}
But I always only get the last value 1000 in chart Read.
If I print in the chart Read Write.WriteArray [x] at the position x (x = 100, 500, ...), I always get 0;
Is it possible that the data will be lost? On the other hand the last value 1000 is present.
The problem should be in the historical assignment. (State == State.Historical) does not solve the problem.
My WriteArray is one-dimensional and contains no further indexing.
Because the number of bars in both charts is identical, I tried to synchronize the arrays with a counter in the chart read.
Unfortunately, without success: chart Read tries to load the data and gets no result ....
I am thankful for every hint!
Comment