MattDeLong

2% candle

Part of my strategy involves entering a trade based on a candle on a 5-min chart being < 2% (ignoring major volatility).
I got tired of calculating the range of a single candle either in my head or on a calculator, so I wrote this up. Feel free to share it.

Shows the %move of any single candle, default horizontal lines are 1% & 2%, can be changed by clicking the gear icon next to the indicator after you have added the indicator to your chart. Works on any timeframe, 5m, 1h, 1d, etc , obviously
the higher the timeframe, the larger the move.

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

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
//@version=2
//author = https://www.tradingview.com/u/MattDeLong/
//Shows the %move of any single candle, default horizontal lines are 1% & 2%, can be changed by clicking the gear icon next
//to the indicator after you have added the indicator to your chart. Works on any timeframe, 5m, 1h, 1d, etc , obviously 
//the higher the timeframe, the larger the move
study("2% candle", overlay=false)

move1 = input(1, 'Horizontal Line1 %', type=integer)
move2 = input(2, 'Horizontal Line2 %', type=integer)

move(k) =>
    (high[k] - low[k]) / high[k] * 100

p1 = plot(move(0), color=gray)
p2 = plot(move2, color=gray)
p3 = plot(move1, color=silver)
fill(p1, p2, color=#8b0000)
fill(p2, p3, color=red)