I am writting a script based on a strategy that worked perfectly on calculations and also on backtest. Now once the code was done I realyzed that strategy.entry() function reverts the position but I expected to open an independet position on the opposite direction. Exemple:
bla, bla, bla... strategy.extry(id = "buy", direction = strategy.long, qty = 1) bla, bla, bla... strategy.entry(id = "hedgesell",direction = strategy.short, qty = 1)
I expected to have two different positions, one Long and another Short but instead Pine Script reverses the Long position to a Sell position increasing it size.
I understand that I can create an indicator and trigger alerts to the exchange and open/close shorts and longs, but is there any way to make it work on a strategy? This would be nice 'cause I could "re-backtest" and make the automation easier.
Thanks in advance for the ones who can give me a hand!