Welcome to the BEST forum for traders

Did you know we're sharing tons of exclusive content here?
Our community is growing quickly. Take a look around and say "Hello".

  • Forums
  • Pinescript
  • How to draw a horizontal line at 200 EMA of 1st candle of the day?

How to draw a horizontal line at 200 EMA of 1st candle of the day?

Jun 21, 2022 - 10:47 AM

Viewed 561 times

https://best-trading-indicator.com/community/bti/forums/4180/topics/58619 COPY
  • How to draw a horizontal line at 200 EMA of 1st candle of the day?
    Can anyone help with the sample code.

    0
  • tt = timestamp(year(timenow), year(timenow), dayofmonth(timenow), 00, 00, 00)
    ema200 =  ta.ema(ema, 200)
    
    plot(tt == time ? ema200 : na, show_last = 1, trackprice =true, color = color.red, linewidth = 2)
    
    
    0
CONTENTS