Setup 1:
- At BarsInProgress = 0, CurrentBar = 179
- DrawDot() is run first.
- DrawDiamond() next.
- Conclusion - Correct observation - Diamond overlays Dot (Figure 1)
Setup 2:
- At BarsInProgress = 0, CurrentBar = 179
- DrawDot() is run first.
- DrawDiamond() next.
- At BarsInProgress = 0, CurrentBar = 180
- DrawDiamond() is run.
- Conclusion - Correct observation - Diamond overlays Dot at Bar 179 still. (Figure 2)
Setup 3:
- At BarsInProgress = 0, CurrentBar = 179
- DrawDot() is run first.
- DrawDiamond() next.
- At BarsInProgress = 0, CurrentBar = 180
- DrawDiamond() is run.
- At BarsInProgress = 0, CurrentBar = 182
- DrawDot() is run.
- Conclusion - Incorrect observation - Dot overlays Diamond at Bar 179. (Figure 3)
To reproduce this observation:
- Create a new Indicator
- In OnBarUpdate(), write the necessary draw statements
I attached the CS file for reference. ADebug.cs
Can anyone explain why is this happening?
Thank you.
Comment