Is it possible to modify StrategyProfit so that it resets every x period?

Forums ProRealTime English forum ProOrder support Is it possible to modify StrategyProfit so that it resets every x period?

Viewing 6 posts - 1 through 6 (of 6 total)
  • #175648

    I’ve been looking at the language documentation and found the StrategyProfit function too limiting because it is applied to the entire history of the strategy with seemingly no way to change the period. It would be useful to be able to calculate the StrategyProfit on, for example, a daily basis. I’ve noticed that this website has a lot of code but there is no library of features that one can use in one’s strategy. If the code has already been written and included in the uploaded indicators and strategies, it would be nice if it could be neatly compiled in a way similar to the language documentation.

    #175670

    It would be nice, but resource is limited …

    Nicolas, the WebMaster / KeyMaster is max’d out permanently.

    The Moderators and others help with code, RobertoGozzi works tirelessly and does a superlative job helping code up folks ideas and problems and he may be along sometime soon to help you.

    In the meantime have a look on the link below, if it doesn’t help you this time you may remember a snippet exists to solve your next problem? 🙂

    Snippet Link Library

    1 user thanked author for this post.
    #175671

    You can’t change system constants (they are so called because they are different from variables), such as STRATEGYPROFIT, CLOSE, POSITIONPERF, RANGE, TIME, etc…

    But you can save STRATEGYPROFIT in one or more variables and change them as best suits you.

    This snippet will store the daily STRATEGYPROFIT in a variable called TempStrategyProfit.

     

    2 users thanked author for this post.
    #175673

    Link to above added as Log 300 here …

    Snippet Link Library

    #175731

    I absolutely understand that it takes time. The reason I think it should be considered a worthwhile endeavor is because it would presumably allow everyone to save time. It would essentially function as a tidy FAQ.

    #175732

    Thank you so much. The functionality that your code provides is exactly what I had in mind.

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login