Hi,
I am trying to write a script that would plot a series. The issue here is the following:
Lets say I have 100 bars on the chart and am currently on bar 0. If I loop through all the historical bars (-1 to -99) and calculate a value y1 and y2, I will have 100 different y1 and y2 values. I can then calculate the sum y3 = y1+y2 to get 100 y3 values. If I were to draw these y1, y2 and y3 values, on their respective historical bars, I would get a plot that would update on each new bar. How would I do this using a series? The issue is that I am not sure how to build a series from an array of values that changes on each new bar. Any suggestions would be greatly appreciated. Thank you very much.
Regards,
Jane
I am trying to write a script that would plot a series. The issue here is the following:
Lets say I have 100 bars on the chart and am currently on bar 0. If I loop through all the historical bars (-1 to -99) and calculate a value y1 and y2, I will have 100 different y1 and y2 values. I can then calculate the sum y3 = y1+y2 to get 100 y3 values. If I were to draw these y1, y2 and y3 values, on their respective historical bars, I would get a plot that would update on each new bar. How would I do this using a series? The issue is that I am not sure how to build a series from an array of values that changes on each new bar. Any suggestions would be greatly appreciated. Thank you very much.
Regards,
Jane
Comment