2

I created a custom indicator in trading view using pine-script. The inputs to the indicator depend on the chart that is open. Also I do not want the indicator visible in all charts.

Basically what I want is to indicator behave like the drawing tools. If I draw some line and plots using the left side drawing menu, those are only applied to the current chart and not others.

Thanks for help

Shashank Singhal
  • 170
  • 1
  • 2
  • 9

1 Answers1

0

With pinescript (V5) there is no link beetween the execution and the chart/tab open by the user.

So you can't act like the drawing tools.

A workaround is to retrieve the pair name from the chart choosen by the user.

You can use syminfo.tickerid to know the pair choosen by your user and activate/deactivate your indicator.

This way, your indicator will only work on pairs you decide.

G.Lebret
  • 2,826
  • 2
  • 16
  • 27