Cumulative Pyramiding help!!!

Forums ProRealTime English forum ProBuilder support Cumulative Pyramiding help!!!

Viewing 7 posts - 1 through 7 (of 7 total)
  • #209177

    Hi all,

    Grateful for any help. I am trying to put together a code that lets me add more positions (up to a maximum of 4 positions) in an automatic trade.

    I’m looking to enter long / short when current price is greater  that 0.5% in my favour.

    I am also looking to exit the position when the current position moves 3% against me. So far, I have the following but I am not sure this is right. For some reason, it also doesn’t add the additional positions:

     

     

    #209179
    JS

    I tried your system but it does open cumulative positions…?

    More than 4 positions but this limit is not (yet) in your code…

    #209196

    Thanks! Also looking for help on inserting this limit.

    Also does anyone know why you can backtest the stop loss and trailing stop together and as a percentage, but ProOrder won’t let you do both or add percentages?

    #209205
    JS

    Hi,

    To add a limit to the number of contracts, you can use:

    If c1 or c2 and CountOfLongShares<=4 then

    If c6 and c7 and CountOfShortShares<=4 then

    1 user thanked author for this post.
    #209206
    JS

    Here is a link to a trailing stop function that can be used as an alternative to the standard TS in ProBackTest…

    https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/

    1 user thanked author for this post.
    #209515

    Do you know if this works in an automatic trade. Doesn’t seem to be working for me

     

    #209596

    Yes, it works, it has been used many times since years for traders in their strategies 🙂

    For a specific trailing stop in percentage, you can look at these snippets:

    https://www.prorealcode.com/topic/cannot-set-trailing-stop-as-through-ig/#post-83701

Viewing 7 posts - 1 through 7 (of 7 total)
Similar topics:

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