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)