Coding uptrends and downtrends

Forums ProRealTime English forum ProOrder support Coding uptrends and downtrends

Viewing 2 posts - 1 through 2 (of 2 total)
  • #35948

    Hi,

    In prorealtime charts you can set the system to colour code when a Moving Average is in an uptrend and when it is in a downtrend.

    If you want to use this in a automated strategy, e.g. you create an indicator which is the 50day moving average basis closing prices.

    then you want to code the system such that it can identify if the 50MA is an uptrend or a downtrend.

    what i cant find is how you write this in code.

    any ideas please?

    #39045

    If the color is green, trend is up, basically it means that the current value of the indicator is higher than the previous period one. So for a simple moving average, it would mean:

    and opposite rule for a bearish trend. Hope it helps, sorry for delay answering your question.

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

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