Forums ProRealTime English forum ProOrder support Two positions with CumulateOrders = False Reply To: Two positions with CumulateOrders = False

#55717

I have had problems with this command, too, but the other way around. In one backtest, I noticed that a few orders were NOT carried out, when I had “cumulateorders = false” at the beginning of the code, although they should have been, because there was NO position in the same direction open at the time. When I removed  “cumulateorders = false”, everything went fine. I have not experienced this in live automated trading, though.

It appears that “cumulateorders = false” is not 100% reliable, and prorealtime should look into this command. 

For the moment, it may raise safety, when you add to all buy or sellshort commands the following conditions :

 

If not longonmarket then

buy 1 contract at market

endif

or 

If not shortonmarket then

sellshort 1 contract at market

endif

 

I have this in all my codes all of the time, without problems. Cumulation does not occur. 

2 users thanked author for this post.