Eg:
81.123456789
82.987654321
These are 'doubles' and need to be doubles in structure.
Then in another indicator I bring this data in and this plots a line on a panel below panel 1.
(Sinewave line). All working fine.
What I am trying to accomplish is compare this outputted data i.e. 81.123456789 for a particular bar (lets say the current bar [0]) with the previous bar [1].
Then I can run a compare script to check that the previous bar data point is the same or different than the current.
Example: if(thisbar[0] == previousbar[1])
'Do something'
What Im struggling with is the best, most elegant method to capture the data from my custom indicator so I can compare it against previous bars.
I wish to run the compare code in the receiving indicator not the transmit indicator.
I've tried using a variable of my data and using 'indexing' like thisbar[0] or thatbar[1] but I get an error saying that you can't run indexing with doubles.
Hoping for some direction. Thank you.
Comment