Way to tell if market is bull or bear?

Forums ProRealTime English forum ProOrder support Way to tell if market is bull or bear?

Viewing 9 posts - 1 through 9 (of 9 total)
  • #171984

    I have an algo that performs well in certain markets – let say for example bear markets.

     

    Is there a function or code with PRT that will help me assess which trend we are currently in? clearly I assume this is a wide open question (how long is the trend etc). But in general, id like to say

    If bear market then execute code

    elseif

    wait 🙂

     

    any ideas?

     

    thanks!

    #171985

    The most classic way is to compare  the price against Sma200, but you may prefer different periods.

    Another way is to compare the current price agains that of N periods ago.

    The best way is trying to spot some Higher Highs and Higher Lows or some Lower Lows and Lower Highs.

    Furthers methods can be coded.

     

     

    #171986

    Thanks Robert, much appreciated.

     

    its the higher, high – lower, lows code that im really interested in. Was hoping that you or someone else had already done the legwork on this? Something perhaps that could be optimised to to try and find a “sweet spot”, while trying to avoid overfitting of course!

     

    thanks!

    #171991

    The ROCnRoll Indicator gives an easily spotted change of direction at any / all Timeframes.

    1 user thanked author for this post.
    #172002

    I have this code to spot the last 3 HH’s and 3 LL’s, but the main issues with this code are:

    • validity of the definituion of HH and LL, I used to scan by a new HH o LL within the last N candles and consider it valid only if there is a reversal pattern (two differently coloured candles)
    • lag, after three HH’s and LL’s the trend might be close to reversal

    I would try another solution, ROCnRoll Indicator as suggested by GraHal or Sma200 or a combination of other indicators.

    The choice of the TF may also affect the decision.

     

    1 user thanked author for this post.
    #172008

    Thank you both for the ideas – much appreciated – that is my weekend sorted now 🙂

    #172010

    Link to Roberto HH & LL code added as Log 289 here …

    Snippet Link Library

    1 user thanked author for this post.
    #172015

    Roberto, re. your code, pls correct me if I’m wrong but it seems to me that what you call lower lows “LLn” maybe should be called  Higher Lows (HLn) , since each of them are higher than the previous one , arent they ?

    #172019

    I don’t want to tell Lower Lows from Higher Lows (and the other way round), as when I detect 3 LL’s or 3 HH’s I check if they are in the correct order, otherwise I’ll ignore them

     

Viewing 9 posts - 1 through 9 (of 9 total)

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