To use selltlement filter not to trade close to settlement lines Pluse 20 Ticks ,
I want to add in my custom strategy.
in strategy i have
private settlementLines mySetLines;
on dataloaded
mySetLines= settlementLines();
on bar update
double dist = Math.abs(settlementLines.Settlement[0] - Close[0])
Indicator plots these values
AddPlot(new Stroke(Brushes.Cyan, 2), PlotStyle.Hash, "Settlement");
AddPlot(new Stroke(Brushes.HotPink, 2), PlotStyle.Hash, "Prior Settlement");
in Logic for Long
if (close[0] > open[0]) && (dist >= 20 * TickSize)
Go Long
Is this the right way of doing it? its not working on my end.
Also are settlement lines backtestable?
Comment