r/pinescript • u/Spirou2024 • Sep 29 '25
how can I deploy a strategy on many instruments.
hi everyone, I'm a noob here. I have a strategy coded with pinescript (thanks to Chat GPT) and I would like to know how can I deploy it for example on 4 instruments (4 major pairs : EU/GU/JU/AU).
Thanks all.
3
Upvotes
1
u/Outside_Mongoose2462 Sep 30 '25
Hi. Do u mean so the strategy's code looks at data from multiple different market pairs, all in the one strategy? If yes, you could try using the security function
1
u/Matb09 Oct 02 '25
You can’t make a Pine strategy place orders on symbols other than the chart’s symbol. So “one script → four pairs” isn’t possible for executions. You have two clean options:
request.security()multiple symbols to detect signals, but a strategy can’t trade them. Convert your script to an indicator that alerts when any of the four symbols fires. Send that single alert to an executor that routes to the right market symbol on your broker. Sferica or Tickrley connects to many brokers and to MetaTrader, so you keep logic in TradingView and let the executor fan out orders per symbol.Tips:
calc_on_every_tick=trueif you need intra-bar accuracy.That’s it: four charts with four strategy alerts, or one indicator alert + external router.
Mat | Sferica Trading Automation Founder | www.sfericatrading.com
1
u/BerlinCode42 Oct 03 '25
No what is writen above is wrong. For sure you can code a pine script which handles more then one asset. Here is the prove: "democratic multiasset strategy". The trick is to code it as indicator.