Hi,
How can I limit the number of times a trade occurs based on a set of conditions BUT have multiple orders (CumulateOrders= True)
Example Using a basic Bollinger Band strategy:
Enter 1 buy when close < BB low. Even if the next candle closes below the BB low it should not enter another buy. Now I only want to enter another buy, ONLY when the close > BB high and retraces to close < BB low
This will be a total of 2 cumulative buy orders.
I have attached a visual example to help explain where I am coming from.
Thank you for the help
If close crosses under BBlow and not onmarket then
counter=1
buy 1 contract at market
endif
if longonmarket and close crosses over then
counter=counter+1
endif
if longonmarket and close crosses under BBlow and counter>1 then
counter=1
buy 1 contract at market
endif
Here you go… 🙂
Thank you so much! This is exactly what I have been after.
Ops, you surely saw that in the second if-loop it should be “…and close crosses over BBhigh then”. I obviously forgot BBhigh.
Yeah I included that, thanks once again