DiscontinuousLine and Points
DiscontinuousLine and Points
13 Nov 2013, 17:36
My indicator draws a DiscontinuousLine. Each lines ends in a Point, marking to trade, or not to trade, because that is the question.
Now my robot should act on that line, but the question is: what is de value of a DiscontinuousLine or Point if there is none drawn by the indicator for that specific bar or tick?
Replies
jeex
15 Nov 2013, 13:12
Correction
Testing proved me wrong. the value is NaN if not drawn, but somehow, it remains NaN if a line is drawn afterwards, like in this example
public override void Calculate(int index) { .... stepsback = index - 4; for (int x = stepsback; x <= index; x++) { drawDisLine(x, value_Y); } }
Here the value when tested remains NaN for the first 4 steps, only the step with x=index has a numeric value, while the line is actually visible for all 5 steps.
So drawing a line afterwards, gives an ambiguous result: visible but not valid.
@jeex
jeex
14 Nov 2013, 10:55
Addition
In addition to the question: is there a way to establish if a DiscontinuousLine or Point is drawn or not?
@jeex