singapore
Posts: 131 since Nov 2009
Thanks Given: 11
Thanks Received: 7
|
Hi,
I'm trying to store values when the condition below is valid:-
[CODE]
if(CurrentBar < 5) return;
if (Math.Max(Close[2],High[1])>Math.Max(Close[1],High[0]) && Math.Max(Close[2],High[1])>Math.Max(Close[3],High[2]))
[CODE]
I've tried using a dataseries and upon "printing" (read: verifying) the values, it appears fine at the beginning of the chart (that is ignoring the zeroes that are generated when there is no valid point) but goes awry by the time we get to the more current bars (no more zeroes but actually successive points of reference which is not possible). Values appear to be plucked from the air appear in the dataseries.
What I'm trying to achieve:-
1) Get the data so that I can draw rays (see attached chart)
2) To draw a ray however, I need to be able to identify 2 points for the "bars ago" parameter and the values associated with those points.
3) The more current points can have multiple lines drawn through them from the older points provided the older points have a higher value that the current point.
Any suggestions?
Regards
Kay Wai
|