Is it possible to make cumulating orders somewere between true and false?
Lets say: only enter 2 or 4 first signals for order.
You can use COUNTOFLONGSHARES or COUNTOFSHORTSHARES in order to know how much orders/lots/shares/contracts are actually already on market. This way you can limit the quantity of orders of your strategy.
And you can count your signals:
If buycondition=true then
Signal=Signal +1
Endif
If (signal<>signal[1] and ( signal =1 or signal =3) then
Buy at market
Endif
If notonmarket then
Signal = 0
Endif
I also have a problem with the strategy were it can short and go long and if there is a long trade in operation it can suddenly sell out in loss and go short.
Possible to tell the program to stay in on short or long untill it hits stop or target.
You can use “NOT ONMARKET” to prevent a new order to be set on market.