Skip to content

Trade Markers & Position Lines

Visualize entries, exits, and open positions on candlestick charts.

Buy/sell markers on candles · entry (blue) · SL (red) · TP (green)

Code

typescript
chart.getSeries('ohlc')?.setMarkers([
  { time: ohlc.x[10], shape: 'arrowUp', position: 'belowBar', text: 'Buy' },
])

chart.addPositionLine({ price: 102, style: 'entry' })
chart.addPositionLine({ price: 98, style: 'sl' })
chart.addPositionLine({ price: 108, style: 'tp' })

Released under the MIT License.