Drawing a horizontal line across a given point in the chart

rhodium1trading
31
rhodium1trading  
Hi.. I wanted to draw a horizontal line across the 50MA position at candle 1. I tried and now I know how to code for calculating the 50MA value at candle 1. If the 50MA value at candle 1 is "x", I want to draw a horizontal line across "x" in the chart. (It will be a dynamic line which changes its position as new candles appear) Already tried few options, but failed. Could someone please tell me how to code to draw a horizontal line across "x"? (Please note that in this example, I know how to calculate the value "x" creating handle for MA. Only problem is drawing a line across "x") 
Keith Watford
Moderator
30306
Keith Watford  
rhodium1trading:
 Already tried few options, but failed. 

Show the code that you have done and maybe we will see your errors.

Vladimir Karputov
Moderator
250613
Vladimir Karputov  
rhodium1trading :
Hi.. I wanted to draw a horizontal line across the 50MA position at candle 1. I tried and now I know how to code for calculating the 50MA value at candle 1. If the 50MA value at candle 1 is "x", I want to draw a horizontal line across "x" in the chart. (It will be a dynamic line which changes its position as new candles appear) Already tried few options, but failed. Could someone please tell me how to code to draw a horizontal line across "x"? (Please note that in this example, I know how to calculate the value "x" creating handle for MA. Only problem is drawing a line across "x") 

Do you want something like this?

iMA Line

rhodium1trading
31
rhodium1trading  
Vladimir Karputov:

Do you want something like this?

Yes. Anyway my problem was sorted. Thanks for the reply!
William Roeder
24765
William Roeder  
rhodium1trading: Yes. Anyway my problem was sorted. Thanks for the reply!

Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?

How To Ask Questions The Smart Way. 2004
     When You Ask.
          Follow up with a brief note on the solution.

Vladimir Karputov
Moderator
250613
Vladimir Karputov  

If anyone is interested - here is an example ( MA horizontal line )

MA horizontal line