Stop and reverse question

Forums ProRealTime English forum ProOrder support Stop and reverse question

Viewing 8 posts - 1 through 8 (of 8 total)
  • #247086

    Hi, first timer here and just learning ProRealTime with minimal prior coding experience, so apologize for naive questions. I’m building a mean reversion system, but I have certain scenarios where after some backtesting I can see that statistically at certain stop levels the odds are heavily indicating that it’s got caught in a trend. I’d like to in a sense “pause” the normal system rules and do a stop and reverse intrabar with a trailing stop when it hits the stop level. If I’m trading manually that’s easy enough, but I can’t figure out how to code that.

    I know there’s a lot of logic likely involved there so not asking anyone to code stuff for me, but any pointers on the simple commands required to do a stop and reverse order instead of just a stop that I have at the end? My code is below, any assistance appreciated. Thanks.

     

    #247091

    Hi. @Grahal has a list of interesting post where you could find exactly what you are looking for.
    Anyway here you have an example of how you could manage differents TP and SL.

    1 user thanked author for this post.
    #247092

    where you could find exactly what you are looking for.

    Link below, hope you find what you need.
    Snippet Link Library

    1 user thanked author for this post.
    #247093

    I get attached error message when I try to send above code to proorder.

    Is the fix simple Ivan please?

    #247096
    JS

    Pending orders cannot be used to partially close positions…

    (this can only be done with market orders within the strategy code…)

    2 users thanked author for this post.
    #247099

    Thanks JS, I thought as much, but figured maybe I’d missed some changes in what is allowed etc.

    1 user thanked author for this post.
    avatar JS
    #247124

    Thanks JS, I thought as much, but figured maybe I’d missed some changes in what is allowed etc.

    Hey GraHal – not really that, but Backtest allows for it. Thus, easy to be confused a little. 🙂

    1 user thanked author for this post.
    #247140

    Thank you @GraHal and @Iván  Haven’t figured it out yet, but the pointers have got me sniffing it out. That google sheet with all the links is a fantastic resource, much appreciated.

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

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