Entry Band(trial)This indicator is trial version. You can use for a month for free.
The indicator includes moving average and exponential moving average .
you can set the parameters you want.
you can see the trend.
green : up trend
orange : down trend
if you want to use this indicator, Please join the URL:
Cari dalam skrip untuk "entry"
Entry BandThe indicator includes moving average and exponential moving average.
you can set the parameters you want.
you can see the trend.
green : up trend
orange : down trend
if you want to use this indicator, Please join the URL:
Entry FactorFind the most relevant price direction changes with ease, with this geometry-based indicator.
Stop wasting your time with moves that don't offer a satisfactory range for good profits.
Entry Bars -This algorithm takes in consideration Media averages, Volatility Movements and other Mathematical Properties.
-After adding this signal on TradingView, you will get notified every of potential long and short points triggered by the indicator.
-This signal alerts you anytime bars form a bullish or bearish pattern and price start to move in the suggested direction.
-It works in any time frame or market like Forex, Crypto, Commodities even Stocks.
-Recommended for bots or manual trading.
Do you need an Script or an expert adviser for Forex, contact our coding service
Get this indicator today! contact us
RocketScalperEntry follows the first normal candle after the highlights - use in conjunction with basic patterns, SFPs, and the until1mil indicators (SSO/MACD/MI/BZ)
[MV] %B with SMA + Volume Based Colored Bars
Entry Signal when %B Crosses with SMA and this is more meaningful if it supports colored bars.
Black Bar when prices go down and volume is bigger than 150% of its average, that indicates us price action is supported by a strong bearish volume
Blue Bar when prices go up and volume bigger than 150% of its average, that indicates us price action is supported by a strong bullish volume
VBC author @KIVANCfr3762
FX Sniper: T3-CCI Strategy - With 100 IndicatorsEntry signal when moving above -100, sell signal when going below 100
Amazing Crossover SystemEntry Rules
BUY when the 5 EMA crosses above the 10 EMA from underneath and the RSI crosses above the 50.0 mark from the bottom.
SELL when the 5 EMA crosses below the 10 EMA from the top and the RSI crosses below the 50.0 mark from the top.
Make sure that the RSI did cross 50.0 from the top or bottom and not just ranging tightly around the level.
How to setup Alert:
1) Add the Amazing Crossover System to your chart via Indicators
2) Find your currency pair
3) Set the timeframe on the chart to 1 hour
4) Press 'Alt + A' (create alert shortcut)
5) Set the following criteria for the alert:
Condition = 'Amazing Crossover System', Plot, ' BUY Signal'
The rest of the alert can be customized to your preferences
5) Repeat steps 1 - 4, but set the Condition = 'Amazing Crossover System', Plot, ' SELL Signal'
[TH] กลยุทธ์ SMC หลายกรอบเวลา (V5.2 - M15 Lead)English Explanation
This Pine Script code implements a multi-timeframe trading strategy based on Smart Money Concepts (SMC). It's designed to identify high-probability trading setups by aligning signals across three different timeframes.
The core logic is as follows:
High Timeframe (HTF) - M15: Determines the overall market direction or bias.
Medium Timeframe (MTF) - M5: Identifies potential Points of Interest (POI), such as Order Blocks or Fair Value Gaps, in alignment with the M15 bias.
Low Timeframe (LTF) - Current Chart: Looks for a specific entry trigger within the M5 POI to execute the trade.
Detailed Breakdown
## Part 1: Inputs & Settings
This section allows you to customize the indicator's parameters:
General Settings:
i_pivotLookback: Sets the lookback period for identifying pivot highs and lows on the LTF, which is crucial for finding the Change of Character (CHoCH).
M15 Bias Settings:
i_m15EmaFast / i_m15EmaSlow: These two EMA (Exponential Moving Average) values on the 15-minute chart determine the main trend. A bullish trend is confirmed when the fast EMA is above the slow EMA, and vice-versa for a bearish trend.
M5 Point of Interest (POI) Settings:
i_showM5Fvg / i_showM5Ob: Toggles the visibility of Fair Value Gaps (FVG) and Order Blocks (OB) on the 5-minute chart. These are the zones where the script will look for trading opportunities.
i_maxPois: Limits the number of POI zones drawn on the chart to keep it clean.
LTF Entry Settings:
i_entryMode:
Confirmation: The script waits for a Change of Character (CHoCH) on the LTF (your current chart) after the price enters an M5 POI. A CHoCH is a break of a recent pivot high (for buys) or pivot low (for sells), suggesting a potential reversal. This is the safer entry method.
Aggressive: The script triggers an entry as soon as the price touches the 50% level of the M5 POI, without waiting for a CHoCH. This is higher risk but can provide a better entry price.
i_showChoch: Toggles the visibility of the CHoCH confirmation lines.
Trade Management Settings:
i_tpRatio: Sets the Risk-to-Reward Ratio (RRR) for the Take Profit target. For example, a value of 2.0 means the Take Profit distance will be twice the Stop Loss distance.
i_slMode: (New in V5.2) Provides four different methods to calculate the Stop Loss:
POI Zone (Default): Places the SL at the outer edge of the M5 POI zone.
Last Swing: Places the SL at the most recent LTF swing high/low before the entry.
ATR: Uses the Average True Range (ATR) indicator to set a volatility-based SL.
Previous Candle: Places the SL at the high or low of the candle immediately preceding the entry. This is the tightest and riskiest option.
i_maxHistory: Sets the number of past trades to display on the chart.
## Part 2: Data Types & Variables
This section defines custom data structures (type) to organize information:
Poi: A structure to hold all information related to a single Point of Interest, including its price boundaries, direction (bullish/bearish), and whether it has been mitigated (touched by price).
Trade: A structure to store details for each trade, such as its entry price, SL, TP, result (Win/Loss/Active), and chart objects for drawing.
## Part 3: Core Logic & Calculations
This is the engine of the indicator:
Data Fetching: It uses request.security to pull EMA data from the M15 timeframe and candle data (high, low, open, close) from the M5 timeframe.
POI Identification: The script constantly scans the M5 data for FVG and OB patterns. When a valid pattern is found that aligns with the M15 bias (e.g., a bullish OB during an M15 uptrend), it's stored as a Poi and drawn on the chart.
Entry Trigger:
It checks if the price on the LTF enters a valid (unmitigated) POI zone.
Based on the selected i_entryMode, it either waits for a CHoCH or enters aggressively.
Once an entry condition is met, it calculates the SL based on the i_slMode, calculates the TP using the i_tpRatio, and creates a new Trade.
Trade Monitoring: For every active trade, the script checks on each new bar if the price has hit the SL or TP level. When it does, the trade's result is updated, and the visual boxes are finalized.
## Part 5: On-Screen Display
This part creates the Performance Dashboard table shown on the top-right of the chart. It provides a real-time summary of:
M15 Bias: Current market direction.
Total Trades: The total number of completed trades from the history.
Win Rate: The percentage of winning trades.
Total R-Multiple: The cumulative Risk-to-Reward multiple (sum of RRR from wins minus losses). A positive value indicates overall profitability.
🇹🇭 คำอธิบายและข้อแนะนำภาษาไทย
สคริปต์นี้เป็น Indicator สำหรับกลยุทธ์การเทรดแบบ Smart Money Concepts (SMC) ที่ใช้การวิเคราะห์จากหลายกรอบเวลา (Multi-Timeframe) เพื่อหาจุดเข้าเทรดที่มีความเป็นไปได้สูง
หลักการทำงานของ Indicator มีดังนี้:
Timeframe ใหญ่ (HTF) - M15: ใช้กำหนดทิศทางหลักของตลาด หรือ "Bias"
Timeframe กลาง (MTF) - M5: ใช้หาโซนสำคัญ หรือ "Point of Interest (POI)" เช่น Order Blocks หรือ Fair Value Gaps ที่สอดคล้องกับทิศทางจาก M15
Timeframe เล็ก (LTF) - กราฟปัจจุบัน: ใช้หาสัญญาณยืนยันเพื่อเข้าเทรดในโซน POI ที่กำหนดไว้
รายละเอียดของโค้ด
## ส่วนที่ 1: การตั้งค่า (Inputs & Settings)
ส่วนนี้ให้คุณปรับแต่งค่าต่างๆ ของ Indicator ได้:
การตั้งค่าทั่วไป:
i_pivotLookback: กำหนดระยะเวลาที่ใช้มองหาจุดกลับตัว (Pivot) ใน Timeframe เล็ก (LTF) เพื่อใช้ยืนยันสัญญาณ Change of Character (CHoCH)
การตั้งค่า M15 (ทิศทางหลัก):
i_m15EmaFast / i_m15EmaSlow: ใช้เส้น EMA 2 เส้นบน Timeframe 15 นาที เพื่อกำหนดเทรนด์หลัก หาก EMA เร็วอยู่เหนือ EMA ช้า จะเป็นเทรนด์ขาขึ้น และในทางกลับกัน
การตั้งค่า M5 (จุดสนใจ - POI):
i_showM5Fvg / i_showM5Ob: เปิด/ปิด การแสดงโซน Fair Value Gaps (FVG) และ Order Blocks (OB) บน Timeframe 5 นาที ซึ่งเป็นโซนที่สคริปต์จะใช้หาโอกาสเข้าเทรด
i_maxPois: จำกัดจำนวนโซน POI ที่จะแสดงผลบนหน้าจอ เพื่อไม่ให้กราฟดูรกเกินไป
การตั้งค่า LTF (การเข้าเทรด):
i_entryMode:
ยืนยัน (Confirmation): เป็นโหมดที่ปลอดภัยกว่า โดยสคริปต์จะรอให้เกิดสัญญาณ Change of Character (CHoCH) ใน Timeframe เล็กก่อน หลังจากที่ราคาเข้ามาในโซน POI แล้ว
เชิงรุก (Aggressive): เป็นโหมดที่เสี่ยงกว่า โดยสคริปต์จะเข้าเทรดทันทีที่ราคาแตะระดับ 50% ของโซน POI โดยไม่รอสัญญาณยืนยัน CHoCH
i_showChoch: เปิด/ปิด การแสดงเส้น CHoCH บนกราฟ
การตั้งค่าการจัดการเทรด:
i_tpRatio: กำหนด อัตราส่วนกำไรต่อความเสี่ยง (Risk-to-Reward Ratio) เพื่อตั้งเป้าหมายทำกำไร (Take Profit) เช่น 2.0 หมายถึงระยะทำกำไรจะเป็น 2 เท่าของระยะตัดขาดทุน
i_slMode: (ฟีเจอร์ใหม่ V5.2) มี 4 รูปแบบในการคำนวณ Stop Loss:
โซน POI (ค่าเริ่มต้น): วาง SL ไว้ที่ขอบนอกสุดของโซน POI
Swing ล่าสุด: วาง SL ไว้ที่จุด Swing High/Low ล่าสุดของ Timeframe เล็ก (LTF) ก่อนเข้าเทรด
ATR: ใช้ค่า ATR (Average True Range) เพื่อกำหนด SL ตามระดับความผันผวนของราคา
แท่งเทียนก่อนหน้า: วาง SL ไว้ที่ราคา High/Low ของแท่งเทียนก่อนหน้าที่จะเข้าเทรด เป็นวิธีที่ SL แคบและเสี่ยงที่สุด
i_maxHistory: กำหนดจำนวนประวัติการเทรดที่จะแสดงย้อนหลังบนกราฟ
## ส่วนที่ 2: ประเภทข้อมูลและตัวแปร
ส่วนนี้เป็นการสร้างโครงสร้างข้อมูล (type) เพื่อจัดเก็บข้อมูลให้เป็นระบบ:
Poi: เก็บข้อมูลของโซน POI แต่ละโซน เช่น กรอบราคาบน-ล่าง, ทิศทาง (ขึ้น/ลง) และสถานะว่าถูกใช้งานไปแล้วหรือยัง (Mitigated)
Trade: เก็บรายละเอียดของแต่ละการเทรด เช่น ราคาเข้า, SL, TP, ผลลัพธ์ (Win/Loss/Active) และอ็อบเจกต์สำหรับวาดกล่องบนกราฟ
## ส่วนที่ 3: ตรรกะหลักและการคำนวณ
เป็นหัวใจสำคัญของ Indicator:
ดึงข้อมูลข้าม Timeframe: ใช้ฟังก์ชัน request.security เพื่อดึงข้อมูล EMA จาก M15 และข้อมูลแท่งเทียนจาก M5 มาใช้งาน
ระบุ POI: สคริปต์จะค้นหา FVG และ OB บน M5 ตลอดเวลา หากเจ้ารูปแบบที่สอดคล้องกับทิศทางหลักจาก M15 (เช่น เจอ Bullish OB ในขณะที่ M15 เป็นขาขึ้น) ก็จะวาดโซนนั้นไว้บนกราฟ
เงื่อนไขการเข้าเทรด:
เมื่อราคาใน Timeframe เล็ก (LTF) วิ่งเข้ามาในโซน POI ที่ยังไม่เคยถูกใช้งาน
สคริปต์จะรอสัญญาณตาม i_entryMode ที่เลือกไว้ (รอ CHoCH หรือเข้าแบบ Aggressive)
เมื่อเงื่อนไขครบ จะคำนวณ SL และ TP จากนั้นจึงบันทึกการเทรดใหม่
ติดตามการเทรด: สำหรับเทรดที่ยัง "Active" อยู่ สคริปต์จะคอยตรวจสอบทุกแท่งเทียนว่าราคาไปถึง SL หรือ TP แล้วหรือยัง เมื่อถึงจุดใดจุดหนึ่ง จะบันทึกผลและสิ้นสุดการวาดกล่องบนกราฟ
## ส่วนที่ 5: การแสดงผลบนหน้าจอ
ส่วนนี้จะสร้างตาราง "Performance Dashboard" ที่มุมขวาบนของกราฟ เพื่อสรุปผลการทำงานแบบ Real-time:
M15 Bias: แสดงทิศทางของตลาดในปัจจุบัน
Total Trades: จำนวนเทรดทั้งหมดที่เกิดขึ้นในประวัติ
Win Rate: อัตราชนะ คิดเป็นเปอร์เซ็นต์
Total R-Multiple: ผลตอบแทนรวมจากความเสี่ยง (R) ทั้งหมด (ผลรวม RRR ของเทรดที่ชนะ ลบด้วยจำนวนเทรดที่แพ้) หากเป็นบวกแสดงว่ามีกำไรโดยรวม
📋 ข้อแนะนำในการใช้งาน
Timeframe ที่เหมาะสม: Indicator นี้ถูกออกแบบมาให้ใช้กับ Timeframe เล็ก (LTF) เช่น M1, M3 หรือ M5 เนื่องจากมันดึงข้อมูลจาก M15 และ M5 มาเป็นหลักการอยู่แล้ว
สไตล์การเทรด:
Confirmation: เหมาะสำหรับผู้ที่ต้องการความปลอดภัยสูง รอการยืนยันก่อนเข้าเทรด อาจจะตกรถบ้าง แต่ลดความเสี่ยงจากการเข้าเทรดเร็วเกินไป
Aggressive: เหมาะสำหรับผู้ที่ยอมรับความเสี่ยงได้สูงขึ้น เพื่อให้ได้ราคาเข้าที่ดีที่สุด
การเลือก Stop Loss:
"Swing ล่าสุด" และ "โซน POI" เป็นวิธีมาตรฐานตามหลัก SMC
"ATR" เหมาะกับตลาดที่มีความผันผวนสูง เพราะ SL จะปรับตามสภาพตลาด
"แท่งเทียนก่อนหน้า" เป็นวิธีที่เสี่ยงที่สุด เหมาะกับการเทรดเร็วและต้องการ RRR สูงๆ แต่ก็มีโอกาสโดน SL ง่ายขึ้น
การบริหารความเสี่ยง: Indicator นี้เป็นเพียง เครื่องมือช่วยวิเคราะห์ ไม่ใช่สัญญาณซื้อขายอัตโนมัติ 100% ผู้ใช้ควรมีความเข้าใจในหลักการของ SMC และทำการบริหารความเสี่ยง (Risk Management) อย่างเคร่งครัดเสมอ
การทดสอบย้อนหลัง (Backtesting): ควรทำการทดสอบ Indicator กับสินทรัพย์และตั้งค่าต่างๆ เพื่อให้เข้าใจลักษณะการทำงานและประสิทธิภาพของมันก่อนนำไปใช้เทรดจริง
Spot Nachkauf-Zonen High TF (RSI + BB)**Spot Buy/Sell Zones High TF Indicator (RSI + Bollinger Bands + Trend & Volume Filters)**
This is an overlay indicator for TradingView that highlights optimal buy and sell areas on a higher timeframe (e.g. Daily, Weekly) while you view a lower timeframe chart. It combines volatility, momentum, trend and volume checks to reduce false signals.
---
### Key Features
* **Higher-Timeframe Calculations**
All indicators (Bollinger Bands, RSI, moving averages, volume) use data from a user-selected timeframe (for example “D” for daily or “W” for weekly).
* **Bollinger Bands**
* Middle line: Simple Moving Average (SMA) over N periods
* Upper/Lower bands: ±M × standard deviation
* Semi-transparent fill between the bands for quick visual reference
* **RSI Momentum**
* Classic 14-period RSI with adjustable overbought (e.g. 70) and oversold (e.g. 30) levels
* **Buy** when RSI crosses up out of oversold and price touches or goes below the lower Bollinger Band
* **Sell** when RSI crosses down out of overbought and price touches or goes above the upper Bollinger Band
* **Trend Filter (Optional)**
* Higher-TF SMA (default 200 periods) plotted in orange
* Signals only fire when price is above the SMA (for buys) or below (for sells) to align with the main trend
* **Volume Filter (Optional)**
* Compares current higher-TF volume against its SMA
* Signals require volume to exceed a user-set multiplier of average volume, ensuring real market participation
* **Visual Signals**
* Green triangles below bars mark buy zones; red triangles above bars mark sell zones
* Light green background highlights active buy areas
* **Built-In Alerts**
* Two alert conditions (“Buy Signal” and “Sell Signal”) ready to be used in TradingView’s Alert dialog
* Customizable alert messages include ticker and timeframe
---
### Inputs
| Setting | Default | Purpose |
| ------------------------- | ------- | ------------------------------------------------ |
| **Calculation Timeframe** | D | Higher timeframe for all calculations |
| **BB Periods** | 20 | Length of SMA for Bollinger middle line |
| **BB Std-Dev Multiplier** | 2.0 | Number of standard deviations for the bands |
| **RSI Periods** | 14 | Length of the RSI calculation |
| **Overbought / Oversold** | 70 / 30 | RSI thresholds for signal generation |
| **Enable Trend Filter** | true | Use higher-TF SMA to confirm trend direction |
| **Trend MA Periods** | 200 | SMA length for the trend filter |
| **Enable Volume Filter** | true | Require above-average volume to validate signals |
| **Volume MA Periods** | 20 | SMA length for volume filter |
| **Volume Multiplier** | 1.2 | How many times above average volume is needed |
---
### How to Use
1. **Add the Script**: Paste the Pine code into TradingView’s Pine Editor and save.
2. **Adjust Settings**: Choose your higher timeframe (“D”, “W”, etc.) and tweak BB, RSI, trend, and volume parameters.
3. **Activate Alerts**: In the Alerts panel, select the “Buy Signal” or “Sell Signal” alert condition.
4. **Interpret Signals**:
* A green triangle + green background = suggested buy zone
* A red triangle = suggested sell zone
This setup gives you clear, rule-based entry and exit areas by filtering noise and confirming market strength on a higher timeframe.
Cobra Hedge Dashboard – V1.0 Final Master
# 🧠 Cobra Hedge Dashboard – V1.0 Final Master
A **professional hedge management panel** built to help you monitor and manage Buy/Sell positions in real time — with clarity, logic, and safety.
Created by **Cobra Aljarhy**, and now available to the community **100% FREE**.
---
## 💡 What is this tool used for?
This tool is made for **traders using hedge strategies** — managing both Buy and Sell trades on the same symbol — to:
- 📊 **Track floating profits/losses**
- 🧮 **Calculate equity, drawdown %, and coverage %**
- 🧭 **Identify danger and safe zones for unlocking**
- 📍 **Find the breakeven price**
- 📤 **Suggest when to cool down positions**
- 🔔 **Give clear recommendations based on account status**
Whether you're in deep floating losses or planning to scale out, this dashboard gives you visibility and control — instead of relying on emotions.
---
## ✨ Key Features
- 🔁 Real-time monitoring of Buy & Sell trades
- 📈 Equity (manual or auto)
- 💥 Floating P/L breakdown
- ⚠️ Danger Zone & Safe Zone detection
- 🎯 Breakeven price auto calculation
- 🧪 Cooling suggestions (Buy or Sell)
- 📝 Recommendation panel with direct advice
- 🔔 Optional alerts or webhook support
---
## ✅ Works With Any Symbol:
- Forex
- Commodities (e.g. Gold)
- Crypto
- Indices
- CFDs
Just input the correct entry prices, lots, and contract size — and the system takes care of the logic.
---
Released by **Cobra Aljarhy** for every trader out there dealing with hedge chaos or deep floating positions.
💚 Use it. Share it. Help others.
> The strongest traders don’t fear floating loss – they manage it smartly.
# 🧠 Cobra Hedge Dashboard – V1.0 Final Master
لوحة تحكم احترافية لإدارة صفقات الهيدج المعقدة في الأسواق المالية، مصممة خصيصًا لمساعدتك على اتخاذ قرارات ذكية لحظة بلحظة بناءً على حالة الحساب الفعلية.
---
## 💡 ما وظيفة هذه الأداة؟
📌 تستخدم هذه الأداة لمتابعة وتقييم مراكز الهيدج المفتوحة (شراء وبيع) في نفس الوقت على نفس الأداة المالية، وتساعدك في:
- **فهم وضع الحساب الحالي بدقة**
- **معرفة الوقت المثالي لفك صفقة أو التبريد**
- **تجنّب مناطق الخطر قبل فوات الأوان**
- **حساب نقطة التعادل بين المراكز Buy/Sell**
- **اتخاذ قرارات إدارة مخاطر منطقية بناءً على بيانات حية**
🚀 مناسبة لأي متداول يستخدم استراتيجيات الهيدج أو تبريد المراكز أو السيطرة على الخسارة العائمة.
---
## 📊 المزايا الأساسية:
- 🔁 مراقبة مباشرة لصفقات Buy وSell
- 🧮 حساب تلقائي لـ:
- Floating P/L
- Drawdown %
- Coverage %
- Equity (يدوي أو تلقائي)
- Breakeven Price
- ⚠️ اكتشاف تلقائي لمناطق الخطر (Danger Zone) والأمان (Safe Zone)
- 🧪 توصية تلقائية بالتبريد الذكي (Cooling Suggestion)
- 📝 عرض توصية واضحة حسب حالة الحساب الفعلية
- 🔔 تنبيهات صوتية أو عن طريق Webhook/Telegram (اختياري)
---
## ⚙️ متوافق مع:
✅ أي أداة مالية على TradingView:
- الذهب (XAUUSD)
- العملات (Forex)
- المؤشرات (Indices)
- العملات الرقمية (Crypto)
- الأسهم وCFD
فقط أدخل بيانات الصفقة بدقة (سعر الدخول – اللوت – الرصيد).
--
تم تطويره بالكامل من قبل **Cobra Aljarhy**
💚 استخدمه – انشره – وادعم كل متداول حقيقي يبحث عن إنقاذ مراكزه بإستراتيجية لا بعشوائية.
--
> 🧠 المنطق هو السلاح الأقوى في السوق – واستخدامك له يبدأ من هنا.
FibLevel Size CalculatorThis skript calculates position sizes and new take profits for sizing into an long or short position with 3 entrys defined at custom fibonacci retracement levels.
TP: -0,272
Entry1: 0.382
Entry2: 0.618
Entry3: 0.83
SL: 1.05
Expected RR per trade is 0.2 with a High Win rate definitly profitable.
Search for an established trend on the higher timeframe, drop to the smaller ones and look for correction waves. Once they break to the trenddirection of the higher timeframe take the fib from lowest to highes point. Draw a fib level on the chart and use the Indicator to define these Levels above. The calculator gives you the Margin to use in each position, and will check that you will not get liquidated an that you have enough margin. It tells you the new TP for Limit2 and Limit3 if they get hit so you can get out of the trade full TP with a small bounce.
Inputs:
Account Balance, Risk Percentage, and Leverage: These inputs are used to calculate the position size and risk.
Entry 1, Entry 2, Entry 3, Take Profit (TP), and Stop Loss (SL): These prices are used for calculating position sizes, risk, and profit for up to three entry points.
Calculations:
Risk Amount: Calculated based on the account balance and risk percentage.
Position Sizes (Qty): For each entry point, the position size is determined. The second and third entries have a multiplier (3x for Entry 2, 5x for Entry 3) compared to the first.
Stop Loss and Profit Calculation: The script calculates the potential profit and adjusts the TP levels based on the average entries for Limit 2 and Limit 3.
Margin Calculation: Margin requirements for each position are calculated based on leverage.
Output:
Table Display: A table shows key values like entry prices, position sizes, TP levels, potential profit, and margin requirements for each limit.
Warnings: It includes a liquidation warning and a check for whether the account is at risk of liquidation based on leverage.
Position Type: It automatically detects if the trade is a long or short based on the relationship between TP and SL.
Visualization:
Lines: It draws horizontal lines on the chart to visually represent the entry, TP, and SL levels.
Overall, this script is designed to help traders manage risk and calculate position sizes for multi-level entries using leverage.
Pls drop feedback in the comments.
Nef33 Forex & Crypto Trading Signals PRO
1. Understanding the Indicator's Context
The indicator generates signals based on confluence (trend, volume, key zones, etc.), but it does not include predefined SL or TP levels. To establish them, we must:
Use dynamic or static support/resistance levels already present in the script.
Incorporate volatility (such as ATR) to adjust the levels based on market conditions.
Define a risk/reward ratio (e.g., 1:2).
2. Options for Determining SL and TP
Below, I provide several ideas based on the tools available in the script:
Stop Loss (SL)
The SL should protect you from adverse movements. You can base it on:
ATR (Volatility): Use the smoothed ATR (atr_smooth) multiplied by a factor (e.g., 1.5 or 2) to set a dynamic SL.
Buy: SL = Entry Price - (atr_smooth * atr_mult).
Sell: SL = Entry Price + (atr_smooth * atr_mult).
Key Zones: Place the SL below a support (for buys) or above a resistance (for sells), using Order Blocks, Fair Value Gaps, or Liquidity Zones.
Buy: SL below the nearest ob_lows or fvg_lows.
Sell: SL above the nearest ob_highs or fvg_highs.
VWAP: Use the daily VWAP (vwap_day) as a critical level.
Buy: SL below vwap_day.
Sell: SL above vwap_day.
Take Profit (TP)
The TP should maximize profits. You can base it on:
Risk/Reward Ratio: Multiply the SL distance by a factor (e.g., 2 or 3).
Buy: TP = Entry Price + (SL Distance * 2).
Sell: TP = Entry Price - (SL Distance * 2).
Key Zones: Target the next resistance (for buys) or support (for sells).
Buy: TP at the next ob_highs, fvg_highs, or liq_zone_high.
Sell: TP at the next ob_lows, fvg_lows, or liq_zone_low.
Ichimoku: Use the cloud levels (Senkou Span A/B) as targets.
Buy: TP at senkou_span_a or senkou_span_b (whichever is higher).
Sell: TP at senkou_span_a or senkou_span_b (whichever is lower).
3. Practical Implementation
Since the script does not automatically draw SL/TP, you can:
Calculate them manually: Observe the chart and use the levels mentioned.
Modify the code: Add SL/TP as labels (label.new) at the moment of the signal.
Here’s an example of how to modify the code to display SL and TP based on ATR with a 1:2 risk/reward ratio:
Modified Code (Signals Section)
Find the lines where the signals (trade_buy and trade_sell) are generated and add the following:
pinescript
// Calculate SL and TP based on ATR
atr_sl_mult = 1.5 // Multiplier for SL
atr_tp_mult = 3.0 // Multiplier for TP (1:2 ratio)
sl_distance = atr_smooth * atr_sl_mult
tp_distance = atr_smooth * atr_tp_mult
if trade_buy
entry_price = close
sl_price = entry_price - sl_distance
tp_price = entry_price + tp_distance
label.new(bar_index, low, "Buy: " + str.tostring(math.round(bull_conditions, 1)), color=color.green, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bar_index, sl_price, "SL: " + str.tostring(math.round(sl_price, 2)), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bar_index, tp_price, "TP: " + str.tostring(math.round(tp_price, 2)), color=color.blue, textcolor=color.white, style=label.style_label_up, size=size.tiny)
if trade_sell
entry_price = close
sl_price = entry_price + sl_distance
tp_price = entry_price - tp_distance
label.new(bar_index, high, "Sell: " + str.tostring(math.round(bear_conditions, 1)), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bar_index, sl_price, "SL: " + str.tostring(math.round(sl_price, 2)), color=color.red, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bar_index, tp_price, "TP: " + str.tostring(math.round(tp_price, 2)), color=color.blue, textcolor=color.white, style=label.style_label_down, size=size.tiny)
Code Explanation
SL: Calculated by subtracting/adding sl_distance to the entry price (close) depending on whether it’s a buy or sell.
TP: Calculated with a double distance (tp_distance) for a 1:2 risk/reward ratio.
Visualization: Labels are added to the chart to display SL (red) and TP (blue).
4. Practical Strategy Without Modifying the Code
If you don’t want to modify the script, follow these steps manually:
Entry: Take the trade_buy or trade_sell signal.
SL: Check the smoothed ATR (atr_smooth) on the chart or calculate a fixed level (e.g., 1.5 times the ATR). Also, review nearby key zones (OB, FVG, VWAP).
TP: Define a target based on the next key zone or multiply the SL distance by 2 or 3.
Example:
Buy at 100, ATR = 2.
SL = 100 - (2 * 1.5) = 97.
TP = 100 + (2 * 3) = 106.
5. Recommendations
Test in Demo: Apply this logic in a demo account to adjust the multipliers (atr_sl_mult, atr_tp_mult) based on the market (forex or crypto).
Combine with Zones: If the ATR-based SL is too wide, use the nearest OB or FVG as a reference.
Risk/Reward Ratio: Adjust the TP based on your tolerance (1:1, 1:2, 1:3)
AI Strat ATR Dinamico + ADX + Trend Adaptivo (No Repaint)Below is a fully self-contained, English-language description of every input, function, and logical block inside the “AI Strat ATR Dinamico + ADX + Trend Adaptivo (No Repaint)” indicator. You can copy and paste this into TradingView’s “Description” field when you publish, without exposing any Pine code.
---
## Indicator Name and Purpose
**Name (Short Title):**
AI Strat Adaptive v3 (NoRepaint)
**Overview:**
This indicator combines multiple technical tools—RSI, EMA, ATR (with a dynamic multiplier), ADX/DI, and an “AI‐style” scoring mechanism—to generate trend-filtered and reversal signals. It also optionally confirms signals on a higher timeframe, dynamically adjusts its sensitivity based on volatility, and plots intrabar stop‐loss (SL) and take‐profit (TP) levels derived from ATR. Special care has been taken to ensure that no signals “repaint” (i.e., once drawn on a closed bar, they never disappear or shift).
---
## 1. Main Inputs
All of the inputs appear in the Settings dialog for the published indicator. Below is a detailed explanation of each input, grouped by logical category.
### A. RSI & EMA Base Parameters
1. **RSI Length (Base)**
* **Input type:** Integer (default 14)
* **Description:** Number of bars used to calculate the Relative Strength Index (RSI). A shorter RSI reacts more quickly to price changes; a longer RSI is smoother.
2. **RSI Overbought Threshold**
* **Input type:** Integer (default 60)
* **Description:** If the RSI value rises above this level, it contributes a “sell” signal component. You can adjust this (e.g., 70) to make your system more conservative.
3. **RSI Oversold Threshold**
* **Input type:** Integer (default 40)
* **Description:** If the RSI falls below this level, it contributes a “buy” signal component. Raising this threshold (e.g., 50) makes the strategy more aggressive in seeking reversals.
4. **EMA Length (Base)**
* **Input type:** Integer (default 20)
* **Description:** Number of bars for the Exponential Moving Average (EMA). A shorter EMA will produce more frequent crossovers, a longer EMA is smoother.
### B. ATR & Volatility Filter Parameters
5. **ATR Length (Base)**
* **Input type:** Integer (default 14)
* **Description:** Number of bars to calculate Average True Range (ATR). The ATR is used both for measuring volatility and for dynamic SL/TP levels.
6. **ATR SMA Length**
* **Input type:** Integer (default 50)
* **Description:** Number of bars to compute a Simple Moving Average of the ATR itself. This gives a baseline of “normal” volatility. If ATR rises significantly above this SMA, the indicator treats the market as “high volatility.”
7. **ATR Multiplier Base**
* **Input type:** Float (default 1.2, step 0.1)
* **Description:** Base multiplier for ATR when filtering for volatility. The actual threshold is computed as `ATR_SMA × (ATR_Multiplier Base) × sqrt(current_ATR / ATR_SMA)`. In other words, the multiplier becomes larger if volatility is rising, and smaller if volatility is falling.
8. **Disable Volatility Filter**
* **Input type:** Boolean (default false)
* **Description:** If enabled (true), the indicator will ignore any volatility‐based filtering, using signals regardless of ATR behavior. If disabled (false), signals only fire when ATR > (ATR\_SMA × dynamic multiplier).
### C. Price-Change & “AI Score” Parameters
9. **Price Change Period (bars)**
* **Input type:** Integer (default 3)
* **Description:** The number of bars back to measure percentage price change. Used to ensure that a “trend” signal is accompanied by a sufficiently positive (for longs) or negative (for shorts) price movement over this many bars.
10. **Base AI Score Threshold**
* **Input type:** Float (default 0.1)
* **Description:** The indicator computes a composite “AI-style” score by combining the RSI signal (overbought/oversold) and an EMA crossover signal. Only if the absolute value of that composite score exceeds this threshold will a trend signal be eligible. Raising it makes signals rarer but (potentially) higher-conviction.
### D. SMA “ICT” Trend Filter Parameters
11. **ICT SMA Long Length (Base)**
* **Input type:** Integer (default 50)
* **Description:** Number of bars for the “long” Simple Moving Average (SMA) used in the internal trend filter. Typically, price must be above this SMA (and ADX must be strong) to confirm an uptrend, or below it (and ADX strong) to confirm a downtrend.
12. **ICT SMA Short1 Length (Base)**
* **Input type:** Integer (default 10)
* **Description:** Secondary “fast” SMA used both for reversal logic (e.g., price crossing above it can count as a bullish reversal) and part of the internal trend confirmation.
13. **ICT SMA Short2 Length (Base)**
* **Input type:** Integer (default 20)
* **Description:** A second “medium” SMA used for reversal triggers (e.g., crossovers or crossunders alongside RSI conditions).
### E. ADX & DI Parameters
14. **Base ADX Length**
* **Input type:** Integer (default 14)
* **Description:** Number of bars for the ADX (Average Directional Index) moving averages, which measure trend strength. The same length is used for +DI and –DI smoothing.
15. **Base ADX Threshold**
* **Input type:** Float (default 25.0, step 0.5)
* **Description:** If ADX > this threshold and +DI > –DI, we consider an uptrend; if ADX > this threshold and –DI > +DI, we consider a downtrend. Raising this value demands stronger trends to qualify.
### F. Sensitivity & Cooldown
16. **Sensitivity (0–1)**
* **Input type:** Float between 0.0 and 1.0 (default 0.5)
* **Description:** A general “mixture” parameter used internally to weight how aggressively the indicator leans into trend versus reversal. In practice, the code uses it to fine-tune exact thresholds for switching between trend and reversal conditions. You can leave it at 0.5 unless you want to bias more heavily toward either regime.
17. **Base Cooldown Bars Between Signals**
* **Input type:** Integer (default 5, min 0)
* **Description:** Once a long or short signal fires, the indicator will wait at least this many bars before allowing a new signal in the same direction. Prevents “signal flipping” on each bar. A higher number forces fewer, more spaced-out entries.
18. **Trend Confirmation Bars**
* **Input type:** Integer (default 3, min 1)
* **Description:** After the directional filters (+DI/–DI cross, price vs. SMA), the indicator still requires that price remains on the same side of the long SMA for at least this many consecutive bars before confirming “trend up” or “trend down.” Larger values smooth out false breakouts but may lag signals.
### G. Higher Timeframe Confirmation
19. **Use Higher Timeframe Confirmation**
* **Input type:** Boolean (default true)
* **Description:** If true, the indicator will request a block of values (SMA, +DI, –DI, ADX) from a higher timeframe (default 60 minutes) and require that the higher timeframe is also in agreement (strong uptrend or strong downtrend) before confirming your current-timeframe trend. This helps filter out lower-timeframe noise.
20. **Higher Timeframe (TF) for Confirmation**
* **Input type:** Timeframe (default “60”)
* **Description:** The chart timeframe (e.g., 5, 15, 60 minutes) whose trend conditions must also be true. It’s sent through a `request.security(..., lookahead=barmerge.lookahead_off)` call so that it never “paints ahead.”
### H. Dynamic TP/SL Parameters
21. **TP as ATR Multiple**
* **Input type:** Float (default 2.0, step 0.1)
* **Description:** When a trade is open, the “take-profit” price is determined by looking at the highest high (for longs) or lowest low (for shorts) observed since entry, and then plotting a cross (“X”) at that level when the trend finally flips. This is purely for display. However, separate from that, this parameter can be adapted if you want a strictly ATR–based TP. In the “Minimal” version, TP is ≈ (highest high) once trend inverts, but you could rewrite it to use `entry_price + ATR×TP_Multiplier`.
22. **SL as ATR Multiple**
* **Input type:** Float (default 1.0, step 0.1)
* **Description:** While in a trade, a trailing SL line is plotted each bar. Its value is always `entry_price ± (ATR × SL_Multiplier)`. When the trend inverts, the SL no longer updates, and you see it on the chart.
### I. Display and Mode Options
23. **Show Debug Lines**
* **Input type:** Boolean (default true)
* **Description:** When enabled, the indicator will plot all intermediate lines—ATR SMA, ATR Threshold, +DI, –DI, ADX (current and HTF), HTF SMA, etc.—so that you can diagnose exactly what’s happening. Turn this off to hide all debug information and only see entry/exit shapes.
24. **Enable Scalping Mode**
* **Input type:** Boolean (default false)
* **Description:** If true, many of the “base” parameters are halved (e.g., RSI length becomes 7 instead of 14, ATR length becomes 7 instead of 14, ADX length becomes 7, etc.), and the ADX threshold is multiplied by 0.8. This makes all oscillators and moving averages more reactive, suited for very short-term (scalping) setups.
---
## 2. Core Calculation Blocks
Below is a high-level description of each logical block (in code order), translated from Pine into conceptual steps.
### A. Adjust Inputs if “Scalping Mode” Is On
If **Scalping Mode** = true, then:
* `RSI_Length` becomes `max(1, round(Base_RSI_Length / 2))`
* `EMA_Length` becomes `max(1, round(Base_EMA_Length / 2))`
* `ATR_Length` becomes `max(1, round(Base_ATR_Length / 2))`
* `Price_Change_Period` becomes `max(1, round(Base_Price_Change_Period / 2))`
* `SMA_Long_Length`, `SMA_Short1_Length`, and `SMA_Short2_Length` are each halved (minimum 1).
* `ADX_Length` = `max(1, round(Base_ADX_Length / 2))`
* `ADX_Threshold` = `Base_ADX_Threshold × 0.8`
* `Cooldown_Bars` = `max(0, round(Base_Cooldown_Bars / 2))`
Otherwise, all adjusted lengths = their base values.
### B. RSI, EMA & “AI Score” on Current Timeframe
1. **Compute RSI:**
* Uses the (possibly adjusted) `RSI_Length`.
* Denote this as `RSI_Value`.
2. **Compute ATR & Its SMA:**
* `ATR_Value` = `ta.atr(ATR_Length)`.
* `ATR_SMA` = `ta.sma(ATR_Value, ATR_SMA_Length)`.
* Then define `Volatility_Increase` = (`ATR_Value > ATR_SMA`).
* If the volatility has increased, the weighting of RSI vs. EMA changes.
3. **Compute Weights:**
* If `Volatility_Increase == true`, then:
* `RSI_Weight = 0.7`
* `EMA_Weight = 0.3`
* Otherwise:
* `RSI_Weight = 0.3`
* `EMA_Weight = 0.7`
4. **RSI Signal Component (`RSI_Sig`):**
* If `RSI_Value > RSI_Overbought`, then `RSI_Sig = –1`.
* Else if `RSI_Value < RSI_Oversold`, then `RSI_Sig = +1`.
* Otherwise, `RSI_Sig = 0`.
5. **EMA Value & Signal Component (`EMA_Sig`):**
* `EMA_Value` = `ta.ema(close, EMA_Length)`.
* `EMA_Sig = +1` if the current close crosses **above** the EMA; `EMA_Sig = –1` if the current close crosses **below** the EMA; else `0`.
6. **Compute Raw “AI Score”:**
$$
Raw\_AI = (RSI\_Sig \times RSI\_Weight)\;+\;(EMA\_Sig \times EMA\_Weight)
$$
Then,
$$
AI\_Score = \frac{Raw\_AI}{(RSI\_Weight + EMA\_Weight)}
$$
(This normalization ensures the score always ranges between –1 and +1 if both weights sum to 1.)
### C. Dynamic ATR Multiplier & Volatility Filter
1. **Volatility Factor:**
$$
Volatility\_Factor = \frac{ATR\_Value}{ATR\_SMA}
$$
2. **Dynamic ATR Multiplier:**
$$
ATR\_Multiplier = ATR\_Multiplier\_Base \times \sqrt{Volatility\_Factor}
$$
3. **High Volatility Condition (`High_Volatility`):**
* If `Disable_Volatility_Filter == true`, then treat `High_Volatility = true` always.
* Else, `High_Volatility = (ATR_Value > ATR_SMA × ATR_Multiplier)`.
### D. Price Change Percentage
* **Compute Price Change:**
$$
Price\_Change = \frac{(Close - Close )}{Close } \times 100
$$
* This is the percent return from `Price_Change_Period` bars ago to now.
* For a valid long‐trend signal, we require `Price_Change > 0`; for a short trend, `Price_Change < 0`.
### E. Local SMAs for Trend/Reversal Filters
* `SMA_Close_Long` = `ta.sma(close, SMA_Long_Length)`.
* `SMA_Close_Short1` = `ta.sma(close, SMA_Short1_Length)`.
* `SMA_Close_Short2` = `ta.sma(close, SMA_Short2_Length)`.
These three SMAs help define the “local trend” and reversal breakout points:
* **Primary Trend Filter:**
* Price must be above `SMA_Close_Long` for an uptrend filter, or below `SMA_Close_Long` for a downtrend filter.
* **Reversal Filter:**
* A bullish reversal is detected if **(RSI < Oversold AND close crosses above EMA)** OR **(RSI < Oversold AND close crosses above SMA\_Close\_Short1)**.
* A bearish reversal is detected if **(RSI > Overbought AND close crosses below EMA)** OR **(RSI > Overbought AND close crosses below SMA\_Close\_Short1)**.
### F. Manual +DI, –DI & ADX on Current Timeframe
Instead of relying on the built-in `ta.adx`, the script calculates DI and ADX manually. This makes it easier to replicate the exact logic on a higher timeframe via `request.security`. The steps are:
1. **Directional Movement (DM) Components:**
* `Up_Move` = `high – high `
* `Down_Move` = `low – low`
* `Plus_DM` = `Up_Move` if (`Up_Move > Down_Move` AND `Up_Move > 0`), else `0`
* `Minus_DM` = `Down_Move` if (`Down_Move > Up_Move` AND `Down_Move > 0`), else `0`
2. **True Range (TR) Components:**
* `TR1` = `high – low`
* `TR2` = `abs(high – close )`
* `TR3` = `abs(low – close )`
* `True_Range` = `max(TR1, TR2, TR3)`
3. **Smoothed Averages (RMA):**
* `Sm_TR` = `ta.rma(True_Range, ADX_Length)`
* `Sm_Plus` = `ta.rma(Plus_DM, ADX_Length)`
* `Sm_Minus`= `ta.rma(Minus_DM, ADX_Length)`
4. **Compute DI%:**
$$
Plus\_DI = \frac{Sm\_Plus}{Sm\_TR} \times 100,\quad
Minus\_DI = \frac{Sm\_Minus}{Sm\_TR} \times 100
$$
5. **DX and ADX:**
$$
DX = \frac{|Plus\_DI - Minus\_DI|}{Plus\_DI + Minus\_DI} \times 100,\quad
ADX = ta.rma(DX, ADX_Length)
$$
These values are referred to as `(plus_di, minus_di, adx_val)` for the current timeframe.
---
## 3. Higher Timeframe (HTF) Confirmation Function
If **Use Higher Timeframe Confirmation** is enabled, the script calls a single helper (Pine) function `f_htf` with two parameters: the ADX length and the SMA length (both taken from the “base” or “scaled” values). Internally, `f_htf` simply reruns the manual DI/ADX logic (same as above) on the higher timeframe’s bar data, and also includes that timeframe’s closing price and its SMA for trend comparison.
* **Request.Security Call:**
```
= request.security(
syminfo.tickerid,
higher_tf,
f_htf(adx_length, sma_long_len),
lookahead=barmerge.lookahead_off
)
```
* `lookahead=barmerge.lookahead_off` ensures that no HTF value “paints” early; you always see only confirmed HTF bars.
* The returned tuple provides:
1. `ht_close` = HTF closing price
2. `ht_sma` = HTF SMA of length `sma_long_len`
3. `ht_pdi` = HTF +DI percentage
4. `ht_mdi` = HTF –DI percentage
5. `ht_adx` = HTF ADX value
---
## 4. Trend & Reversal Filters (Current & HTF)
### A. Current-Timeframe Trend Filter
1. **Uptrend\_Basic (Current TF)**
$$
(plus\_di > minus\_di)\;\land\;(adx\_val > ADX\_Threshold)\;\land\;(close > SMA\_Close\_Long)
$$
2. **Downtrend\_Basic (Current TF)**
$$
(minus\_di > plus\_di)\;\land\;(adx\_val > ADX\_Threshold)\;\land\;(close < SMA\_Close\_Long)
$$
3. **Trend Confirmation by Bars:**
* `Bars_Since_Below` = number of bars since `close <= SMA_Close_Long`.
* `Bars_Since_Above` = number of bars since `close >= SMA_Close_Long`.
* If `Uptrend_Basic == true` AND `Bars_Since_Below ≥ Trend_Confirmation_Bars` → mark `Uptrend_Confirm = true`.
* If `Downtrend_Basic == true` AND `Bars_Since_Above ≥ Trend_Confirmation_Bars` → mark `Downtrend_Confirm = true`.
### B. Reversal Filters (Current TF)
1. **Bullish Reversal (`Rev_Bullish`):**
* If `(RSI < RSI_Oversold AND close crosses above EMA_Value)` OR
`(RSI < RSI_Oversold AND close crosses above SMA_Close_Short1)`
→ then `Rev_Bullish = true`.
2. **Bearish Reversal (`Rev_Bearish`):**
* If `(RSI > RSI_Overbought AND close crosses below EMA_Value)` OR
`(RSI > RSI_Overbought AND close crosses below SMA_Close_Short1)`
→ then `Rev_Bearish = true`.
### C. Higher-Timeframe Trend Filter (HTF)
1. **HTF Uptrend (`HT_Uptrend`):**
$$
(ht\_pdi > ht\_mdi)\;\land\;(ht\_adx > ADX\_Threshold)\;\land\;(ht\_close > ht\_sma)
$$
2. **HTF Downtrend (`HT_Downtrend`):**
$$
(ht\_mdi > ht\_pdi)\;\land\;(ht\_adx > ADX\_Threshold)\;\land\;(ht\_close < ht\_sma)
$$
3. **Combine Current & HTF:**
* If **Use\_HTF\_Confirmation == true**, then:
* `Uptrend_Confirm := Uptrend_Confirm AND HT_Uptrend`
* `Downtrend_Confirm := Downtrend_Confirm AND HT_Downtrend`
* Otherwise, just use the current timeframe’s `Uptrend_Confirm` and `Downtrend_Confirm`.
4. **Define `CurrentTrend` (Integer):**
* `CurrentTrend = +1` if `Uptrend_Confirm == true`.
* `CurrentTrend = –1` if `Downtrend_Confirm == true`.
* Otherwise, `CurrentTrend = 0`.
5. **Reset “One Trade Per Trend”:**
* There is a persistent variable `LastTradeTrend`.
* Every time `CurrentTrend` flips (i.e., `CurrentTrend != CurrentTrend `), the code sets `LastTradeTrend := 0`.
* That allows one new entry once the detected trend has changed.
---
## 5. One‐Time “Cooldown” Logic
* **`LastSignalBar`**
* A persistent integer (initially undefined).
* After each confirmed long or short entry, `LastSignalBar` is set to the bar index where that signal fired.
* **`Bars_Since_Signal`**
* If `LastSignalBar` is undefined, treat as a very large number (so that initial signals are always allowed).
* Otherwise, `Bars_Since_Signal = bar_index – LastSignalBar`.
* **Cooldown Check:**
* A new long (or short) can only be generated if `(Bars_Since_Signal > Signal_Cooldown)`.
* This prevents multiple signals in rapid succession.
---
## 6. Entry Conditions (No Repaint)
All of the conditions below are calculated “intrabar,” but the script only actually registers a **signal** on **bar close** (`barstate.isconfirmed`) so that signals never repaint.
### A. Trend‐Based “Raw” Conditions
1. **Trend\_Long\_Raw:**
$$
(AI\_Score > AI\_Score\_Threshold)\;\land\;Uptrend\_Confirm\;\land\;High\_Volatility\;\land\;(Price\_Change > 0)
$$
2. **Trend\_Short\_Raw:**
$$
(AI\_Score < -AI\_Score\_Threshold)\;\land\;Downtrend\_Confirm\;\land\;High\_Volatility\;\land\;(Price\_Change < 0)
$$
### B. Reversal “Raw” Conditions
1. **Rev\_Long\_Raw:**
$$
Rev\_Bullish\;\land\;(CurrentTrend \neq +1)
$$
2. **Rev\_Short\_Raw:**
$$
Rev\_Bearish\;\land\;(CurrentTrend \neq -1)
$$
### C. Combine Raw Signals
* `Raw_Long = Trend_Long_Raw OR Rev_Long_Raw`.
* `Raw_Short = Trend_Short_Raw OR Rev_Short_Raw`.
### D. Confirmed Long/Short Signal Flags
On each new bar **close** (`barstate.isconfirmed == true`):
* **Long\_Signal\_Confirmed** can fire if:
1. `Raw_Long == true`
2. `LastTradeTrend != +1` (we haven’t already taken a long in this same trend)
3. `Bars_Since_Signal > Signal_Cooldown`
If all three hold, then on this bar close the code sets:
* `Long_Signal = true`
* `LastTradeTrend := +1`
* `LastSignalBar := bar_index`
Otherwise, `Long_Signal := false` on this bar.
* **Short\_Signal\_Confirmed** works the same way but with `Raw_Short`, `LastTradeTrend != -1`, etc.
If triggered, it sets `Short_Signal = true`, `LastTradeTrend := -1`, and `LastSignalBar := bar_index`. Otherwise `Short_Signal := false`.
* **Important:** If the bar is still forming (`else` branch of `barstate.isconfirmed`), then both `Long_Signal` and `Short_Signal` are forced to `false`. This guarantees that no shape or alert appears until the bar actually closes.
---
## 7. Plotting Entry/Exit Shapes
1. **Trend Long Signal (Triangle Up)**
* Condition: `Long_Signal == true` **AND** `Trend_Long_Raw == true`.
* Appearance: A small, semi-transparent lime green triangle drawn **below** the bar.
2. **Trend Short Signal (Triangle Down)**
* Condition: `Short_Signal == true` **AND** `Trend_Short_Raw == true`.
* Appearance: A small, semi-transparent maroon triangle drawn **above** the bar.
3. **Reversal Long Signal (Circle)**
* Condition: `Long_Signal == true` **AND** `Rev_Long_Raw == true`.
* Appearance: A tiny, more transparent green circle drawn **below** the bar.
4. **Reversal Short Signal (Circle)**
* Condition: `Short_Signal == true` **AND** `Rev_Short_Raw == true`.
* Appearance: A tiny, more transparent red circle drawn **above** the bar.
Since `Long_Signal` and `Short_Signal` only ever become true at bar close, these shapes are never repainted or removed once drawn.
---
## 8. Unified Alert Message
* As soon as a new bar closes with either `Long_Signal` or `Short_Signal == true`, an alert message is sent:
* If `Long_Signal`, then `alert_msg = "action=BUY"`.
* If `Short_Signal`, then `alert_msg = "action=SELL"`.
* If neither, `alert_msg = ""` (no alert).
* The code calls `alert(alert_msg, freq=alert.freq_once_per_bar)` only if `barstate.isconfirmed` and `alert_msg` is non‐empty. This ensures exactly one alert per confirmed bar, no intrabar pops.
---
## 9. Dynamic TP/SL Logic (Minimal Implementation)
Once a long or short position is “open,” the script tracks these variables:
1. **Persistent Flags and Prices** (all persist between bars until reset):
* `InLong` (Boolean)
* `InShort` (Boolean)
* `Long_Max` (Float)
* `Short_Min` (Float)
* `Entry_Price` (Float)
2. **On Bar Close:**
* If `Long_Signal == true` →
* Set `InLong := true`,
* `Entry_Price := close` of that bar,
* `Long_Max := high ` (last bar’s high, so that we’re not using “future” data).
* If `Short_Signal == true` →
* Set `InShort := true`,
* `Entry_Price := close`,
* `Short_Min := low `.
3. **While `InLong == true`:**
* Continuously update `Long_Max = max(Long_Max, current high)` on each bar (intrabar, but finalized each close).
* Compute a dynamic SL:
$$
SL_{Long} = Entry\_Price - (ATR \times SL\_ATR\_Multiplier).
$$
* If **current trend** flips to non-uptrend (`CurrentTrend != +1`), mark `ExitLong = true`.
* Then the routine plots `TP_Long = Long_Max` as a cross (“X”) at that level.
* Set `InLong := false` so that no further changes to `Long_Max` or `Entry_Price` happen on future bars.
4. **While `InShort == true`:**
* Continuously update `Short_Min = min(Short_Min, current low)`.
* Compute a dynamic SL:
$$
SL_{Short} = Entry\_Price + (ATR \times SL\_ATR\_Multiplier).
$$
* If trend flips to non-downtrend (`CurrentTrend != –1`), mark `ExitShort = true`.
* Then the routine plots `TP_Short = Short_Min`.
* Set `InShort := false` to freeze those values.
5. **Plotting TP/SL if “Show Debug” is On:**
* **TP Shapes:**
* When `ExitLong == true`, plot a solid lime “X” at `TP_Long` (highest high).
* When `ExitShort == true`, plot a solid maroon “X” at `TP_Short` (lowest low).
* **SL Lines:**
* If still `InLong`, draw a thin red line at `SL_Long` on each bar.
* If still `InShort`, draw a thin green line at `SL_Short`.
Thus, your charts visually show the highest‐high take-profit cross for longs, the lowest-low take-profit cross for shorts, and a continuously updating trailing SL until the trend flips. Because all of this is triggered on confirmed bars, nothing “jumps around” after the fact.
---
## 10. Debug‐Only Plot Lines (When Enabled)
When **Show Debug Lines** = true, the indicator will also plot:
1. **ATR SMA (Orange):**
* The simple moving average of ATR over `ATR_SMA_Length`.
2. **ATR Threshold (Yellow):**
* `ATR_SMA × ATR_Multiplier` (the dynamically scaled threshold).
3. **+DI & –DI (Current TF):**
* +DI plotted as a green line, –DI plotted as a red line (opacity \~70%).
4. **ADX (Current TF, Blue):**
* A blue line for the present timeframe’s ADX.
5. **ADX Threshold (Gray):**
* A horizontal gray line showing `ADX_Threshold`.
6. **+DI & –DI (HTF, Darker Colors):**
* If HTF confirmation is on, “HTF +DI” is a greener but more transparent line; “HTF –DI” is a redder but more transparent line.
7. **ADX (HTF, Blue but Transparent):**
* HTF ADX plotted in blue (high transparency).
8. **HTF SMA (Orange, Transparent):**
* The higher timeframe’s SMA (same length as `SMA_Long_Length`), drawn in fainter orange.
9. **Volatility Zone Fill (Yellow Tinted Area):**
* Fills the area between `ATR_SMA` and `ATR_SMA × ATR_Multiplier`.
* Indicates “normal” versus “high‐volatility” regimes.
These debug lines are purely visual aids. Disable them if you want a cleaner chart.
---
## 11. Putting It All Together — Step-By-Step Flow
1. **Read Inputs** (RSI lengths, EMA length, ATR settings, etc.).
2. **Optionally Halve All Lengths** if “Scalping Mode” is checked.
3. **Calculate Current TF Indicators:**
* RSI, ATR, ATR\_SMA, EMA, price change, various SMAs, DI/ADX.
4. **Compute “AI Score”** (weighted sum of RSI and EMA signals).
5. **Compute Dynamic ATR Multiplier** and decide if “High Volatility” is true.
6. **Compute Raw Trend/Reversal Conditions** on the current timeframe (without triggering yet).
7. **Fetch HTF Values** in one `request.security` call (SMAs, DI/ADX).
8. **Combine Current & HTF Trend Filters** to confirm `Uptrend_Confirm` or `Downtrend_Confirm`.
9. **Check Reversal Conditions** (price crossing EMA or SMA short, in overbought/oversold zones).
10. **Enforce “One Trade Per Trend”** (clear `LastTradeTrend` whenever `CurrentTrend` flips).
11. **Enforce Cooldown** (must wait at least `Signal_Cooldown` bars since the prior signal).
12. **On Bar Close:**
* If `Raw_Long` AND not already in a long trend AND cooldown met, then fire `Long_Signal`.
* Else if `Raw_Short` AND not already in a short trend AND cooldown met, then fire `Short_Signal`.
* Otherwise, no new signal on this bar.
13. **Plot Long/Short Entry Shapes** according to whether it was a Trend signal or a Reversal signal.
14. **Send Alert** (“action=BUY” or “action=SELL”) exactly once per confirmed bar.
15. **If New Long/Short Signal, Set `InLong`/`InShort`, Record Entry Price, Initialize `Long_Max`/`Short_Min`.**
16. **While `InLong` is true:** Update `Long_Max = max(previous Long_Max, current high)`. Compute `SL_Long`. If the current trend flips (no longer uptrend), set `ExitLong = true`, plot a “TP X,” and close the position logic.
17. **While `InShort` is true:** Similarly update `Short_Min`, compute `SL_Short`, and if trend flips, set `ExitShort = true`, plot a “TP X,” and close the position logic.
18. **Optionally Display Debug Lines** (ATR SMA, ATR threshold, DI/ADX, HTF DI/ADX, etc.).
---
## 12. How to Use in TradingView Community
When you publish this indicator to the TradingView community—choosing “Protected” or “Invite-only” visibility—you can paste the above description into the “Description” field. Users will see exactly what each input does, how signals are generated, and what the various plotted lines represent, **without ever seeing the script source**. In this way, the code itself remains hidden but the logic is fully documented.
1. **Go to “Create New Indicator”** on TradingView.
2. **Paste Your Pine Code** (the full indicator script) in the Pine editor and save it.
3. **Set Visibility = Protected** (or Invite-only).
4. **In the “Description” Text Box, paste the entirety of this document** (steps 1–11).
5. **Click “Publish Script.”**
Users who view your indicator will see its name (“AI Strat Adaptive v3 (NoRepaint)”), a list of all inputs (with default values), and the detailed English description above. They can then load it on any chart, adjust inputs, and see the plotted signals, TP/SL lines, and optional debug overlays—without accessing the underlying Pine code.
---
### Summary of Key Points
* **RSI, EMA, ATR, DI/ADX, and “AI Score”** work together to define “trend vs. reversal.”
* **Dynamic volatility filter** uses ATR and ATR\_SMA to adapt the weighting of RSI vs. EMA and decide whether “volatility is high enough” to permit a trend trade.
* **One trade per detected trend** and a **cooldown period** prevent over‐trading.
* **Higher timeframe confirmation** (optional) further filters out noise.
* **No-repaint logic**:
* All signals only appear at bar close (`barstate.isconfirmed`).
* HTF values are fetched with `lookahead=barmerge.lookahead_off`.
* **Entry shapes** (triangles and circles) clearly mark trend vs. reversal entries.
* **Dynamic TP/SL**: highest‐high (or lowest‐low) since entry is used as TP, ATR×multiplier as SL.
* **Debug mode** (optional) shows every intermediate line for full transparency.
Use this description verbatim (or adapt it slightly for your personal style) when publishing. That way, your community sees exactly how each component works—inputs, functions, filters—while the Pine source code remains private.
RSI OB/OS THEDU 999//@version=6
indicator("RSI OB/OS THEDU 999", overlay=false)
//#region Inputs Section
// ================================
// Inputs Section
// ================================
// Time Settings Inputs
startTime = input.time(timestamp("1 Jan 1900"), "Start Time", group="Time Settings")
endTime = input.time(timestamp("1 Jan 2099"), "End Time", group="Time Settings")
isTimeWindow = time >= startTime and time <= endTime
// Table Settings Inputs
showTable = input.bool(true, "Show Table", group="Table Settings")
fontSize = input.string("Auto", "Font Size", options= , group="Table Settings")
// Strategy Settings Inputs
tradeDirection = input.string("Long", "Trade Direction", options= , group="Strategy Settings")
entryStrategy = input.string("Revert Cross", "Entry Strategy", options= , group="Strategy Settings")
barLookback = input.int(10, "Bar Lookback", minval=1, maxval=20, group="Strategy Settings")
// RSI Settings Inputs
rsiPeriod = input.int(14, "RSI Period", minval=1, group="RSI Settings")
overboughtLevel = input.int(70, "Overbought Level", group="RSI Settings")
oversoldLevel = input.int(30, "Oversold Level", group="RSI Settings")
//#endregion
//#region Font Size Mapping
// ================================
// Font Size Mapping
// ================================
fontSizeMap = fontSize == "Auto" ? size.auto : fontSize == "Small" ? size.small : fontSize == "Normal" ? size.normal : fontSize == "Large" ? size.large : na
//#endregion
//#region RSI Calculation
// ================================
// RSI Calculation
// ================================
rsiValue = ta.rsi(close, rsiPeriod)
plot(rsiValue, "RSI", color=color.yellow)
hline(overboughtLevel, "OB Level", color=color.gray)
hline(oversoldLevel, "OS Level", color=color.gray)
//#endregion
//#region Entry Conditions
// ================================
// Entry Conditions
// ================================
buyCondition = entryStrategy == "Revert Cross" ? ta.crossover(rsiValue, oversoldLevel) : ta.crossunder(rsiValue, oversoldLevel)
sellCondition = entryStrategy == "Revert Cross" ? ta.crossunder(rsiValue, overboughtLevel) : ta.crossover(rsiValue, overboughtLevel)
// Plotting buy/sell signals
plotshape(buyCondition ? oversoldLevel : na, title="Buy", location=location.absolute, color=color.green, style=shape.labelup, text="BUY", textcolor=color.white, size=size.small)
plotshape(sellCondition ? overboughtLevel : na, title="Sell", location=location.absolute, color=color.red, style=shape.labeldown, text="SELL", textcolor=color.white, size=size.small)
// Plotting buy/sell signals on the chart
plotshape(buyCondition, title="Buy", location=location.belowbar, color=color.green, style=shape.triangleup, text="BUY", textcolor=color.white, size=size.small , force_overlay = true)
plotshape(sellCondition, title="Sell", location=location.abovebar, color=color.red, style=shape.triangledown, text="SELL", textcolor=color.white, size=size.small, force_overlay = true)
//#endregion
//#region Returns Matrix Calculation
// ================================
// Returns Matrix Calculation
// ================================
var returnsMatrix = matrix.new(0, barLookback, 0.0)
if (tradeDirection == "Long" ? buyCondition : sellCondition ) and isTimeWindow
newRow = array.new_float(barLookback)
for i = 0 to barLookback - 1
entryPrice = close
futurePrice = close
ret = (futurePrice - entryPrice) / entryPrice * 100
array.set(newRow, i, math.round(ret, 4))
matrix.add_row(returnsMatrix, matrix.rows(returnsMatrix), newRow)
//#endregion
//#region Display Table
// ================================
// Display Table
// ================================
var table statsTable = na
if barstate.islastconfirmedhistory and showTable
statsTable := table.new(position.top_right, barLookback + 1, 4, border_width=1, force_overlay=true)
// Table Headers
table.cell(statsTable, 0, 1, "Win Rate %", bgcolor=color.rgb(45, 45, 48), text_color=color.white, text_size=fontSizeMap)
table.cell(statsTable, 0, 2, "Mean Return %", bgcolor=color.rgb(45, 45, 48), text_color=color.white, text_size=fontSizeMap)
table.cell(statsTable, 0, 3, "Median Return %", bgcolor=color.rgb(45, 45, 48), text_color=color.white, text_size=fontSizeMap)
// Row Headers
for i = 1 to barLookback
table.cell(statsTable, i, 0, str.format("{0} Bar Return", i), bgcolor=color.rgb(45, 45, 48), text_color=color.white, text_size=fontSizeMap)
// Calculate Statistics
meanReturns = array.new_float()
medianReturns = array.new_float()
for col = 0 to matrix.columns(returnsMatrix) - 1
colData = matrix.col(returnsMatrix, col)
array.push(meanReturns, array.avg(colData))
array.push(medianReturns, array.median(colData))
// Populate Table
for col = 0 to matrix.columns(returnsMatrix) - 1
colData = matrix.col(returnsMatrix, col)
positiveCount = 0
for val in colData
if val > 0
positiveCount += 1
winRate = positiveCount / array.size(colData)
meanRet = array.avg(colData)
medianRet = array.median(colData)
// Color Logic
winRateColor = winRate == 0.5 ? color.rgb(58, 58, 60) : (winRate > 0.5 ? color.rgb(76, 175, 80) : color.rgb(244, 67, 54))
meanBullCol = color.from_gradient(meanRet, 0, array.max(meanReturns), color.rgb(76, 175, 80), color.rgb(0, 128, 0))
meanBearCol = color.from_gradient(meanRet, array.min(meanReturns), 0, color.rgb(255, 0, 0), color.rgb(255, 99, 71))
medianBullCol = color.from_gradient(medianRet, 0, array.max(medianReturns), color.rgb(76, 175, 80), color.rgb(0, 128, 0))
medianBearCol = color.from_gradient(medianRet, array.min(medianReturns), 0, color.rgb(255, 0, 0), color.rgb(255, 99, 71))
table.cell(statsTable, col + 1, 1, str.format("{0,number,#.##%}", winRate), text_color=color.white, bgcolor=winRateColor, text_size=fontSizeMap)
table.cell(statsTable, col + 1, 2, str.format("{0,number,#.###}%", meanRet), text_color=color.white, bgcolor=meanRet > 0 ? meanBullCol : meanBearCol, text_size=fontSizeMap)
table.cell(statsTable, col + 1, 3, str.format("{0,number,#.###}%", medianRet), text_color=color.white, bgcolor=medianRet > 0 ? medianBullCol : medianBearCol, text_size=fontSizeMap)
//#endregion
// Background color for OB/OS regions
bgcolor(rsiValue >= overboughtLevel ? color.new(color.red, 90) : rsiValue <= oversoldLevel ? color.new(color.green, 90) : na)
EMA Cloud Matrix with Trend Tablethis script builds upon a standard exponential moving average (ema) by adding volatility-based dynamic bands and persistent trend detection. it also enhances decision-making by including visual indicators (labels and clouds), a multi-timeframe trend table, and optional retest signals. here's an in-depth explanation:
volatility-based bands:
instead of just plotting an ema line, this script creates an upper and lower band around the ema using the average volatility (calculated as the average range of high-low over 100 bars).
the bands represent areas where price is likely to deviate significantly from the ema, signaling potential trend shifts.
persistent trend detection:
a persistent trend variable updates when price crosses above the upper band (bullish trend) or below the lower band (bearish trend). this ensures that the trend state persists until a new cross event occurs.
normal emas don't store such states—they merely provide a lagging representation of price.
visual enhancements:
a color-coded cloud dynamically highlights the area between the ema and the current trend line (upper or lower band), making trend direction clearer.
labels mark significant crossover or crossunder events, serving as potential buy or sell signals.
multi-timeframe trend table:
the table shows the trend direction (buy/sell) for the 15-minute, 4-hour, and daily timeframes, giving a broader perspective for trading decisions.
optional retest signals:
when enabled, it identifies situations where price tests the ema after trending away, providing additional opportunities for entries or exits.
first time ever - why use this and how?
why use this?
this is ideal for traders who:
struggle with trend-following strategies that lack clear entry/exit rules.
want a hybrid system combining ema-based smoothness with volatility-based adaptability.
need to visualize trends in multiple timeframes without switching charts.
how to use this?
buy signal: when the price crosses above the upper band, the trend flips to bullish. you’ll see a green upward arrow (▲) on the chart, indicating a potential long entry.
sell signal: when the price crosses below the lower band, the trend flips to bearish. a blue downward arrow (▼) appears on the chart, signaling a potential short entry.
retest signals (optional): if the price comes back to test the ema during a trend, a retest label can guide you for a secondary entry.
exit based on risk-reward ratio (rr)
this script doesn't explicitly calculate risk-reward ratios (rr), but you can manage exits effectively using the following ideas:
set a defined stop-loss:
if entering on a buy signal (crossover above upper band), place a stop below the ema or the lower band. for short signals, use the upper band as a stop.
this ensures the stop-loss dynamically adjusts with volatility.
use rr to set targets:
decide on a risk-reward ratio like 1:2 or 1:3. for example:
if your stop-loss is 20 points below your entry, set your target 40 or 60 points above for a 1:2 or 1:3 rr.
you can use trailing stops to lock in profits as the trend continues.
exit on opposite signal:
if the trend changes (e.g., price crosses below the lower band in a bullish trade), close the position.
how it gives signals and when to buy or sell
signal logic:
buy signal (bullish crossover):
when the price crosses above the upper band, the script marks it as a bullish trend and plots a green arrow (▲).
sell signal (bearish crossunder):
when the price crosses below the lower band, the script identifies it as a bearish trend and plots a blue arrow (▼).
trend continuation:
the trend state persists until the opposite condition occurs, helping you avoid noise or whipsaws.
multi-timeframe insights:
consult the trend table for confirmation across timeframes. for example:
if the 15-minute and 4-hour timeframes align with a buy trend, it strengthens the case for a long trade.
conflicting signals might suggest waiting for further confirmation.
using retest signals:
during strong trends, price often revisits the ema before resuming. if the optional retest signals are enabled, you’ll see labels at these points. they can be used to:
add to an existing position.
enter a trade if you missed the initial breakout.
key event: price crosses above the upper band
when the price closes above the upper band (ema + volatility buffer), the script identifies a bullish trend.
a green upward arrow (▲) is plotted on the chart, signaling the beginning of a long trend.
visual confirmation:
the cloud between the ema and the trend line (lower band) is filled with a light green color, representing a bullish phase.
the trend table will display "buy" with an upward arrow for the respective timeframe(s).
actionable insight:
entry: take a long position when the green ▲ appears, confirming a bullish crossover.
continuation trades: use the optional retest signals to identify pullbacks to the ema as opportunities to add to the long position.
exit: close the position when a bearish crossunder (sell signal) occurs.
identifying short trends (sell signal)
key event: price crosses below the lower band
when the price closes below the lower band (ema - volatility buffer), the script identifies a bearish trend.
a blue downward arrow (▼) is plotted on the chart, signaling the beginning of a short trend.
visual confirmation:
the cloud between the ema and the trend line (upper band) is filled with a light blue color, representing a bearish phase.
the trend table will display "sell" with a downward arrow for the respective timeframe(s).
actionable insight:
entry: take a short position when the blue ▼ appears, confirming a bearish crossunder.
continuation trades: use the optional retest signals to identify rallies back to the ema as opportunities to add to the short position.
exit: close the position when a bullish crossover (buy signal) occurs.
what makes it different from other ema indicators?
dynamic volatility adaptation:
standard ema indicators only track the average price over a given period, making them susceptible to market noise in highly volatile conditions.
this script uses a volatility buffer (average true range of high-low) to create upper and lower bands around the ema, filtering out insignificant movements and focusing on meaningful breakouts.
persistent trend logic:
unlike traditional emas that simply follow price direction, this script maintains a persistent trend state until a clear crossover or crossunder occurs:
bullish trends persist above the upper band.
bearish trends persist below the lower band.
this minimizes whipsaws in choppy markets.
visual enhancements:
the trend-colored cloud (green for long trends, blue for short trends) helps you quickly identify the market’s state.
labels (▲ and ▼) mark critical entry signals, making it easier to spot potential trades.
multi-timeframe trend confirmation:
the trend table integrates higher and lower timeframes, providing a multi-timeframe perspective:
short-term (15 minutes) for active trading.
medium-term (4 hours) for swing positions.
long-term (daily) for overall trend direction.
optional retest signals:
most ema-based strategies miss the retest phase after a breakout.
this script includes an optional feature to identify pullbacks to the ema during a trend, helping traders enter or add positions at better prices.
all-in-one system:
while traditional ema indicators only show a smoothed average line, this script integrates trend detection, volatility bands, visual aids, and multi-timeframe analysis in a single tool, reducing the need for additional indicators.
summary
this script goes beyond a simple ema by incorporating trend persistence, volatility bands, and multi-timeframe analysis. buy signals occur when price crosses above the upper band, initiating a long trend, while sell signals occur when price crosses below the lower band, initiating a short trend. it stands out due to its ability to adapt to market conditions, provide clear visual cues, and avoid the noise common in standard ema-based systems.