Forums ProRealTime English forum ProOrder support Weird results for one position with and without defparam cumulate orders Reply To: Weird results for one position with and without defparam cumulate orders

#90633

Yes

are the same logic.

I think we may be confusing each other as your code didn’t highlight the issue at all due to the conditions in it. If we only consider my last example code which does show the issue then I think ProOrders behaviour is as I suggested earlier – it just cancels any orders to enter the market if CUMULATE ORDERS = FALSE so if you have a BUY and a SELL then you just get left with a SELL. TRUE changes nothing as the the code itself will never allow more than one position because you are only buying or shorting once per bar and closing trades once per bar.

The number of trades was:

  • FALSE = 3689
  • TRUE = 2830
  • NONE = 2830

 

Once again it can be seen that there is never a trade for two joined bars with it set to FALSE so the DEFPARAM order is just cancelling all BUY or SELLSHORT orders because we are already on the market.

Screenshot_1-1