Chartaraชาร์ตารา
Structure · Pine Script v6

Market Structure Map

Highlights confirmed swing highs and lows for structure review.

Download free
What it shows

What it shows

  • Visualises one measurable chart condition.
  • Inputs can be changed for your own test.
  • The full Pine Script code is visible.
Limits

What it does not do

  • It does not predict price.
  • It does not place trades or manage risk.
  • It does not guarantee profitable signals.
3 minutes

How to install

  1. Open TradingView and select Pine Editor.
  2. Paste the code into a new indicator.
  3. Save, add to chart and test the inputs.
Market Structure Map.pine
//@version=6
indicator("Chartara — Market Structure Map", overlay=true)
left=input.int(3,"Pivot left",minval=1)
right=input.int(3,"Pivot right",minval=1)
ph=ta.pivothigh(high,left,right)
pl=ta.pivotlow(low,left,right)
plotshape(not na(ph),title="Swing high",style=shape.triangledown,location=location.abovebar,offset=-right,color=color.new(color.red,5),size=size.tiny)
plotshape(not na(pl),title="Swing low",style=shape.triangleup,location=location.belowbar,offset=-right,color=color.new(color.teal,5),size=size.tiny)
var float lastHigh=na
var float lastLow=na
if not na(ph)
    lastHigh:=ph
if not na(pl)
    lastLow:=pl
plot(lastHigh,"Last confirmed high",color=color.new(color.red,45),style=plot.style_stepline)
plot(lastLow,"Last confirmed low",color=color.new(color.teal,45),style=plot.style_stepline)
Broker Compass

See broker fit

Compare the environment this tool depends on before opening an account.

Compare brokers