Get MA indicator line color

Forums ProRealTime English forum ProBuilder support Get MA indicator line color

  • This topic has 3 replies, 3 voices, and was last updated 2 years ago by avatarJS.
Viewing 4 posts - 1 through 4 (of 4 total)
  • #186780

    Hi there,

    I’m trying to write script where it checks if the MA line color changes from one bar to the next. Is there a property or method to get the color of the MA line e.g. green for bullish and red for bearish?

    Thanks for any help!

    k

    #186797

    There you go:

    lines 2 and 3 retain the trend of the MA, while line 4 returns any change in direction (colour).

    #186801

    Thank you @robertogozzi!

    Something I don’t understand as I am new to this scriping language (though I have experience with JavaScript and C#)

    Shouldn’t the above contain only a true or false value? How can you use it like an array?

     

     

    #186807
    JS
    1 user thanked author for this post.
Viewing 4 posts - 1 through 4 (of 4 total)

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