I am using AddPlot to draw an indicator into my price chart which I use as a trailing stop-loss. Please ignore the numbers below the bars, they are only for debugging purposes and visible in this screenshot. In the shown example the trailing stop line jumps above the bar because the trend has reversed:
This jump is drawn but I want to skip this part. I have shown it with yellow color in the above screenshot for better visualization. How can I remove/skip this yellow part of my plot? My goal is to have a gap at this bar. The code I use for drawing the line is simply:
[...]
protected override void OnBarUpdate()
{
if (CurrentBar < 2) return;
{
[...]
if ( trendDir == 1 )
trail = Low[1];
if ( trendDir == -1 )
trail = High[1];
Value[0] = trail;
How can I solve this? any help appreciated.
Thanks in advance.

Comment