help coding breakout strategy

Forums ProRealTime English forum ProOrder support help coding breakout strategy

Viewing 15 posts - 1 through 15 (of 20 total)
  • #166368

    hi

     

    I need help coding a strategy ive been backtesting manually and forwardtested for a while now. Results look promising.

     

    rules:

    • from todays open (midnight) to US open, (15:30 my time gmt +2) creates a rangebox
    • if ADR is below 50%, put sell/buy stop orders 10 pips below/above rangebox
    • target 50 pips, SL 100 pips, breakeven SL after 25 pips
    • if ADR is above 50% no trades
    1 user thanked author for this post.
    #166391

    What ADR is the one you are referencing?:

    • Advance/Decline Ratio
    • Average Daily Range  calculated on Highs & Lows
    • Average Daily Range calculated on Range (pips)

    Do you have any link to that indicator?  PRT have ADX, ADXR, but no ADR.

    #166449

    average daily range in pips. Could be one thats based on similar calculation in prt 🙂 thanks!

    #166523

    Try this:

     

    1 user thanked author for this post.
    #166530

    Should Line 15 read as below?

     

    #166546

    No, those two values must be updated earlier or on that time.

    After that time the range is defined and trades can be entered.

    1 user thanked author for this post.
    #166836

    it does not take any trades at all? tested with 100k bars on 1 min, 5 min, 30 min

    #166845

    Try this one. I changed the average with yesterday’s range:

     

    1 user thanked author for this post.
    #166914

    perfect! thanks alot roberto!! 😀

    1 user thanked author for this post.
    #191599

    Roberto, could you possibly devide this code into one SL,TP and BE-stop for long and one for short? Want to try to optimze code for both long and short 😀

    #191623

    There you go:

     

    1 user thanked author for this post.
    #191631

    wow, perfect 😀 thanks roberto!!!

    one more quick question,

    • could you add line to not take a position after certain time, example at 10 aclock
    • and a line for maximum numbers of trades per day
    #191639

    There you go:

    #191810

    i love you roberto!! thanks! 😀

    #193737

    Roberto, i ended up using this version. But system is not taking any positions last 18 days. But it should, could you take a look at what might be wrong?

     

     

Viewing 15 posts - 1 through 15 (of 20 total)

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