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

#90718

Yes by joined I mean one following the other.

I don’t believe that this is a bug – it is just that we need to fully understand how DEFPARAM CUMULATEORDERS = FALSE works before deciding to put it in our strategy code.

Considering just the long side of my strategy – if it is on the market with no DEFPARAM CUMULATEORDERS = FALSE or with a DEFPARAM CUMULATEORDERS = TRUE in the code then it can do one of two things at the close of a candle:

  • Sends a BUY order and a SELL order that cancel each other out so it just stays on the market with the one position.
  • Send just a SELL order so the position closes.

If we add a DEFPARAM CUMULATEORDERS = FALSE to the strategy then it does the following:

  • Sends a BUY order and a SELL order but the BUY order is cancelled by the DEFPARAM CUMULATEORDERS = FALSE so we are left with just a SELL order. This means that it is impossible to stay on the market two candles in a row.
  • Send just a SELL order so the position closes.
1 user thanked author for this post.