I have a general question so maybe you can point me the right direction. Let's say that I download an indicator that looks for divergence criteria and when met, paints a line on the chart for Longs and Shorts. How can I modify the code for this indicator to return something to my strategy so I can check for the Long or Short signal?
If there are any examples that I could look at for reference, that will work too.
I've attached the indicator, for reference.
In 2 sections of this indicator, I see the code that draws the lines:
Line 450:
///SHOWS DIVERGENCE LINES ON BOTTOM OF PRICE CANDLES
Draw.Line(this, "low"+CurrentBar.ToString() + BarsAgo.ToString(), true, BarsAgo, Low[BarsAgo] - (TickSize * MarkerDistanceFactor),
A, Low[A] - (TickSize * MarkerDistanceFactor), DivergenceColor, DivergenceDashStyle, DivergenceLineWidth);
Line 494:
///SHOWS DIVERGENCE LINES ON BOTTOME OF INDICATOR HISTOGRAM
Draw.Line(this, "Ilow"+CurrentBar.ToString() + BarsAgo.ToString(), true, BarsAgo, Indicator[BarsAgo],
A, Indicator[A], divergenceColor, divergenceDashStyle, divergenceLineWidth);
Would I put some sort of Return line in these sections somewhere?
Thank you!
Comment