Forums › ProRealTime English forum › ProOrder support › Two positions with CumulateOrders = False › Reply To: Two positions with CumulateOrders = False
12/15/2017 at 4:11 PM
#55756
Yes, I use something similar in my codes, too. The “IamAlreadyTrading” parameter also avoids that more than one buy or sellshort order will be executed in one bar, if there are many of them. I set the parameter “IamAlreadyTrading” to 0 at the beginning of the next bar and always check for “longonmarket” or “shortonmarket” in addition.
But, nevertheless, there is probably a small bug in the “cumulateorders = false” command, and someone at prorealtime may want to check this.