Hi:
This is probably a silly question. I have a code that cumulates orders in the direction of the trend at 2ATR increments (Pyramids). I want to take up to 10 of such pyramid trades and then stop but after the 10th pyramid the system starts taking trades on every bar unless a stop is hit.
At the moment i have a few lines of code per pyramid entry.
My position size is based on %risk so I can’t use “COUNTOFPOSITIONS”.
Graph attached. Please watch how after the 10th pyramid it starts taking trades on every bar.
Any ideas how to make it stop taking new trades after the 10th? (without closing the trades so it rides the up-trend until the end)
Thank you