Strategyprofit does not work properly with cumulating orders = true

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #101997 quote
    Finning
    Participant
    Veteran

    Hi Prorealtime,

    I have found what I believe to be an error with the strategyprofit command, while cumulateorders = true.

    Yes, you can accuse me of double posting from the tail end of this thread here – https://www.prorealcode.com/topic/strategyprofit-when-cumulating-true/

    But the more I look at this, the more I realise that it’s a software problem that other forum members can’t help me with – and a problem that I really need to be fixed.

    If you run the below code in the FTSE 100 Cash $1AUD market – time set at UTC 1+00, it will show the problem that I’m talking about.

    DEFPARAM CumulateOrders = true
    
    // This code is meant to show the errors that I'm seeing with the STRATEGYPROFIT code
    // Market for this particular code is the FTSE $1AUD 10 minute market - time set at UTC 1+00 London British Summer Time
    // Strategyprofit is not showing the money made for all trades. I don't mind if we have to be totally off market for strategyprofit to work - I could live with that - but what's happening is that it's missing trades that launch and close inbetween other trades that remain open. I have checked the excel drag and drop too from the closed positions list - and that confirms this - that STRATEGYPROFIT is missing trades and not reading all trades. This is realistically a big problem - as we rely on this function to ascertain trade - and then portfolio - performance. I basically can't track how much money I'm making/losing, which means that for a fixed fractional reinvestment strategy, you don't know your balance, so you can't reinvest properly. 
    // The below are a subset of trades from my strategy that clearly show this problem. 
    
    If date = 20190417 and currenttime=103000 then
     buy 3 contracts at market
    endif
    
    If date = 20190417 and currenttime=104000 then
    buy 3 contracts at market
    endif
    
    If date = 20190418 and currenttime=105000 then
    buy 3 contracts at market
    endif
    
    set target profit 10
    
    graph strategyprofit
    
    // This set of trades were all successful and made a combined 3 x $30 = $90 of profit. The prorealtime equity curve of this is $90 profit. The closed positions list says $90 of profit. However, the STRATEGYPROFIT of this is only $30. This means that the figure that I then have to reinvest is much much smaller than what it actually is. This then stifles system performance.

    I have also attached a screen grab of this code being run.

    In a nutshell, strategyprofit isn’t capturing the values of all the trades run. I could live with having to be totally off the market before strategyprofit gave you a value, however it’s the missing values/trades that is causing me a problem.

    Am also just about to Ctrl+M this and send in an error report that way as well.

    Can you please look at this, and fix the issue.

    Thanks,

    Finning.

    Capture4.jpg Capture4.jpg
    #102000 quote
    Nicolas
    Keymaster
    Master

    Thanks for the report. I will check that too. I moved the topic to ProOrder forum section as it deals with programming.

    #102002 quote
    Finning
    Participant
    Veteran

    Hi Nicolas,

    thanks for chasing this up.

    Cheers,

    Finning.

    #102008 quote
    Nicolas
    Keymaster
    Master

    I reported it too, FYI.

    Finning thanked this post
    #102012 quote
    robertogozzi
    Moderator
    Master

    I also tried using an additional hour to match UTC+2, and it seems to be working fine, also on CAC40 and DAX.

    Finning thanked this post
    strat1.jpg strat1.jpg Strat2.jpg Strat2.jpg Strat3.jpg Strat3.jpg
    #102045 quote
    Finning
    Participant
    Veteran

    Hi Roberto,

    thanks for looking at this.

    Unfortunately I’m still getting this error on my system – and on multiple markets as well.

    The one thing I will say after looking at your attached pictures, you have trades number 1 and 2 finishing before trade number 3 starts.

    In my test, I have trades numbers 1 and 2 finishing after trade number 3 – so trade number 3 opens and shuts before trades number 1 and 2 close.

    This is most probably driven by the spread – which I forgot to mention – I have my spread set at 4, and I am testing in tick by tick mode too.

    The only other thing that I can mention is the version of PRT that I’m running – also attached.

    v10.3 – 1.8.0_45

    Thanks,

    Finning.

    Capture5.jpg Capture5.jpg
    #102265 quote
    Finning
    Participant
    Veteran

    Hi Nicolas,

    Any news on this?

    Thanks,

    Finning.

    #102275 quote
    Nicolas
    Keymaster
    Master

    Still not, sorry.

    #102820 quote
    Finning
    Participant
    Veteran

    Hi Nicolas, any word on this yet??

    I have had the thought too-is this a partial close problem?

    Am wondering if it was though why would we still see two different number sets of the equity curve and strategyprofit?

    And how do partial closes go if each trade entered is using the targetprofit x command?

    Doesn’t that mean that each individual entry has to reach its set target profit of x?

    So as per the case above there should be 3 trades of 3×10 = $90 of profit?

    Thanks,

    Finning.

    #143479 quote
    shahmp76
    Participant
    New

    Any news on when this will be fixed?

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

Strategyprofit does not work properly with cumulating orders = true


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Finning @finning Participant
Summary

This topic contains 9 replies,
has 4 voices, and was last updated by shahmp76
5 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/05/2019
Status: Active
Attachments: 5 files
Logo Logo
Loading...