[DAOL] Compression Release Strategy by DAOLSEC

Performance Metrics

Description

⏺️ What is it?[DAOL] Compression Release Strategy tests directional price movement after a period of low relative volatility.It combines Bollinger BandWidth, a frozen high–low range, consecutive breakout confirmation, and ATR-based risk levels.🔹 Compression — BandWidth below a historical percentile🔹 Frozen Range — price boundaries captured when compression is confirmed🔹 Release — two consecutive closes beyond the same boundary🔹 Risk Management — fixed stop, R-based target, and a range-return exitThis is an experimental backtesting strategy. It does not guarantee profitability or a particular win rate.⏺️ กลยุทธ์นี้คืออะไร?[DAOL] Compression Release Strategy เป็นกลยุทธ์สำหรับทดสอบการเคลื่อนที่ตามทิศทาง หลังราคามีความผันผวนต่ำเมื่อเทียบกับประวัติผสม Bollinger BandWidth กรอบราคาที่ตรึงไว้ การยืนยัน Breakout ต่อเนื่อง และระดับความเสี่ยงที่อ้างอิง ATR🔹 Compression — ความกว้าง BB ต่ำกว่าเกณฑ์จากประวัติ🔹 Frozen Range — กรอบราคาที่ตรึงเมื่อยืนยันการบีบตัว🔹 Release — ราคาปิดนอกขอบเดียวกันสองแท่งต่อเนื่อง🔹 Risk Management — Stop คงที่ เป้าหมายแบบ R และการออกเมื่อกลับข้ามขอบกรอบเป็นกลยุทธ์ทดลองสำหรับ Backtest ไม่รับประกันกำไรหรือ Win Rate⏺️ How does it work?Calculate Bollinger Bands using 20 bars and 2 standard deviations.Compare current BandWidth with the 20th percentile of the preceding 100 BandWidth observations, excluding the current observation.Require BandWidth to remain below that threshold for 3 consecutive closed bars.Freeze the highest high and lowest low of the latest 10 bars, including the confirmation bar.Wait for a close outside the frozen range.Require the immediately following bar to close beyond the same boundary.Reject the entry if the confirming close is more than 0.5 frozen ATR beyond that boundary.ATR 14 is captured when the range is frozen.⏺️ ทำงานอย่างไร?คำนวณ Bollinger Bands จาก 20 แท่ง และส่วนเบี่ยงเบนมาตรฐาน 2 เท่าเทียบ BandWidth ปัจจุบันกับเปอร์เซ็นไทล์ที่ 20 ของค่า BandWidth 100 แท่งก่อนหน้า โดยไม่รวมค่าปัจจุบันต้องต่ำกว่าเกณฑ์ต่อเนื่อง 3 แท่งปิดตรึงราคาสูงสุด–ต่ำสุดของ 10 แท่งล่าสุด รวมแท่งที่ยืนยันการบีบตัวรอราคาปิดหลุดกรอบแท่งถัดมาต้องปิดนอกขอบเดิมในทิศทางเดียวกันไม่เข้าเมื่อราคาปิดยืนยันห่างขอบเกิน 0.5 ATR ที่ตรึงไว้ใช้ ATR 14 ณ แท่งที่ตรึงกรอบ และไม่เริ่มเข้าเทรดในแท่งที่สร้างกรอบ⏺️ Entry and setup expiry🔹 Long — two consecutive closes above the frozen upper boundary🔹 Short — two consecutive closes below the frozen lower boundary🔹 Entry — a limit order at the confirming close, valid for the next chart bar only🔹 Setup lifetime — 10 bars after the range is armed by defaultBoth breakout closes must occur within the setup lifetime. Failed confirmation, excessive entry distance, or expiry consumes the setup.A new setup requires compression to end and a fresh three-bar compression sequence to form. The strategy holds one position at a time and does not add to positions.⏺️ การเข้าและอายุ Setup🔹 Long — ปิดเหนือขอบบนที่ตรึงสองแท่งต่อเนื่อง🔹 Short — ปิดใต้ขอบล่างที่ตรึงสองแท่งต่อเนื่อง🔹 Entry — ส่ง Limit ที่ราคาปิดแท่งยืนยัน โดยมีอายุถึงสิ้นแท่งถัดไป🔹 อายุ Setup — ค่าเริ่มต้น 10 แท่งหลังตรึงกรอบแท่ง Breakout และแท่งยืนยันต้องอยู่ภายในอายุ Setup หากยืนยันไม่สำเร็จ ราคาไกลเกินเกณฑ์ หรือหมดเวลา จะยกเลิก Setup นั้นต้องรอให้การบีบตัวสิ้นสุดแล้วเกิดการบีบตัวต่อเนื่องสามแท่งรอบใหม่ก่อนสร้าง Setup อีกครั้ง ถือครั้งละหนึ่งสถานะ ไม่เพิ่มไม้เครื่องหมาย L/S แสดงการส่งคำสั่ง ไม่ได้ยืนยันว่าคำสั่งถูกจับคู่แล้ว หากราคาไม่กลับมาถึง Limit อาจไม่มีเทรดเกิดขึ้น⏺️ Stop, target and exits🔹 Long stop — 0.5 frozen ATR below the upper breakout boundary🔹 Short stop — 0.5 frozen ATR above the lower breakout boundary🔹 Target — 2R by default, calculated from the confirming close and fixed stop🔹 Range-return exit — request a market close when price closes back to or across the breakout boundaryStop and target prices are rounded to valid ticks and remain fixed.Limit fills can differ from the confirming close, so actual entry reward-to-risk can differ from the planned ratio. Gaps and slippage can produce losses beyond the planned stop distance.⏺️ Stop เป้าหมาย และการออก🔹 Stop ของ Long — ต่ำกว่าขอบบนที่หลุด 0.5 ATR ที่ตรึงไว้🔹 Stop ของ Short — สูงกว่าขอบล่างที่หลุด 0.5 ATR ที่ตรึงไว้🔹 Target — ค่าเริ่มต้น 2R คำนวณจากราคาปิดยืนยันและ Stop🔹 Range-return exit — ขอปิดด้วย Market Order เมื่อราคาปิดกลับถึงหรือข้ามขอบที่หลุดระดับ Stop/Target ปัดตาม Tick และคงที่ตลอดเทรดราคา Fill อาจต่างจากราคาปิดยืนยัน ทำให้ Reward-to-Risk จริงต่างจากที่วางแผนไว้ ส่วน Gap และ Slippage อาจทำให้ขาดทุนเกินระยะ StopStop ทำงานทันที จึงยังเข้าและออกภายในแท่งเดียวกันได้ ไม่มี Trailing Stop, Time Exit หรือการปิดสิ้นวันอัตโนมัติ และอาจถือข้ามคืน⏺️ Chart display and timeframes🔹 Blue lines — frozen range boundaries🔹 Red line — fixed stop🔹 Green line — fixed target🔹 L / S markers — entry-order submission bars🔹 Dashboard — current strategy state and chart timeframeThe strategy does not restrict standard-chart timeframes. All calculations use bar counts, not fixed elapsed time.For example, a 10-bar setup covers approximately 50 chart minutes on a 5-minute chart, but 10 trading days on a daily chart.Timeframe compatibility does not imply validated performance on every timeframe. Use standard OHLC or candlestick charts.⏺️ การแสดงผลและ Timeframe🔹 เส้นน้ำเงิน — ขอบกรอบที่ตรึงไว้🔹 เส้นแดง — Stop คงที่🔹 เส้นเขียว — Target คงที่🔹 เครื่องหมาย L / S — แท่งที่ส่งคำสั่งเข้า🔹 Dashboard — สถานะกลยุทธ์และ Timeframe ของกราฟไม่จำกัด Timeframe ของกราฟมาตรฐาน แต่สูตรทั้งหมดนับตาม จำนวนแท่ง ไม่ใช่ระยะเวลาคงที่ตัวอย่าง Setup 10 แท่งครอบคลุมประมาณ 50 นาทีของแท่งกราฟ 5 นาที แต่ครอบคลุม 10 วันซื้อขายบนกราฟรายวัน เช่นเดียวกับ Limit ที่มีอายุหนึ่งแท่ง ซึ่งเปลี่ยนระยะเวลาตาม Timeframeการรองรับ Timeframe ไม่ได้ยืนยันว่าผลดีทุกช่วงเวลา ใช้กราฟ OHLC หรือแท่งเทียนมาตรฐาน และต้องมีประวัติเพียงพอสำหรับการคำนวณ⏺️ Settings and backtesting propertiesUser inputs:🔹 Contracts — default 1🔹 Target — default 2R🔹 Setup lifetime — default 10 bars🔹 Test start / end datesFixed calculation settings:🔹 Bollinger Bands — 20 / 2🔹 Historical percentile — 20th percentile of the preceding 100 observations🔹 Compression confirmation — 3 closed bars🔹 Frozen range — 10 bars🔹 ATR — 14Supplied Properties defaults:🔹 Account currency — THB🔹 Initial capital — THB 1,000,000🔹 Commission — THB 50 per contract per fill🔹 Slippage — 1 tick🔹 Long / Short margin — 100% of notional value🔹 Pyramiding, every-tick recalculation, after-fill recalculation and bar-close fills — disabledThese are test placeholders, not actual TFEX fees or margin requirements.⏺️ ค่าตั้งและการทดสอบInput ที่ปรับได้:🔹 จำนวนสัญญา — ค่าเริ่มต้น 1🔹 Target — ค่าเริ่มต้น 2R🔹 อายุ Setup — ค่าเริ่มต้น 10 แท่ง🔹 วันเริ่มและสิ้นสุดการทดสอบค่าคำนวณที่คงไว้:🔹 Bollinger Bands — 20 / 2🔹 เกณฑ์ประวัติ — เปอร์เซ็นไทล์ที่ 20 จาก 100 ค่าก่อนหน้า🔹 ยืนยันการบีบตัว — 3 แท่งปิด🔹 กรอบที่ตรึง — 10 แท่ง🔹 ATR — 14ค่าตัวอย่างใน Properties:🔹 สกุลเงินบัญชี — THB🔹 เงินทุนเริ่มต้น — 1,000,000 บาท🔹 Commission — 50 บาทต่อสัญญาต่อครั้งที่จับคู่🔹 Slippage — 1 Tick🔹 Margin Long / Short — 100% ของมูลค่าสัญญา🔹 ปิดการเพิ่มไม้ การคำนวณทุก Tick การคำนวณหลัง Fill และการจับคู่ที่แท่งปิดต้องปรับค่าต้นทุนและ Margin ให้เหมาะกับบัญชีจริงก่อนอ่านผล โดย Margin 100% อาจทำให้ไม่เกิดเทรดหากเงินทุนไม่เพียงพอ จำนวนสัญญาใช้ค่าจาก Input “Contracts”⏺️ Development and referencesThis Pine Script v6 implementation was written for this project without copying Community script source.The underlying Squeeze and ATR concepts are established methods. The implementation combines them with a frozen-range event model, setup expiry, consecutive breakout confirmation, a maximum entry-distance filter, and a range-return exit.No claim is made that these underlying concepts are new, that no similar Community script exists, or that the strategy achieves a particular win rate.References:TradingView — Bollinger BandWidthtradingview.com/support/solutions/43000501972-bollinger-bandwidth-bbw/TradingView — Average True Rangetradingview.com/support/solutions/43000501823-average-true-range-atr/TradingView — Pine Script Strategiestradingview.com/pine-script-docs/concepts/strategies/⏺️ การพัฒนาและอ้างอิงเขียนด้วย Pine Script v6 สำหรับโครงการนี้ โดยไม่คัดลอกโค้ดจากสคริปต์ CommunitySqueeze และ ATR เป็นหลักการที่มีอยู่แล้ว ส่วนการต่อยอดคือการตรึงกรอบ กำหนดอายุ Setup ยืนยัน Breakout ต่อเนื่อง จำกัดระยะไล่ราคา และออกเมื่อกลับข้ามขอบกรอบไม่อ้างว่าแนวคิดพื้นฐานทั้งหมดใหม่ ไม่มีสคริปต์ใกล้เคียงใน Community หรือให้ Win Rate ตามเปอร์เซ็นต์ที่กำหนด⏺️ Limitations and disclaimer🔹 Low volatility does not guarantee a subsequent directional expansion.🔹 Breakouts can reverse despite two-bar confirmation.🔹 Limit orders can miss trades, and gap fills can invalidate planned reward-to-risk.🔹 Results depend on timeframe, trading costs, data quality and contract-roll effects.🔹 Orders or positions at the end of available history may remain unresolved.🔹 Numerical logic checks have been completed; TradingView compilation and market-data backtesting remain pending.🔹 This is a testing candidate. Complete validation before public publication.🔹 For educational and informational purposes only. No investment advice or return guarantee is provided.⏺️ ข้อจำกัดและคำชี้แจง🔹 ความผันผวนต่ำไม่ได้รับประกันว่าจะเกิดการขยายตัวตามทิศทาง🔹 Breakout อาจกลับตัวได้ แม้ยืนยันสองแท่งแล้ว🔹 Limit อาจไม่ถูกจับคู่ และ Gap อาจทำให้ความเสี่ยงต่างจากแผน🔹 ผลขึ้นกับ Timeframe ต้นทุน คุณภาพข้อมูล และรอยต่อสัญญา🔹 คำสั่งหรือสถานะที่ปลายประวัติอาจยังไม่จบ หากไม่มี Tick ถัดไป🔹 ตรวจตรรกะพื้นฐานแล้ว แต่ยังไม่ได้ Compile ใน TradingView หรือ Backtest ข้อมูลตลาดจริง🔹 เป็นฉบับสำหรับทดสอบ ต้องตรวจสอบก่อนเผยแพร่ Public🔹 ใช้เพื่อการศึกษา ไม่ใช่คำแนะนำการลงทุนหรือการรับประกันผลตอบแทน

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView