In the attached screen clippings, you will see that I'm calling a RenderCandleNumber method, and passing in an args object with args.BarsAgo equal to 1 - I clicked the second last candle (the green one in the second clipping)
I'm passing the args.BarsAgo value as the int barsAgo parameter of DrawText. I'm passing Low[args.BarsAgo] as the double y parameter to DrawText. The value is 1, so I expect it to print on the second bar from the end, and at the low of that bar.
However as you will see in the attached screenshots, when clicking on the green candle indicated by the crosshair, the x-coordinate is printed as expected, beneath said candle. But the Y-coordinate is not at the low of that candle... it is actually at the low of the bar beside it.
entering _indicator.Low[args.BarsAgo - 1] for the Y position and args.BarsAgo for the X position has the desired effect.
I'm very confused. It seems that "bars ago" means one thing to Low and another thing to drawtext. Could someone explain?
Comment