JayRogers

High Low Envelope Sigma

Description:

High and Low Envelope channel with median line and 'sigma' offsets to try and encapsulate price flow and quickly locate likely areas of support and resistance on the fly.
สคริปต์โอเพนซอร์ซ

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

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

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

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

study(title = "High Low Envelope Sigma", shorttitle = "HLE Sigma", overlay = true)

// Revision:        1
// Author:          @JayRogers
//
// *** USE AT YOUR OWN RISK ***
// 
// Description:
// - High and Low Envelope channel with median line and 'sigma' offsets to try and encapsulate
//   price flow and quickly locate likely areas of support and resistance within smaller trend.

//=== INPUTS ===
length  = input(defval = 25, title = "Envelope Length", minval = 1, maxval = 1000)
sigma   = input(defval = 1.0, title = "Sigma Multiply", minval = 0.01, step = 0.1)
//=== /INPUTS ===

//=== SERIES and VAR ===
upperEnvelope   = highest(high, length)
lowerEnvelope   = lowest(low, length)
envelopeMedian  = (upperEnvelope + lowerEnvelope) / 2
envelopeSigma   = ((upperEnvelope - lowerEnvelope) / 8) * sigma
//=== /SERIES and VAR ===

//=== PLOTTING ===
plot(upperEnvelope, title = "Upper Envelope", color = #66FFFF, linewidth = 2)
plot(envelopeMedian + envelopeSigma, title = "Upper Sigma", color = #66FFFF, linewidth = 1, style = line)
plot(envelopeMedian, title = "Median", color = silver, linewidth = 1, style = circles)
plot(envelopeMedian - envelopeSigma, title = "Lower Sigma", color = #FF1133, linewidth = 1, style = line)
plot(lowerEnvelope, title = "Lower Envelope", color = #FF1133, linewidth = 2)
//=== /PLOTTING ===