0

While doing back testing on daily time frame I wish to refer Weekly (HTF) macd line value. The default MACD indicator in tradingview doesn't show value nor does it plot macdline of higher HTF.

So i wrote following code which shows the value but doesn't plot the line while week is running. It plots the line only after week gets over. During back testing, how do I plot the running value of weekly MACD while week is still on?

macdlineH = request.security(syminfo.tickerid, "W", macdline[0])[0] plot(macdlineH, title='MACD', color=color.new(color.blue, 0), linewidth=2)

Pravin
  • 35
  • 4
  • Your code works fine. plot the current value of the weekly MACD while the week is still active. https://i.imgur.com/dkzlo8K.png – Gu5tavo71 Feb 08 '23 at 17:38

0 Answers0