1

I am a begginer in Pine script. I would like to know how to make my strategy to open a new long position even if the previous long position has not closed. I want the strategy to open a new long position every time the long coditions are met. Many thanks!


ViRus
  • 11
  • 1

1 Answers1

1

You can, but you have to decide the maximum number of long position you will accept as a maximum (with the pyramiding parameter).
For example for 10 Long orders max:

//@version=5
strategy("My strategy", pyramiding = 10)

Then, each time you want to enter a long, use strategy.entry().
Note that you can cumul order ONLY if they are in the same direction ( Long or Short exclusivly). See : https://www.tradingview.com/pine-script-docs/en/v5/concepts/Strategies.html#order-placement-commands

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