monthly moving average in daily chart

Forums ProRealTime English forum ProScreener support monthly moving average in daily chart

  • This topic has 13 replies, 3 voices, and was last updated 5 years ago by avatarNuno.
Viewing 14 posts - 1 through 14 (of 14 total)
  • #86108

    Hi

    i created an indicator in order to simulate a 20 month moving average  ((h+l+c)/3))  in a daily chart. When i use it, the indicator is ok

    But when i translate it in ProScreener, the result is different

    For example, for the french stock SCR (SCOR Euronext Paris), the variable ‘compteur’  used to  calculate the number of month is egual to 12 instead of 20 for 20 month moving Average, so the value moving average is false

    why ??? is it a proscreener limit?

    here the code for the indicator

    thank you for help

    Nuno

     

    #86110

    ProScreener allows only a lookback of 254 bars, so I guess 20 month by roughly 21 daily bars each yields 420 approx. which is too much!

    #86116

    thank you for your reply Roberto

    so i don’t understand why some stocks have ‘compteur’ > 20 ( SEE SCREENSHOT ) and value Moving Average is ok ???

    here is the proscreener code

     

    #86122

    Sorry, my fault, you are not using directly a moving average, so the 254-limit does not apply in this case.

    Which instruments are you applying the scrrener?

    On the Daily TF?

     

    #86124

    The screener is apply in french Stocks on daily Timeframe

    #86136

    I have tested it on many instruments and I think the problem could be that some stocks are not traded everyday and there are many “holes” (some stocks report 1 or 2 tradind days in a month) and this may lead to such odd results.

    I’m afraid I cannot be of great help.

    #86141

    Thank you Roberto

    some stocks   (Scor SCR / Fleuri Michon FLE ) in France Stocks  with variable ‘compteur’ = 12 are liquid stocks  and are traded everyday

    If someone have an idea?

    #86142

    here in a daily graph about SCR with the indicator

    all is ok but in Proscreener, value is false

    help are welcome

    #86244

    Sorry if I’m wrong but the indicator value compared to the one returned by the screener is not the same in any case:

    so the 254-limit does not apply in this case.

    The 254 bars limit do apply in this case. 254 candlesticks is far from enough to count 20 months on a daily timeframe, so I can’t understand why we get counter of more than 20..because if I change the “compteur” variable incrementing with:

    the max value I get is 255..

    2 users thanked author for this post.
    #86269

    Hi Nicolas,

    thank you for your reply

    i made de changes about

    but the moving average value in proscreener is incorrect  because compteur < 20 (for average 20 month)

    in the monthly and daily charts, moving average value is the same

     

    About the 254 limit, i dont undestand why some value have the variable compteur > 20 . for theses stocks moving average value in Proscreener are ok (se screenshot)

    what is false in my code about the variable compteur?

    #86282

    Nothing is wrong in your code, I’m trying to know why your count variable is incrementing while it is not possible due to the bars limitation.

    By the way, you’ll not be able to calculate correctly your 20 months moving average in ProScreener on the daily timeframe, and that was the purpose of your initial query. Once I know more about the count issue, I will let you know.

    #86285

    Ok

    thank you Nicolas

    #86644

    I can now confirm that if the months count increase more than expected is that because some of the instruments haven’t regular quote and therefore less days in a month than as usual.

    #86740

    Ok thank you Nicolas

     

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

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