STRATEGYPROFIT when cumulating= true

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #77343 quote
    robertogozzi
    Moderator
    Master

    Since ProOrder nedds one bar to detect whether you are OnMarket or Not, maybe it needs a bar to detect correct strategyprofit.

    Why, stll executing trades on a 1-minute TF, don’t you add (and switch to) a 1-second TF to graph STRATEGYPROFIT?

    #77346 quote
    Vonasi
    Moderator
    Master

    To me it looks like it is just not seeing any trades that are closed mid bar. Switching to 1 second will mean they still close mid bar so it should make no difference. All trades closed at the close of the bar are being seen it is just mid bar closures that are not.

    It might be interesting to change the STOP orders to SET orders and see if they are seen.

    #77349 quote
    robertogozzi
    Moderator
    Master
    Defparam cumulateorders=true
    Buy       1 contract at close + 60 * pipsize limit
    Sellshort 1 contract at close - 60 * pipsize limit
    Graph STRATEGYPROFIT

    All trades that have SET  a sl or tp will be closed mid bar!

    I just tested the piece of code above on Dax daily and ProOrder updates STRATEGYPROFIT correctly, apart from the last day which is not closed, yet.

    #77350 quote
    robertogozzi
    Moderator
    Master

    Sorry, STOP instead of LIMIT Orders, or keep LIMIT but exchange “-“ and “+”.

    #77363 quote
    Vonasi
    Moderator
    Master

    I just tested the piece of code above on Dax daily and ProOrder updates STRATEGYPROFIT correctly, apart from the last day which is not closed, yet.

    So then it must be something strange in the OP’s code but as we have not seen that yet it would seem that further analysis is impossible. If he does not want to share on it on here then he might get an answer from PRT if he sends a report in with access to the code to them. I suspect that it would be quicker to share on here.

    #77635 quote
    Nicolas
    Keymaster
    Master

    Sorry if I missed something, but since code is read at Close, STRATEGYPROFIT is computed once also at Close, that’s why you don’t see it changing values between 2 bars.

    #101924 quote
    Finning
    Participant
    Veteran

    I’m also seeing a problem with strategyprofit with cumulating orders.

    In the attached pic (the function “graph strategyprofit” is the graphed variable) I have a trade (#2) that opens and closes before the initial trade (#1) finishes, but strategyprofit doesn’t seem to capture this profit?

    This is an automated strategy, so it’s not a partial close – but it seems like strategyprofit only computes once you’re totally off the market.

    I’ll have to see if I can overcome this with another calc somehow and not rely on this function then I guess.

    Finning

    Capture3.jpg Capture3.jpg
    #101926 quote
    Finning
    Participant
    Veteran

    I’m sure the question has been asked before – I just haven’t been able to find the answer to it – but is there any way to access the ProRealTime generated value for the Equity Curve?

    I’ve seen it suggested in various places that you have to calculate your own equity curve – e.g. – something like:

    myequity = (((close-positionprice)*pointvalue)*countofposition)/pipsize + strategyprofit

    Which is what I normally do to generate this value.

    But if strategyprofit isn’t working because of the reasons mentioned in the post above, it throws this all out.

    I will mention that in the post above, I’m using

    set target profit 10

    to exit, and I’m not using any other limit orders.

    Hard to do a fixed fractional reinvestment system if you can’t properly simulate equity…

    Thanks,

    Finning

    #101932 quote
    Finning
    Participant
    Veteran

    Sorry – to re-iterate if I wasn’t clear – in the photo above that I attached – that gap in strategyprofit that is denoted by the green arrow – is never recovered when it bumps up after the next trade is closed. So much so that at the end of my test period, my standard prorealtime equity curve says +7000, and my calculated equity curve based on strategyprofit is +1900. So that is a huge difference that that I’m missing out on/not seeing for calculation purposes into redistribution. I know that strategyprofit only updates once all positions are closed – it’s the trades that it’s not collecting information for that is causing me problems.

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.

STRATEGYPROFIT when cumulating= true


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
verygrubby @verygrubby Participant
Summary

This topic contains 23 replies,
has 5 voices, and was last updated by Finning
6 years, 7 months ago.

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