nachob87
Pine Script Rookie
Pine Script Rookie
Posts: 1
Joined: November 8th, 2023
Contact: TradingView Profile

Multiple Trades (multiple TP/SL)

Hi gang, has somebody achieved to make it possible to execute many trades at the same time, but respecting the original TP and SL of each trade¿?
Been with this issue for a couple of weeks now and can´t get it solved !

Lets say our system first sends a buy signal ( entry1,takeProfits1,stopLoss1), then before trade 1 is closed we get a sell signal, ( entry2,takeProfits2,stopLoss2), and then the same with a third one ( entry3,takeProfits3,stopLoss3).

How would it be to make it work?
I´ve been playing with arrays but can´t get it done :S

cheers!
Nacho

Steve Burman
Moderator
Moderator
Posts: 109
Joined: January 13th, 2023

Re: Multiple Trades (multiple TP/SL)

If you've got a long trade and before it takes profit or stopped out the price reverts and you get a sell signal, why would you want to keep the original trade going and respecting the original take profit and stop loss levels?

Return to “Pine Script Q&A”