I am using these 2 indicators.
There is a slight problem with the combination of these two.
When a position is closed, the trendplotter will draw a trendline ending where the position was closed.
Since the price can usually move above and below this point, the TrendlineAlert will trigger multiple times until the next candle is drawn.
To fix that I am trying to edit the TrendlineAlert indicator so that the trendline will end one candlestick before the said position. That way the price will not hit the trendline and will not trigger the alert.
ObjectCreate(label, OBJ_TREND, 0, t1, p1, t2, p2)
What can I add to t2 so that the trenline will end 1 bar before t2?
Or is there another way to go around this?