STRATEGYPROFIT when cumulating= true

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #77226 quote
    verygrubby
    Participant
    Master

    Hello all,

    STRATEGYPROFIT doesn’t seem to return the correct values when a system cumulates positions…is this a known issue?

    Ta

    #77227 quote
    robertogozzi
    Moderator
    Master

    It’s impossible to talk about something without having the full code and history.

    I suggest that you add

    graph StrategyProfit

    in your strategy and then debug it, before entering and after exiting a trade, using the ProBackTest variable’s window.

    #77234 quote
    Vonasi
    Moderator
    Master

    I assume you are aware that STRATEGYPROFIT’s value will only be updated when the positions are closed?

    #77259 quote
    verygrubby
    Participant
    Master

    Yes, it works fine for strategies that don’t cumulate orders, but for cumulating strategies, its not correct…

    #77262 quote
    Vonasi
    Moderator
    Master

    but for cumulating strategies, its not correct…

    In what way not correct? I have never noticed any issues and most of my strategies accumulate positions.

    #77267 quote
    verygrubby
    Participant
    Master

    when i graph strategyprofit for a non-cumulating strategy, it matches the equity curve perfectly, as you would expect. When I graph it for a cumulating strategy, it does not match the equity curve of the strategy…the graph rises and falls at the right points, but not by the right amounts

    #77271 quote
    Vonasi
    Moderator
    Master

    A picture paints a thousand words!

    The equity curve will show all the draw downs while a graph of STRATEGYPROFIT won’t as it just shows the difference in overall profit at a candles close and will only change if positions are closed and the value altered.

    #77274 quote
    Vonasi
    Moderator
    Master

    Here is an image with STRATEGYPROFIT + 10000 graphed (£10000 was the starting capital). You can see that the value of STRATEGYPROFIT is only updated when all positions are closed.

    [attachment file=77275]

    Screenshot_1.png Screenshot_1.png
    #77285 quote
    verygrubby
    Participant
    Master

    yes i understand that. I’m saying that it seems that my graph updates the wrong totals when positions close when a strategy is cumulating orders…

    #77288 quote
    Vonasi
    Moderator
    Master

    A picture paints a thousand words! use something like ‘Lightshot’ to take a screen shot so we can see the differences.

    Are you closing all of the positions at the same time with a SELL AT MARKET or using partial closure? If you have SET instructions for a stop loss or take profit with accumulating positions then it will be partial closure.

    #77292 quote
    verygrubby
    Participant
    Master

    Im using SELL AT instructions to close… you can the strategyprofit rises and falls in the right places, but the totals are off… over this period the strategy lost -56, but the strategyprofit says +472

    Screen-Shot-2018-08-01-at-11.58.37.png Screen-Shot-2018-08-01-at-11.58.37.png
    #77303 quote
    Vonasi
    Moderator
    Master

    Difficult to confirm without zooming in (which you can do for us) but you also have SET stop loss exits in there and it seems these are not being shown in the strategy profit.

    [attachment file=77304]

    Screenshot_3.png Screenshot_3.png
    #77308 quote
    Vonasi
    Moderator
    Master

    Just a thought – is your graph instruction the last line in your code?

    #77311 quote
    verygrubby
    Participant
    Master

    GRAPH is the last line…

    When you say SET instructions, do you mean anything other than a SELL at MARKET? I do have defined stop losses in place (eg SELL AT breakevenLevel STOP), and you are right that these don’t seem to be included in strategy profit..well spotted..

    Is there a way I can include them? strategyprofit isn’t much use without them…. its weird this only happens for cumulating strategies

    Screen-Shot-2018-08-01-at-13.31.44.png Screen-Shot-2018-08-01-at-13.31.44.png
    #77320 quote
    Vonasi
    Moderator
    Master

    STOP and LIMIT orders are the same as SET in the sense that they close a position mid candle and it seems this is not being included in the calculation so you may have discovered a bug with the new PRT engine. I would send a help request report into PRT via your platform and in the description direct them to this topic. You may also want to post in the Platform Support section a quick description of the problem and a link to here as PRT only monitor that section of the forums. Mention that you have sent a report or they will just ask you to send one!

    I have had some issues with accumulating strategies recently – mainly the optimize results window showing all the same results when variable position size is used. PRT may have one or two bugs to iron out.

Viewing 15 posts - 1 through 15 (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...