accumulating orders only if the overall strategy is positive

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39135 quote
    Francesco78Francesco78
    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
    GraHalGraHal
    Participant
    Legend

    Using StrategyProfit > 0 and PositionPerformance > 0?

    Nicolas and Francesco78 thanked this post
    #39172 quote
    Francesco78Francesco78
    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
    GraHalGraHal
    Participant
    Legend

    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
    Francesco78Francesco78
    Participant
    Master

    Thanks Grahal, I will try and let you know 🙂

    #93884 quote
    FinningFinning
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 FinningFinning
7 years, 7 months ago.

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