Autarch_Capital

HG Scalpius - ATR Up/Down Tick Highlight

HG Scalpius - ATR Up/Down Tick Highlight


This indicator highlights ATR(14) upticks (green) and downticks (red) and has the below application:
- If a new trend closing high (low) is made on a downtick in ATR, decreasing volatility mode turns on


If you come across or think of any other useful scripts for the HG Scalpius system please comment below!


Links to 2 previous HG Scalpius scripts:
- -

Happy trading!


Code:
study(title="Average True Range", shorttitle="ATR", overlay=false)

length = input(title="Length", defval=14, minval=1)
smoothing = input(title="Smoothing", defval="RMA", options=)



ma_function(source, length) =>
if smoothing == "RMA"
rma(source, length)
else
if smoothing == "SMA"
sma(source, length)
else
if smoothing == "EMA"
ema(source, length)
else
wma(source, length)

ATR = ma_function(tr(true), length)
c = ATR >= ATR ? color.lime : color.red

plot(ATR, title = "ATR", color=c, transp=0)


สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?