repo32

Background Up or Down

This script will color the background based upon whether it is positive or negative for the day. When looking at numerous charts, you can instantly see if they are up or down for the day. For me, I like to be going long on the stocks that are already moving up and short on the ones that are moving down. When using lower time frames, you can lose perspective of where it is on the daily chart.

On the example above, you can see a 5 minute chart of NFLX. It shows you when it dropped below the previous days close.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//Created by Robert Nance 11/19/15
//This script simply colors the background when price is above or below the previous day close.
//Works nice for seeing if the stock is up or down for the day.
study(shorttitle="UP/DN", title="Background Up or Down", overlay=true)

cdl = input(true, title="Previous Daily Closing")
dclose = security(tickerid, 'D', close[1]) 
positive = close > dclose ? green : na
negative = close < dclose ? red : na
bgcolor(positive, transp=75)
bgcolor(negative, transp=75)