no trade in non trending market

Forums ProRealTime English forum ProOrder support no trade in non trending market

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

    Hi,

    Anyone has any experiences how to code if we do not want automatic trading running if the market moves sideways?

    Thanks

    George

    #63501

    There are several ways, a pair of Moving Averages with small (you have to tell what small is for you) differences, Bollinger Bands narrowing for, say, two consecutive bars, no price movement over “n” pips for at least “x” bars….It’s up tou you to tell when a range is starting.

    It’s a lot easier to spot it on a chart, especially when it ends!

     

    #63503

    Thanks Roberto, would you post a short example if you have time!? Thanks again

    #63506

    This Nicolas‘post when, as a novice, I needed some help https://www.prorealcode.com/topic/detecting-a-range/#post-10338.

    The following example uses narrowing Bollinger Bands for just 1 (or whatever number you want to set) bar.

    First you have to define a BB:

    Then you have to determine when the BB starts narrowing,  because the price is likely to enter a range:

    Now you can use the variable NARROW to check whenever you want:

     

     

     

     

    1 user thanked author for this post.
    #63508

    Thank you!!

    #63516

    I find the best practise is using highs and lows. By definition a trend can only exist (up) if prices are making higher highs and higher lows.

    #63519

    I use the above code. I have found it does well at keeping you out of sideways markets but is not perfect so any edits that people might have would be useful. Different FX pairs behave differently for the second value [n] depending on what time or other variables control your entry criteria.

    2 users thanked author for this post.
    #63527

    Thank you!

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