A line drawn on a chart looks like ink. It is not. On most platforms it is a set of coordinates the platform stores and redraws every time the chart moves, and the way those coordinates are stored explains many of the odd things drawings do: jumping after a rollover, landing on the wrong bar after a timezone change, vanishing on a different interval.
Anchors, not pixels
On most charting platforms, NinjaTrader 8 included, a drawing object is a set of anchors, and each anchor is usually a time and a price. Some objects, such as a horizontal line, use price only. When you drag a trend line, you are moving two of those pairs; the platform converts them to screen positions on every paint using the chart's current scale and scroll. Zoom, and the pixels change but the anchors do not. Scroll a year back, and the line is still exactly where its times and prices say, whether or not it is in view. Why that conversion changes a line's apparent angle is covered in why chart scaling changes a drawn angle; how an anchor is chosen when you click is in what chart snapping actually locks onto.
Why it can move on its own
- Rollover. The anchor's price was set on one contract. When the chart moves to the next one, the same price is a different level relative to the bars, and a back-adjusted chart shifts every historical bar by the roll gap while the drawing stays put.
- Timezone. The anchor's time is stored as an instant. Change the chart's display timezone and the bars move to new clock labels; the anchor lands on the same instant, which now sits under a different label.
- Non-time bars. On tick, volume and range charts the horizontal axis is not evenly spaced in time. An anchor at a given instant lands on whichever bar contains that instant, so the same line looks different on a range chart than on a minute chart.
- Session templates. If the anchor's time falls in hours the template does not show, the platform has to put it somewhere. Different platforms make different choices, and a line can appear to bend or stretch.
What is stored, and where
In NinjaTrader 8, drawings are saved with the workspace and the chart they were drawn on. Save the workspace and they persist; close without saving and recent changes can be lost. A drawing marked global is shown on every chart of the same instrument, which is convenient until you want it on one chart only. Drawing templates store the object's look and settings, not its anchors. Other platforms store drawings in their own ways, so check yours.
Why some drawings are indicators in disguise
A volume profile drawn between two anchors, or a level that counts how many sessions have held it, is doing arithmetic on the bars between its anchors. Those objects recompute when the data does, so their numbers change on a reload or a data refresh even though their anchors did not. That is correct behaviour. It is also the reason a drawing can show a different value on two machines that loaded different amounts of history.
What to actually do with it
- Use one-anchor levels for prices you care about and two-anchor lines only when the time matters too.
- After a rollover, check every drawing that carries a price before trusting it, and decide once whether your charts back-adjust.
- Keep one session template and one timezone across the charts you compare, or expect the same drawing to look different on each.