vij
Pine Script Rookie
Pine Script Rookie
Posts: 1
Joined: December 11th, 2020

Possible to run 2 strategy.entry long orders simultaneously?

In tradingview Pine Script, I find that if I have two strategy.entry long orders, it executes the 2nd strategy.entry long order only after the first one ends. Is it possible to have the 2nd long order run while the 1st long order is still open? How?

Please help.

User avatar
Matthew
Site Admin
Site Admin
Posts: 92
Joined: July 1st, 2020
Location: Australia
Contact: Website Facebook Twitter TradingView Profile

Re: Possible to run 2 strategy.entry long orders simultaneously?

Try adding this to your strategy annotation function (or turn Recalculate On Order Fills on in the Strategy Tester settings):

Code: Select all

strategy(title="Strategy", calc_on_order_fills=true)

Return to “Pine Script Q&A”