OPEN-SOURCE SCRIPT
Buy-Sell Indicator - Michael Fernandes

This indicator combines ATR-based trailing stops with EMA crossovers to generate clear buy and sell signals.
It adapts dynamically to market volatility using the Average True Range (ATR) and optionally computes signals from Heikin-Ashi candles for smoother trends.
How It Works:
1. ATR Trailing Stop: Calculates a dynamic stop level above or below price depending on trend direction.
2. EMA Confirmation: A 1-period EMA crossover with the trailing stop helps validate entries.
3. Buy Signal: Triggered when price crosses above the trailing stop and EMA confirms momentum.
4. Sell Signal: Triggered when price crosses below the trailing stop and EMA confirms reversal.
Inputs:
1. Key Value (a): Sensitivity multiplier (higher = tighter stop, more signals).
2. ATR Period (c): Length of ATR used to measure volatility.
3. Heikin-Ashi Mode (h): Option to use smoothed candle data for cleaner trends.
It adapts dynamically to market volatility using the Average True Range (ATR) and optionally computes signals from Heikin-Ashi candles for smoother trends.
How It Works:
1. ATR Trailing Stop: Calculates a dynamic stop level above or below price depending on trend direction.
2. EMA Confirmation: A 1-period EMA crossover with the trailing stop helps validate entries.
3. Buy Signal: Triggered when price crosses above the trailing stop and EMA confirms momentum.
4. Sell Signal: Triggered when price crosses below the trailing stop and EMA confirms reversal.
Inputs:
1. Key Value (a): Sensitivity multiplier (higher = tighter stop, more signals).
2. ATR Period (c): Length of ATR used to measure volatility.
3. Heikin-Ashi Mode (h): Option to use smoothed candle data for cleaner trends.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน