CANX MA Crossover© CanxStixTrader
Moving average crossover systems measure drift in the market. They are great strategies for time-limited traders. KEEP IT SIMPLE
This strategy works both for buys and sells using the reaction line to guide your position against the reactions.
HOW TO USE THE INDICATOR
1) Choose your market and timeframe.
2) Choose the length.
3) Choose the multiplier.
4) Choose if the strategy is long-only or bidirectional (longs & shorts).
TIPS
The strategy works best in bullish markets as that is the primary direction that market such as stocks, indexes and metals like to move.
- Increase the multiplier to reduce whipsaws
- Increase the length to take fewer trades
- Decrease the length to take more trades
- Try a Long-Only strategy to see if that performs better.
The base set up when you load the indicator is for the 1 minute chart on gold. We found that it also works well on the US Indexes. For other markets you may need to change the length and multiplier to suit the market and back test its results.
Moving Averages
10/20MA pullback by Black200000Original Multi-Timeframe Pullback Indicator with Real-Time Alerts (Closed Source)
This script is a unique, practical tool for identifying and visualizing pullback opportunities on stocks.
It’s specifically engineered to generate pullback alerts in real time even while you are viewing other timeframes—a feature rarely available in open-source alternatives.
• What makes this script unique?
- Specialized Pullback Logic (10/20 EMA):
The indicator detects valid pullbacks based on price interaction with the 10 or 20 EMA, with advanced logic that differentiates between:
1. Touch and close above the EMA
2. Touch and close below the EMA
3. Touch one EMA and close above the other (for advanced filtering)
- Multi-Timeframe Engine:
The script is optimized for both standard and non-standard timeframes (including 6m), and is capable of generating pullback alerts even if you are currently viewing a different timeframe chart (such as 1m, 15m, H1, or daily).
You will never miss a pullback signal just because you are on another chart timeframe.
- Clean, Non-Repetitive Visuals:
All signals are displayed on a single, dedicated reference line below price—never on every price bar—so your chart remains easy to read even when tracking multiple stocks.
- True Originality:
The logic, signal timing, and alert functionality are not adapted from any open-source code.
Real-time multi-timeframe pullback alerting is unique to this indicator.
• How the indicator works
- On every new bar, the script checks for custom pullback conditions using 10 and 20 EMA interactions, regardless of your current viewing timeframe.
- When your criteria are met, a visual marker is plotted and an alert is triggered in real time, ensuring you can act immediately—even if you’re reviewing the market from a different angle.
• Why closed source?
- The script’s logic, visual engine, and especially the cross-timeframe alerting mechanism are original, developed independently for active intraday traders.
- No part of the code is copied or replicated from open-source repositories.
- To maintain the uniqueness and effectiveness of the strategy, the script is published as closed source, in full compliance with TradingView’s House Rules.
• How to use
1. Add the indicator to any chart.
2. The script automatically monitors all interactions with the 10 and 20 EMA using advanced pullback logic.
3. Set your alert for pullback signals.
4. Trade or scan other timeframes with confidence, knowing you’ll be notified as soon as a pullback forms on your chosen anchor timeframe.
If you have questions about the logic or features, contact me via TradingView DM.
Backtest: EMA + CPR + Volume + SL/TargetBacktest Strategy — EMA + CPR + Volume + SL/Target
Buy & Sell signals: Plotted on chart
Volume Spike Filter: Volume > 20-day average
Stop-Loss: 1.5% below entry price
Target: 3% above entry price (can be adjusted)
Backtest mode: Tracks performance
Works on all stocks (Futures or Equity)
Futures Strategy: EMA + CPR + RSI + Volume + AlertsBuy when:
20 EMA crosses above 50 EMA
Price is above CPR
RSI is in acceptable zone (optional)
Volume is above average
📉 Sell when:
20 EMA crosses below 50 EMA
Price is below CPR
RSI is in acceptable zone (optional)
Volume is above average
Futures Strategy: EMA + CPR + RSI (No OI)Strategy Logic:
✅ 20 EMA / 50 EMA crossover for trend direction
✅ CPR (Central Pivot Range) for support/resistance context
✅ Optional enhancements:
RSI filter to avoid overbought/oversold zones
Volume filter to avoid weak signals
EMA + CPR Buy/Sell Signalsautomated TradingView Pine Script for generating Buy/Sell signals based on the exact strategy you requested:
20 EMA & 50 EMA crossover
CPR levels (Pivot, Support, Resistance)
Optional: MACD & RSI filters
EMA + CPR Buy/Sell Signalsautomated TradingView Pine Script for generating Buy/Sell signals based on the exact strategy
20 EMA & 50 EMA crossover
CPR levels (Pivot, Support, Resistance)
Optional: MACD & RSI filters
Multi Moving Average with CustomizationCore Functionality
The indicator allows you to display up to 5 different moving averages on your chart simultaneously.
Each moving average can be fully customized with its own settings.
You can choose between
1. Simple Moving Average (SMA),
2. Exponential Moving Average (EMA)
3. Weighted Moving Average (WMA) types
Multi-Timeframe Support
One standout feature is the ability to display higher timeframe moving averages on lower timeframe charts.
For example, you can show a 200 EMA from the daily chart while viewing a 15-minute chart.
Advanced Visualization Features
The indicator includes several visualization enhancements:
1. MA Cloud - Creates a filled area between any two selected moving averages. The cloud automatically changes color based on which MA is on top - typically green when the faster MA is above (bullish) and red when below (bearish).
2. Golden/Death Cross Detection - Automatically detects and marks important MA crossover events:
* Golden Cross: When a shorter-term MA crosses above a longer-term MA (bullish signal)
* Death Cross: When a shorter-term MA crosses below a longer-term MA (bearish signal)
3. Trend Background - Colors the entire chart background based on whether price is above or below a specified MA, giving a clear visual indicator of the overall trend.
Alert System
The indicator can generate alerts when price crosses above or below any selected moving average. This feature is useful for automated trading signals or notifications, and can be configured to trigger once per bar.
Flexible Architecture
The code uses several programming techniques to maximize flexibility:
* Switch statements for selecting MA types and cloud values
* Conditional logic throughout the code
* Function abstraction for calculating MAs and handling multi-timeframe display
* String identifiers to select which MAs to use for cloud visualization
Unique Technical Aspects
1. The multi-timeframe plotting function solves the common problem of higher timeframe MAs looking distorted on lower timeframe charts.
2. The cloud feature uses string identifiers to select which MAs to use, allowing for any combination.
3. The indicator employs smart conditional logic to handle complex decision trees efficiently.
4. Every visual aspect (colors, line widths, display conditions) is customizable through the settings.
This indicator combines multiple technical analysis tools into a single, highly configurable package that can adapt to different trading styles and timeframes.
Its ability to correctly display higher timeframe MAs on lower timeframe charts makes it particularly valuable for traders who analyze multiple timeframes simultaneously.
UT Bot + Hull MA Confirmed Signal DelayOverview
This indicator is designed to detect high-probability reversal entry signals by combining "UT Bot Alerts" (UT Bot Alerts script adapted from QuantNomad - Originally developed by Yo_adriiiiaan and idea of original code for "UT Bot Alerts" from HPotter ) with confirmation from a Hull Moving Average (HMA) Developed by Alan Hull . It focuses on capturing momentum shifts that often precede trend reversals, helping traders identify potential entry points while filtering out false signals.
🔍 How It Works
This strategy operates in two stages:
1. UT Bot Momentum Trigger
The foundation of this script is the "UT Bot Alerts" , which uses an ATR-based trailing stop to detect momentum changes. Specifically:
The script calculates a dynamic stop level based on the Average True Range (ATR) multiplied by a user-defined sensitivity factor (Key Value).
When price closes above this trailing stop and the short-term EMA crosses above the stop, a potential buy setup is triggered.
Conversely, when price closes below the trailing stop and the short-term EMA crosses below, a potential sell setup is triggered.
These UT Bot alerts are designed to identify the initial shift in market direction, acting as the first filter in the signal process.
2. Hull MA Confirmation
To reduce noise and false triggers from the UT Bot alone, this script delays the entry signal until price confirms the move by crossing the Hull Moving Average (or its variants: HMA, THMA, EHMA) in the same direction as the UT Bot trigger:
A Buy Signal is generated only when:
A UT Bot Buy condition is active, and
The price closes above the Hull MA.
Or, if a UT Bot Buy condition was recently triggered but price hadn’t yet crossed above the Hull MA, a delayed buy is signaled when price finally breaks above it.
A Sell Signal is generated only when:
A UT Bot Sell condition is active, and
The price closes below the Hull MA.
Similarly, a delayed sell signal can occur if price breaks below the Hull MA shortly after a UT Bot Sell trigger.
This dual-confirmation process helps traders avoid premature entries and improves the reliability of reversal signals.
📈 Best Use Cases
Reversal Trading: This strategy is particularly well-suited for catching early trend reversals rather than trend continuations. It excels at identifying momentum pivots that occur after pullbacks or exhaustion moves.
Heikin Ashi Charts Recommended: The script offers a Heikin Ashi mode for smoothing out noise and enhancing visual clarity. Using Heikin Ashi candles can further reduce whipsaws and highlight cleaner shifts in trend direction.
MACD Alignment: For best results, trade in the direction of the MACD trend or use it as a filter to avoid counter-trend trades.
⚠️ Important Notes
Entry Signals Only: This indicator only plots entry points (Buy and Sell signals). It does not define exit strategies, so users should manage trades manually using trailing stops, profit targets, or other exit indicators.
No Signal = No Confirmation: You may see a UT Bot trigger without a corresponding Buy/Sell signal. This means the price did not confirm the move by crossing the Hull MA, and therefore the setup was considered too weak or incomplete.
⚙️ Customization
UT Bot Sensitivity: Adjust the “Key Value” and “ATR Period” to make the UT Bot more or less reactive to price action.
Use Heikin Ashi: Toggle between standard candles or Heikin Ashi in the indicator settings for a smoother trading experience.
The HMA length may also be modified in the indicator settings from its standard 55 length to increase or decrease the sensitivity of signal.
This strategy is best used by traders looking for a structured, logic-based way to enter early into reversals with added confirmation to reduce risk. By combining two independent systems—momentum detection (UT Bot) and trend confirmation (Hull MA)—it aims to provide high-confidence entries without overwhelming complexity.
Let the indicator guide your entries—you manage the exits.
Examples of use:
Futures:
Stock:
Crypto:
As shown in the snapshots this strategy, like most, works the best when price action has a sizeable ATR and works the least when price is choppy. Therefore it is always best to use this system when price is coming off known support or resistance levels and when it is seen to respect short term EMA's like the 9 or 15.
My personal preference to use this system is for day trading on a 3 or 5 minute chart. But it is valid for all timeframes and simply marks a high probability for a new trend to form.
Sources:
Quant Nomad - www.tradingview.com
Yo_adriiiiaan - www.tradingview.com
HPotter - www.tradingview.com
Hull Moving Average - alanhull.com
Saf EMA Kesişim Stratejisi + AlarmGives buy and sell signals at important intersections. MACD and RSI support .try in all time zones
WMA ATR With Zone + Donchian// 💡 WMA ATR With Zone + Donchian - Strategy Description (EN)
// 📈 A powerful system optimized for short-term trades.
// 🎯 Perfect for traders aiming for 0.5% to 1% profit per trade.
// ⚙️ Combines WMA crossovers, ATR zones, and Donchian filters for high-accuracy signals.
// 💥 Provides meaningful returns when used with leverage.
// 🔍 Filters out noise during sideways markets.
// 📊 Clear info panels and entry/exit zones for easy use.
// 🚀 Great for consistent scalping profits.
// 👉 If you like it, don’t forget to follow 💚
// #Scalping #Leverage #CryptoStrategy #TradingView
// ─────────────────────────────────────────────────────────────
// 💡 WMA ATR With Zone + Donchian - Strateji Açıklaması
// 📈 Kısa vadeli işlemler için optimize edilmiş güçlü bir stratejidir.
// 🎯 Özellikle %0.5 ila %1 kar hedefleyen yatırımcılar için idealdir.
// ⚙️ WMA kesişimleri, ATR bölgeleri ve Donchian kanal filtrelemesiyle yüksek doğruluk sağlar.
// 💥 Kaldıraçla birlikte anlamlı kazançlar sunabilir.
// 🔍 Yatay piyasa filtrelemesiyle yanıltıcı sinyalleri azaltır.
// 📊 Bilgi panelleri ve net giriş-çıkış sinyalleriyle kullanıcı dostudur.
// 🚀 Küçük ama istikrarlı kazançlar hedefleyenler için birebirdir.
// 👉 Beğendiyseniz takip etmeyi unutmayın 💚
// #Scalping #Kaldıraç #CryptoStrateji #TradingView
Scalping IndicatorAn attempt to create a signal for intraday scalping. This indicator factoring short EMA cross, supertrend, fib retracement, and market structure for the signal condition.
EMA 10/20/50 Alignment Strategy### 📘 **Strategy Name**
**EMA 10/20/50 Trend Alignment Strategy**
---
### 📝 **Description (for Publishing)**
This strategy uses the alignment of Exponential Moving Averages (EMAs) to identify strong bullish trends. It enters a long position when the short-term EMA is above the mid-term EMA, which is above the long-term EMA — a classic sign of trend strength.
#### 🔹 Entry Criteria:
* **EMA10 > EMA20 > EMA50**: A bullish alignment that signals momentum in an upward direction.
* The strategy enters a **long position** when this alignment occurs.
#### 🔹 Exit Criteria:
* The long position is closed when the EMA alignment breaks (i.e., the trend weakens or reverses).
#### 🔹 Additional Features:
* Includes a **date range filter**, allowing you to backtest the strategy over a specific period.
* Uses **100% of available capital** for each trade (position size auto-scales with account balance).
* No short positions, stop loss, or take profit are applied — this is a trend-following strategy meant to ride bullish moves.
---
### ✅ Best For:
* Traders looking for a **simple, trend-based entry system**
* Testing price momentum strategies during specific market regimes
* Visualizing EMA stacking patterns in historical data
Backtest with Date Range### 📝 Strategy Description for Publishing
**Title**: SMA Crossover Strategy with Custom Date Range
**Description**:
This strategy implements a classic SMA (Simple Moving Average) crossover system, enhanced with a custom backtesting window defined by start and end dates.
It generates:
* **Buy signals** when the 10-period SMA crosses above the 50-period SMA (bullish momentum).
* **Sell signals** when the 10-period SMA crosses below the 50-period SMA (bearish momentum).
Key features:
* Trades only occur within a user-defined date range, allowing precise control over the backtest period.
* Uses 100% of available capital per trade by default.
* No leverage or stop loss/take profit is applied—pure trend-following logic.
Ideal for users looking to validate moving average-based strategies during specific market conditions or events.
StoRsi# StoRSI Indicator: Combining RSI and Stochastic with multiTF
## Overview
The StoRSI indicator combines Relative Strength Index (RSI) and Stochastic oscillators in a single view to provide powerful momentum and trend analysis. By displaying both indicators together with multi-timeframe analysis, it helps traders identify stronger signals when both indicators align.
## Key Components
### 1. RSI (Relative Strength Index)
### 2. Stochastic Oscillator
### 3. EMA (Exponential Moving Average)
### 4. Multi-Timeframe Analysis
## Visual Features
- **Color-coded zones**: Highlights overbought/oversold areas
- **Signal backgrounds**: Shows when both indicators align
- **Multi-timeframe table**: Displays RSI, Stochastic, and trend across timeframes
- **Customizable colors**: Allows full visual customization
## Signal Generation (some need to uncomment in code)
The indicator generates several types of signals:
1. **RSI crosses**: When RSI crosses above/below overbought/oversold levels
2. **Stochastic crosses**: When Stochastic %K crosses above/below overbought/oversold levels
3. **Combined signals**: When both indicators show the same condition
4. **Trend alignment**: When multiple timeframes show the same trend direction
## Conclusion
The StoRSI indicator provides a comprehensive view of market momentum by combining two powerful oscillators with multi-timeframe analysis. By looking for alignment between RSI and Stochastic across different timeframes, traders can identify stronger signals and filter out potential false moves. The visual design makes it easy to spot opportunities at a glance, while the customizable parameters allow adaptation to different markets and trading styles.
For best results, use this indicator as part of a complete trading system that includes proper risk management, trend analysis, and confirmation from price action patterns.
IEK Signal Buy OnlyIEK Signal Buy Only
Bullish Reversal Detection with Multi-Condition Filters
Overview
This indicator is designed to detect bullish reversal opportunities by combining candlestick behavior, momentum shifts, and trend confirmation. It focuses solely on BUY signals to help traders identify rebound opportunities during extended downtrends or near oversold conditions.
What It Does
This script generates a BUY signal only when all of the following conditions are met:
Reversal Candlestick Pattern
A bullish candle with a long lower wick and a green body, indicating potential rejection of lower prices.
EMA Trend Filter
The price must be below a long-period Exponential Moving Average (default: 89), suggesting that the market is in a downtrend or pullback state.
RSI Oversold Condition
The RSI value must be below a set threshold (default: 45), highlighting weakening selling pressure or oversold conditions.
MACD Histogram Confirmation
The MACD histogram must be increasing, signaling a possible momentum shift to the upside.
A signal is plotted only when all these criteria are true on the same candle.
Why These Conditions Work Together
Each component adds a layer of confirmation:
The candlestick structure highlights possible market rejection at lower levels.
EMA filtering ensures signals are only taken during downtrends or pullbacks, where rebound setups are more likely.
RSI adds momentum context to avoid chasing the market too early.
MACD histogram slope helps detect strengthening momentum before the price rises.
This combination avoids arbitrary mashups by integrating each tool into a cohesive reversal strategy.
Additional Features
Signal markers displayed directly on the chart when conditions are met
EMA line plotted and colored by trend direction
MACD crossover zones displayed via background shading
Real-time RSI label with context-aware coloring
Automatic detection of nearby support and resistance levels with visual labels and zones
Not a Test or Fork
This script is fully functional and built for practical trading use. It is not an experiment, a minor variation of another script, or a copy with no added logic.
Disclaimer
This script is for educational purposes only and does not constitute financial advice.
Users should apply their own judgment and risk management when using it in live trading.
///////////////////////////////////////////
IEK Signal Buy Only
อินดิเคเตอร์จับสัญญาณกลับตัวขาขึ้นด้วยเงื่อนไขหลายชั้น
ภาพรวม
อินดิเคเตอร์นี้ออกแบบมาเพื่อค้นหาสัญญาณกลับตัวขาขึ้น (Bullish Reversal) โดยอิงจากพฤติกรรมของแท่งเทียน โมเมนตัมของราคา และการยืนยันแนวโน้ม
เน้นเฉพาะฝั่ง Buy เพื่อช่วยให้เทรดเดอร์หาจังหวะรีบาวด์ในช่วงขาลง หรือเมื่อราคาเข้าใกล้โซน Oversold
กลไกการทำงาน
สัญญาณ Buy จะถูกแสดงเมื่อมีเงื่อนไขต่อไปนี้ครบพร้อมกัน:
แท่งเทียนกลับตัวขาขึ้น
ต้องเป็นแท่งเขียว (ราคาปิดสูงกว่าราคาเปิด) และมีไส้เทียนด้านล่างยาว (ยาวกว่า 1.5 เท่าของตัวแท่ง) แสดงถึงการปฏิเสธราคาต่ำที่ชัดเจน
เงื่อนไขแนวโน้มจาก EMA
ราคาต้องต่ำกว่าเส้นค่าเฉลี่ยเคลื่อนที่แบบเอ็กซ์โปเนนเชียล (EMA) ระยะยาว เช่น EMA 89 เพื่อแสดงว่าราคากำลังอยู่ในช่วงย่อตัวจากเทรนด์ใหญ่
เงื่อนไข RSI Oversold
ค่า RSI ต้องต่ำกว่าค่าที่กำหนด (เริ่มต้นที่ 45) เพื่อบ่งชี้ถึงแรงขายที่เริ่มอ่อนลง หรือเข้าสู่เขต Oversold
MACD Histogram ยืนยันโมเมนตัมขาขึ้น
Histogram ของ MACD ต้องเพิ่มขึ้นจากแท่งก่อนหน้า เพื่อยืนยันว่ากำลังเกิดแรงส่งกลับด้าน
อินดิเคเตอร์จะแสดงสัญญาณ Buy เฉพาะเมื่อเงื่อนไขทั้ง 4 ข้อข้างต้นเป็นจริงในแท่งเดียวกัน
เหตุผลที่ใช้หลายเงื่อนไขร่วมกัน
แต่ละองค์ประกอบช่วยเพิ่มความแม่นยำในลักษณะเฉพาะ:
โครงสร้างแท่งเทียนแสดงการปฏิเสธราคาต่ำ
EMA ช่วยกรองให้เข้าซื้อเฉพาะช่วงพักตัวจากเทรนด์ใหญ่
RSI ช่วยให้ไม่เข้าซื้อเร็วเกินไป
MACD Histogram ใช้ยืนยันการเปลี่ยนทิศของโมเมนตัม
การรวมกันของทั้ง 4 ส่วนนี้ไม่ใช่การนำอินดิเคเตอร์มารวมแบบสุ่ม แต่เป็นการออกแบบที่มีโครงสร้างเพื่อจับจังหวะกลับตัวที่แม่นยำ
ฟีเจอร์เพิ่มเติม
แสดงสัญญาณ Buy บนกราฟแบบชัดเจน
เส้น EMA เปลี่ยนสีตามแนวโน้ม
แสดงโซนตัดกันของ MACD ด้วยพื้นหลัง
แสดงค่า RSI แบบเรียลไทม์พร้อมสีบอกสถานะ
วาดแนวรับ-แนวต้านอัตโนมัติ พร้อมข้อความแสดงระยะห่างจากราคา
ไม่ใช่สคริปต์ทดลองหรือสำเนา
อินดิเคเตอร์นี้สร้างขึ้นเพื่อใช้งานจริง ไม่ใช่เวอร์ชันทดสอบ ไม่ใช่การดัดแปลงจากอินดิเคเตอร์อื่นโดยไม่มีการปรับปรุง
ข้อสงวนสิทธิ์
สคริปต์นี้จัดทำขึ้นเพื่อใช้เพื่อการศึกษาเท่านั้น ไม่ใช่คำแนะนำในการลงทุน
ผู้ใช้งานควรใช้ดุลยพินิจและระบบบริหารความเสี่ยงของตนเอง
Smart Fib StrategySmart Fibonacci Strategy
This advanced trading strategy combines the power of adaptive SMA entries with Fibonacci-based exit levels to create a comprehensive trend-following system that self-optimizes based on historical market conditions. Credit goes to Julien_Eche who created the "Best SMA Finder" which received an Editors Pick award.
Strategy Overview
The Smart Fibonacci Strategy employs a two-pronged approach to trading:
1. Intelligent Entries: Uses a self-optimizing SMA (Simple Moving Average) to identify optimal entry points. The system automatically tests multiple SMA lengths against historical data to determine which period provides the most robust trading signals.
2. Fibonacci-Based Exits: Implements ATR-adjusted Fibonacci bands to establish precise exit targets, with risk-management options ranging from conservative to aggressive.
This dual methodology creates a balanced system that adapts to changing market conditions while providing clear visual reference points for trade management.
Key Features
- **Self-Optimizing Entries**: Automatically calculates the most profitable SMA length based on historical performance
- **Adjustable Risk Parameters**: Choose between low-risk and high-risk exit targets
- **Directional Flexibility**: Trade long-only, short-only, or both directions
- **Visualization Tools**: Customizable display of entry lines and exit bands
- **Performance Statistics**: Comprehensive stats table showing key metrics
- **Smoothing Option**: Reduces noise in the Fibonacci bands for cleaner signals
Trading Rules
Entry Signals
- **Long Entry**: When price crosses above the blue center line (optimal SMA)
- **Short Entry**: When price crosses below the blue center line (optimal SMA)
### Exit Levels
- **Low Risk Option**: Exit at the first Fibonacci band (1.618 * ATR)
- **High Risk Option**: Exit at the second Fibonacci band (2.618 * ATR)
Strategy Parameters
Display Settings
- Toggle visibility of the stats table and indicator components
Strategy Settings
- Select trading direction (long, short, or both)
- Choose exit method (low risk or high risk)
- Set minimum trades threshold for SMA optimization
SMA Settings
- Option to use auto-optimized or fixed-length SMA
- Customize SMA length when using fixed option
Fibonacci Settings
- Adjust ATR period and SMA basis for Fibonacci bands
- Enable/disable smoothing function
- Customize Fibonacci ratio multipliers
Appearance Settings
- Modify colors, line widths, and transparency
Optimization Methodology
The strategy employs a sophisticated optimization algorithm that:
1. Tests multiple SMA lengths against historical data
2. Evaluates performance based on trade count, profit factor, and win rate
3. Calculates a "robustness score" that balances profitability with statistical significance
4. Selects the SMA length with the highest robustness score
This ensures that the strategy's entry signals are continuously adapting to the most effective parameters for current market conditions.
Risk Management
Position sizing is fixed at $2,000 per trade, allowing for consistent exposure across all trading setups. The Fibonacci-based exit system provides two distinct risk management approaches:
- **Conservative Approach**: Using the first Fibonacci band for exits produces more frequent but smaller wins
- **Aggressive Approach**: Using the second Fibonacci band allows for larger potential gains at the cost of increased volatility
Ideal Usage
This strategy is best suited for:
- Trending markets with clear directional moves
- Timeframes from 4H to Daily for most balanced results
- Instruments with moderate volatility (stocks, forex, commodities)
Traders can further enhance performance by combining this strategy with broader market analysis to confirm the prevailing trend direction.
IEK Signal Sell OnlyIEK Signal Sell Only
Bearish Reversal Detection with Multi-Condition Filters
Overview
This indicator is designed to detect bearish reversal opportunities by combining candlestick behavior, momentum shifts, and trend confirmation. It focuses solely on SELL signals to help traders identify market exhaustion during extended uptrends.
What It Does
This script generates a SELL signal only when all of the following conditions are met:
Reversal Candlestick Pattern
A bearish candle with a long upper wick and a red body, indicating potential rejection at higher prices.
EMA Trend Filter
The price must be above a long-period Exponential Moving Average (default: 89), suggesting that the market is in an uptrend and potentially overextended.
RSI Overbought Condition
The RSI value must be above a set threshold (default: 55), highlighting weakening buying pressure or overbought conditions.
MACD Histogram Confirmation
The MACD histogram must be decreasing, signaling a possible momentum shift to the downside.
A signal is plotted only when all these criteria are true on the same candle.
Why These Conditions Work Together
Each component adds a layer of confirmation:
The candlestick structure highlights possible market rejection.
EMA filtering ensures signals are only taken during uptrends, where mean-reverting setups are more likely.
RSI adds momentum context to avoid entering too early.
MACD histogram slope helps detect fading strength before the price turns.
This combination avoids arbitrary mashups by integrating each tool into a cohesive reversal strategy.
Additional Features
Signal markers displayed directly on the chart when conditions are met
EMA line plotted and colored by trend direction
MACD crossover zones displayed via background shading
Real-time RSI label with context-aware coloring
Automatic detection of nearby support and resistance levels with visual labels and zones
Not a Test or Fork
This script is fully functional and built for practical trading use. It is not an experiment, a minor variation of another script, or a copy with no added logic.
Disclaimer
This script is for educational purposes only and does not constitute financial advice.
Users should apply their own judgment and risk management when using it in live trading.
////////////////////////////////////////////////////////////////////////
IEK Signal Sell Only
อินดิเคเตอร์จับสัญญาณกลับตัวขาลงแบบมีเงื่อนไขหลายชั้น
ภาพรวม
อินดิเคเตอร์ตัวนี้ออกแบบมาเพื่อจับจังหวะการกลับตัวขาลง (Bearish Reversal) โดยพิจารณาจากพฤติกรรมแท่งเทียน โมเมนตัม และทิศทางของแนวโน้ม โดยเน้นเฉพาะสัญญาณฝั่งขาย (Sell) เหมาะสำหรับผู้ที่ต้องการหาจุดขายเมื่อราคาอยู่ในแนวโน้มขาขึ้นหรือช่วงที่ราคายืดตัวมากเกินไป
กลไกการทำงาน
สัญญาณ Sell จะเกิดขึ้นเมื่อเงื่อนไขทั้งหมดต่อไปนี้เป็นจริงพร้อมกัน:
แท่งเทียนกลับตัวขาลง
มีลักษณะแท่งแดง (ราคาปิดต่ำกว่าราคาเปิด) และมีไส้เทียนด้านบนยาวกว่าปกติ ซึ่งมักแสดงถึงแรงขายที่เกิดจากการถูกปฏิเสธราคาในระดับสูง
กรองแนวโน้มด้วย EMA
ราคาปิดต้องอยู่เหนือเส้นค่าเฉลี่ยเคลื่อนที่แบบเอ็กซ์โปเนนเชียล (EMA) ระยะยาว เช่น EMA 89 เพื่อระบุว่าตลาดอยู่ในขาขึ้นและเริ่มมีความเสี่ยงต่อการพักตัว
ค่า RSI อยู่ในโซน Overbought
RSI ต้องมากกว่าค่าที่กำหนดไว้ เช่น 55 เพื่อบ่งชี้ว่าแรงซื้อเริ่มอ่อนแรง หรืออยู่ในภาวะซื้อมากเกินไป
MACD Histogram ลดลง
Histogram ของ MACD ต้องลดลงจากแท่งก่อนหน้า เพื่อยืนยันว่าโมเมนตัมกำลังเริ่มเปลี่ยนทิศทาง
หากครบทั้ง 4 เงื่อนไข อินดิเคเตอร์จะแสดงสัญญาณขายบนกราฟทันที
เหตุผลในการรวมองค์ประกอบเหล่านี้
องค์ประกอบแต่ละตัวมีหน้าที่เสริมซึ่งกันและกัน:
โครงสร้างแท่งเทียนให้ภาพการกลับตัวแบบชัดเจน
EMA ใช้เพื่อจำกัดการเข้า Sell เฉพาะในแนวโน้มขาขึ้นที่มีโอกาสพักตัว
RSI เป็นตัวกรองเชิงโมเมนตัม เพื่อไม่ให้เข้าสวนเทรนด์เร็วเกินไป
MACD Histogram ใช้ตรวจสอบการเปลี่ยนทิศของแรงขับเคลื่อน
จุดเด่นคือ ไม่ใช่การรวมตัวของอินดิเคเตอร์แบบสุ่ม แต่เป็นการออกแบบที่มีโครงสร้างชัดเจนและสัมพันธ์กัน
ฟีเจอร์เพิ่มเติม
แสดงสัญญาณ Sell ด้วยสัญลักษณ์บนแท่งเทียน
เส้น EMA เปลี่ยนสีตามทิศทางแนวโน้ม
แสดงโซน MACD crossover ด้วยพื้นหลัง
แสดงค่าของ RSI พร้อมการเปลี่ยนสีตามระดับ
คำนวณแนวรับ–แนวต้านโดยอัตโนมัติ พร้อมวาดเส้นและกล่องแสดงระยะห่างจากราคา
ไม่ใช่สคริปต์ทดลอง
สคริปต์นี้พัฒนาเพื่อใช้งานจริง และไม่ใช่สคริปต์ทดลองหรือดัดแปลงจากโค้ดอื่นโดยไม่มีการปรับปรุงเชิงตรรกะ
ข้อสงวนสิทธิ์
อินดิเคเตอร์นี้จัดทำขึ้นเพื่อใช้ในการศึกษาเท่านั้น และไม่ใช่คำแนะนำในการลงทุน
ผู้ใช้งานควรใช้ดุลยพินิจและบริหารความเสี่ยงด้วยตนเอง
Smooth Fibonacci BandsSmooth Fibonacci Bands
This indicator overlays adaptive Fibonacci bands on your chart, creating dynamic support and resistance zones based on price volatility. It combines a simple moving average with ATR-based Fibonacci levels to generate multiple bands that expand and contract with market conditions.
## Features
- Creates three pairs of upper and lower Fibonacci bands
- Smoothing option for cleaner, less noisy bands
- Fully customizable colors and line thickness
- Adapts automatically to changing market volatility
## Settings
Adjust the SMA and ATR lengths to match your trading timeframe. For short-term trading, try lower values; for longer-term analysis, use higher values. The Fibonacci factors determine how far each band extends from the center line - standard Fibonacci ratios (1.618, 2.618, and 4.236) are provided as defaults.
## Trading Applications
- Use band crossovers as potential entry and exit signals
- Look for price bouncing off bands as reversal opportunities
- Watch for price breaking through multiple bands as strong trend confirmation
- Identify potential support/resistance zones for placing stop losses or take profits
Fibonacci Bands combines the reliability of moving averages with the adaptability of ATR and the natural market harmony of Fibonacci ratios, offering a robust framework for both trend and range analysis.
Why EMA Isn't What You Think It IsMany new traders adopt the Exponential Moving Average (EMA) believing it's simply a "better Simple Moving Average (SMA)". This common misconception leads to fundamental misunderstandings about how EMA works and when to use it.
EMA and SMA differ at their core. SMA use a window of finite number of data points, giving equal weight to each data point in the calculation period. This makes SMA a Finite Impulse Response (FIR) filter in signal processing terms. Remember that FIR means that "all that we need is the 'period' number of data points" to calculate the filter value. Anything beyond the given period is not relevant to FIR filters – much like how a security camera with 14-day storage automatically overwrites older footage, making last month's activity completely invisible regardless of how important it might have been.
EMA, however, is an Infinite Impulse Response (IIR) filter. It uses ALL historical data, with each past price having a diminishing - but never zero - influence on the calculated value. This creates an EMA response that extends infinitely into the past—not just for the last N periods. IIR filters cannot be precise if we give them only a 'period' number of data to work on - they will be off-target significantly due to lack of context, like trying to understand Game of Thrones by watching only the final season and wondering why everyone's so upset about that dragon lady going full pyromaniac.
If we only consider a number of data points equal to the EMA's period, we are capturing no more than 86.5% of the total weight of the EMA calculation. Relying on he period window alone (the warm-up period) will provide only 1 - (1 / e^2) weights, which is approximately 1−0.1353 = 0.8647 = 86.5%. That's like claiming you've read a book when you've skipped the first few chapters – technically, you got most of it, but you probably miss some crucial early context.
▶️ What is period in EMA used for?
What does a period parameter really mean for EMA? When we select a 15-period EMA, we're not selecting a window of 15 data points as with an SMA. Instead, we are using that number to calculate a decay factor (α) that determines how quickly older data loses influence in EMA result. Every trader knows EMA calculation: α = 1 / (1+period) – or at least every trader claims to know this while secretly checking the formula when they need it.
Thinking in terms of "period" seriously restricts EMA. The α parameter can be - should be! - any value between 0.0 and 1.0, offering infinite tuning possibilities of the indicator. When we limit ourselves to whole-number periods that we use in FIR indicators, we can only access a small subset of possible IIR calculations – it's like having access to the entire RGB color spectrum with 16.7 million possible colors but stubbornly sticking to the 8 basic crayons in a child's first art set because the coloring book only mentioned those by name.
For example:
Period 10 → alpha = 0.1818
Period 11 → alpha = 0.1667
What about wanting an alpha of 0.17, which might yield superior returns in your strategy that uses EMA? No whole-number period can provide this! Direct α parameterization offers more precision, much like how an analog tuner lets you find the perfect radio frequency while digital presets force you to choose only from predetermined stations, potentially missing the clearest signal sitting right between channels.
Sidenote: the choice of α = 1 / (1+period) is just a convention from 1970s, probably started by J. Welles Wilder, who popularized the use of the 14-day EMA. It was designed to create an approximate equivalence between EMA and SMA over the same number of periods, even thought SMA needs a period window (as it is FIR filter) and EMA doesn't. In reality, the decay factor α in EMA should be allowed any valye between 0.0 and 1.0, not just some discrete values derived from an integer-based period! Algorithmic systems should find the best α decay for EMA directly, allowing the system to fine-tune at will and not through conversion of integer period to float α decay – though this might put a few traditionalist traders into early retirement. Well, to prevent that, most traditionalist implementations of EMA only use period and no alpha at all. Heaven forbid we disturb people who print their charts on paper, draw trendlines with rulers, and insist the market "feels different" since computers do algotrading!
▶️ Calculating EMAs Efficiently
The standard textbook formula for EMA is:
EMA = CurrentPrice × alpha + PreviousEMA × (1 - alpha)
But did you know that a more efficient version exists, once you apply a tiny bit of high school algebra:
EMA = alpha × (CurrentPrice - PreviousEMA) + PreviousEMA
The first one requires three operations: 2 multiplications + 1 addition. The second one also requires three ops: 1 multiplication + 1 addition + 1 subtraction.
That's pathetic, you say? Not worth implementing? In most computational models, multiplications cost much more than additions/subtractions – much like how ordering dessert costs more than asking for a water refill at restaurants.
Relative CPU cost of float operations :
Addition/Subtraction: ~1 cycle
Multiplication: ~5 cycles (depending on precision and architecture)
Now you see the difference? 2 * 5 + 1 = 11 against 5 + 1 + 1 = 7. That is ≈ 36.36% efficiency gain just by swapping formulas around! And making your high school math teacher proud enough to finally put your test on the refrigerator.
▶️ The Warmup Problem: how to start the EMA sequence right
How do we calculate the first EMA value when there's no previous EMA available? Let's see some possible options used throughout the history:
Start with zero : EMA(0) = 0. This creates stupidly large distortion until enough bars pass for the horrible effect to diminish – like starting a trading account with zero balance but backdating a year of missed trades, then watching your balance struggle to climb out of a phantom debt for months.
Start with first price : EMA(0) = first price. This is better than starting with zero, but still causes initial distortion that will be extra-bad if the first price is an outlier – like forming your entire opinion of a stock based solely on its IPO day price, then wondering why your model is tanking for weeks afterward.
Use SMA for warmup : This is the tradition from the pencil-and-paper era of technical analysis – when calculators were luxury items and "algorithmic trading" meant your broker had neat handwriting. We first calculate an SMA over the initial period, then kickstart the EMA with this average value. It's widely used due to tradition, not merit, creating a mathematical Frankenstein that uses an FIR filter (SMA) during the initial period before abruptly switching to an IIR filter (EMA). This methodology is so aesthetically offensive (abrupt kink on the transition from SMA to EMA) that charting platforms hide these early values entirely, pretending EMA simply doesn't exist until the warmup period passes – the technical analysis equivalent of sweeping dust under the rug.
Use WMA for warmup : This one was never popular because it is harder to calculate with a pencil - compared to using simple SMA for warmup. Weighted Moving Average provides a much better approximation of a starting value as its linear descending profile is much closer to the EMA's decay profile.
These methods all share one problem: they produce inaccurate initial values that traders often hide or discard, much like how hedge funds conveniently report awesome performance "since strategy inception" only after their disastrous first quarter has been surgically removed from the track record.
▶️ A Better Way to start EMA: Decaying compensation
Think of it this way: An ideal EMA uses an infinite history of prices, but we only have data starting from a specific point. This creates a problem - our EMA starts with an incorrect assumption that all previous prices were all zero, all close, or all average – like trying to write someone's biography but only having information about their life since last Tuesday.
But there is a better way. It requires more than high school math comprehension and is more computationally intensive, but is mathematically correct and numerically stable. This approach involves compensating calculated EMA values for the "phantom data" that would have existed before our first price point.
Here's how phantom data compensation works:
We start our normal EMA calculation:
EMA_today = EMA_yesterday + α × (Price_today - EMA_yesterday)
But we add a correction factor that adjusts for the missing history:
Correction = 1 at the start
Correction = Correction × (1-α) after each calculation
We then apply this correction:
True_EMA = Raw_EMA / (1-Correction)
This correction factor starts at 1 (full compensation effect) and gets exponentially smaller with each new price bar. After enough data points, the correction becomes so small (i.e., below 0.0000000001) that we can stop applying it as it is no longer relevant.
Let's see how this works in practice:
For the first price bar:
Raw_EMA = 0
Correction = 1
True_EMA = Price (since 0 ÷ (1-1) is undefined, we use the first price)
For the second price bar:
Raw_EMA = α × (Price_2 - 0) + 0 = α × Price_2
Correction = 1 × (1-α) = (1-α)
True_EMA = α × Price_2 ÷ (1-(1-α)) = Price_2
For the third price bar:
Raw_EMA updates using the standard formula
Correction = (1-α) × (1-α) = (1-α)²
True_EMA = Raw_EMA ÷ (1-(1-α)²)
With each new price, the correction factor shrinks exponentially. After about -log₁₀(1e-10)/log₁₀(1-α) bars, the correction becomes negligible, and our EMA calculation matches what we would get if we had infinite historical data.
This approach provides accurate EMA values from the very first calculation. There's no need to use SMA for warmup or discard early values before output converges - EMA is mathematically correct from first value, ready to party without the awkward warmup phase.
Here is Pine Script 6 implementation of EMA that can take alpha parameter directly (or period if desired), returns valid values from the start, is resilient to dirty input values, uses decaying compensator instead of SMA, and uses the least amount of computational cycles possible.
// Enhanced EMA function with proper initialization and efficient calculation
ema(series float source, simple int period=0, simple float alpha=0)=>
// Input validation - one of alpha or period must be provided
if alpha<=0 and period<=0
runtime.error("Alpha or period must be provided")
// Calculate alpha from period if alpha not directly specified
float a = alpha > 0 ? alpha : 2.0 / math.max(period, 1)
// Initialize variables for EMA calculation
var float ema = na // Stores raw EMA value
var float result = na // Stores final corrected EMA
var float e = 1.0 // Decay compensation factor
var bool warmup = true // Flag for warmup phase
if not na(source)
if na(ema)
// First value case - initialize EMA to zero
// (we'll correct this immediately with the compensation)
ema := 0
result := source
else
// Standard EMA calculation (optimized formula)
ema := a * (source - ema) + ema
if warmup
// During warmup phase, apply decay compensation
e *= (1-a) // Update decay factor
float c = 1.0 / (1.0 - e) // Calculate correction multiplier
result := c * ema // Apply correction
// Stop warmup phase when correction becomes negligible
if e <= 1e-10
warmup := false
else
// After warmup, EMA operates without correction
result := ema
result // Return the properly compensated EMA value
▶️ CONCLUSION
EMA isn't just a "better SMA"—it is a fundamentally different tool, like how a submarine differs from a sailboat – both float, but the similarities end there. EMA responds to inputs differently, weighs historical data differently, and requires different initialization techniques.
By understanding these differences, traders can make more informed decisions about when and how to use EMA in trading strategies. And as EMA is embedded in so many other complex and compound indicators and strategies, if system uses tainted and inferior EMA calculatiomn, it is doing a disservice to all derivative indicators too – like building a skyscraper on a foundation of Jell-O.
The next time you add an EMA to your chart, remember: you're not just looking at a "faster moving average." You're using an INFINITE IMPULSE RESPONSE filter that carries the echo of all previous price actions, properly weighted to help make better trading decisions.
EMA done right might significantly improve the quality of all signals, strategies, and trades that rely on EMA somewhere deep in its algorithmic bowels – proving once again that math skills are indeed useful after high school, no matter what your guidance counselor told you.