So I'm still learning about Chart plots, and I'm wondering how much freedom/liberty we have when it comes to where the arrows, triangles, etc. are actually plotted/positioned on the chart. So for example, I have a simple pullback plot that I'm using:
Plot PBSMALL = If Close[2] >= open[2] * 1.065 AND close[1] >= open[1] AND Close[1] >= Close[2] AND (close[1] – open[1]) <= (0.15 * (close[2] – open[2])) then (open * 0.85) else Double.NaN;
PBSMALL.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
PBSMALL.SetLineWeight(5);
PBSMALL.SetDefaultColor(Color.MAGENTA);
This plots a magenta arrow on the chart at 85% of the value of the open of the current bar [0] when the previous two bars/candles meet the above criteria. I use 85% so that there is some space between the plotted arrow and the current running bar/candle.
This is OK, but what I'd really like to be able to do is "back plot" the arrow so that it appears under candle [1] rather than under the present candle[0]. I tried doing: "...then (open[1] * 0.85) else Double.NaN;" but this only adjusts the height of the position where the arrow is plotted (i.e. it vertically offsets it 85% from open[1] rather than from open[0]), and does not change the candle under which it appears (i.e. still @ [0] and not @ [1]).
Is there any way around this, or a clever trick to get the arrow to offset to the desired location/candle, once the "if" the criteria are met?
Thank you,
JRD
Plot PBSMALL = If Close[2] >= open[2] * 1.065 AND close[1] >= open[1] AND Close[1] >= Close[2] AND (close[1] – open[1]) <= (0.15 * (close[2] – open[2])) then (open * 0.85) else Double.NaN;
PBSMALL.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
PBSMALL.SetLineWeight(5);
PBSMALL.SetDefaultColor(Color.MAGENTA);
This plots a magenta arrow on the chart at 85% of the value of the open of the current bar [0] when the previous two bars/candles meet the above criteria. I use 85% so that there is some space between the plotted arrow and the current running bar/candle.
This is OK, but what I'd really like to be able to do is "back plot" the arrow so that it appears under candle [1] rather than under the present candle[0]. I tried doing: "...then (open[1] * 0.85) else Double.NaN;" but this only adjusts the height of the position where the arrow is plotted (i.e. it vertically offsets it 85% from open[1] rather than from open[0]), and does not change the candle under which it appears (i.e. still @ [0] and not @ [1]).
Is there any way around this, or a clever trick to get the arrow to offset to the desired location/candle, once the "if" the criteria are met?
Thank you,
JRD