accumulating orders only if the overall strategy is positive

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39135 quote
    Francesco78
    Participant
    Master

    Hello,

    How do you code the condition to accumulate orders only as long as the strategy is positive?

    Thank you

    Francesco

    #39149 quote
    GraHal
    Participant
    Master

    Using StrategyProfit > 0 and PositionPerformance > 0?

    Nicolas and Francesco78 thanked this post
    #39172 quote
    Francesco78
    Participant
    Master

    Thank you Grahal but I meant a slightly different thing:

    I want the system to cumulate orders up to a certain point when on the market,  not to increase the size of a new trade  as long as the strategy is positive.

    So I need to use DEFPARAM Cumulate orders = true.

    Do you see what I mean or Im getting it completely wrong?

    Thaks

    #39175 quote
    GraHal
    Participant
    Master

    I won’t try and code it (you’re better than me! :)) but what about a boolean condition  so you only accumulate orders when StrategyProfit > 0 and PositionPerformance > 0?

    Ah gotcha now … you want to cumulate orders only if the profit is increasing on each bar?

    So could you use Positionperf[1] > Positionperf[2] > Positionperf[3]  etc??

    Francesco78 and Nicolas thanked this post
    #39186 quote
    Francesco78
    Participant
    Master

    Thanks Grahal, I will try and let you know 🙂

    #93884 quote
    Finning
    Participant
    Veteran

    Hi  @Francesco78

    did you have any luck with this?

    I too am also trying to get cumulating orders to operate only if strategyprofit>0, and haven’t quite found a reasonable way to do this yet.

    Thanks,

    Finning

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

accumulating orders only if the overall strategy is positive


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/26/2017
Status: Active
Attachments: No files
Logo Logo
Loading...