Hello, I try to program an indicator that tells me the distance visually, between MA 200 and the price closing. I created this but I am not sure that it marks well. Can you check it out?
Thank you
@lol I guess it depends on what is visually most pleasing to you. I like @rottor idea but here is an alternative that will give you a different way of looking at your indicator.
the code is shorter and more readable, and it produces the same output as yours using the function created just for this purpose (getting absolute value)
it may even work faster - although I haven't checked it myself