TASC 2025.03 A New Solution, Removing Moving Average Lag█ OVERVIEW
This script implements a novel technique for removing lag from a moving average, as introduced by John Ehlers in the "A New Solution, Removing Moving Average Lag" article featured in the March 2025 edition of TASC's Traders' Tips .
█ CONCEPTS
In his article, Ehlers explains that the average price in a time series represents a statistical estimate for a block of price values, where the estimate is positioned at the block's center on the time axis. In the case of a simple moving average (SMA), the calculation moves the analyzed block along the time axis and computes an average after each new sample. Because the average's position is at the center of each block, the SMA inherently lags behind price changes by half the data length.
As a solution to removing moving average lag, Ehlers proposes a new projected moving average (PMA) . The PMA smooths price data while maintaining responsiveness by calculating a projection of the average using the data's linear regression slope.
The slope of linear regression on a block of financial time series data can be expressed as the covariance between prices and sample points divided by the variance of the sample points. Ehlers derives the PMA by adding this slope across half the data length to the SMA, creating a first-order prediction that substantially reduces lag:
PMA = SMA + Slope * Length / 2
In addition, the article includes methods for calculating predictions of the PMA and the slope based on second-order and fourth-order differences. The formulas for these predictions are as follows:
PredictPMA = PMA + 0.5 * (Slope - Slope ) * Length
PredictSlope = 1.5 * Slope - 0.5 * Slope
Ehlers suggests that crossings between the predictions and the original values can help traders identify timely buy and sell signals.
█ USAGE
This indicator displays the SMA, PMA, and PMA prediction for a specified series in the main chart pane, and it shows the linear regression slope and prediction in a separate pane. Analyzing the difference between the PMA and SMA can help to identify trends. The differences between PMA or slope and its corresponding prediction can indicate turning points and potential trade opportunities.
The SMA plot uses the chart's foreground color, and the PMA and slope plots are blue by default. The plots of the predictions have a green or red hue to signify direction. Additionally, the indicator fills the space between the SMA and PMA with a green or red color gradient based on their differences:
Users can customize the source series, data length, and plot colors via the inputs in the "Settings/Inputs" tab.
█ NOTES FOR Pine Script® CODERS
The article's code implementation uses a loop to calculate all necessary sums for the slope and SMA calculations. Ported into Pine, the implementation is as follows:
pma(float src, int length) =>
float PMA = 0., float SMA = 0., float Slope = 0.
float Sx = 0.0 , float Sy = 0.0
float Sxx = 0.0 , float Syy = 0.0 , float Sxy = 0.0
for count = 1 to length
float src1 = src
Sx += count
Sy += src
Sxx += count * count
Syy += src1 * src1
Sxy += count * src1
Slope := -(length * Sxy - Sx * Sy) / (length * Sxx - Sx * Sx)
SMA := Sy / length
PMA := SMA + Slope * length / 2
However, loops in Pine can be computationally expensive, and the above loop's runtime scales directly with the specified length. Fortunately, Pine's built-in functions often eliminate the need for loops. This indicator implements the following function, which simplifies the process by using the ta.linreg() and ta.sma() functions to calculate equivalent slope and SMA values efficiently:
pma(float src, int length) =>
float Slope = ta.linreg(src, length, 0) - ta.linreg(src, length, 1)
float SMA = ta.sma(src, length)
float PMA = SMA + Slope * length * 0.5
To learn more about loop elimination in Pine, refer to this section of the User Manual's Profiling and optimization page.
Moving Averages
スイングハイ/ローの水平線(EMAトリガー)//@version=5
indicator("スイングハイ/ローの水平線(EMAトリガー)", overlay=true, max_lines_count=500)
//─────────────────────────────
//【入力パラメータ】
//─────────────────────────────
pivotPeriod = input.int(title="Pivot期間(左右バー数)", defval=10, minval=1)
emaPeriod = input.int(title="EMA期間", defval=20, minval=1)
lineColorHigh = input.color(title="スイングハイ水平線の色", defval=color.red)
lineColorLow = input.color(title="スイングロー水平線の色", defval=color.green)
lineWidth = input.int(title="水平線の太さ", defval=2, minval=1, maxval=10)
displayBars = input.int(title="表示する過去ローソク足数", defval=200, minval=1)
//─────────────────────────────
//【EMAの計算&プロット】
//─────────────────────────────
emaValue = ta.ema(close, emaPeriod)
plot(emaValue, color=color.orange, title="EMA")
//─────────────────────────────
//【Pivot(スイングハイ/ロー)の検出&マーカー表示】
//─────────────────────────────
pivotHighVal = ta.pivothigh(high, pivotPeriod, pivotPeriod)
pivotLowVal = ta.pivotlow(low, pivotPeriod, pivotPeriod)
plotshape(pivotHighVal, title="スイングハイ", style=shape.triangledown, location=location.abovebar, color=lineColorHigh, size=size.tiny, offset=-pivotPeriod)
plotshape(pivotLowVal, title="スイングロー", style=shape.triangleup, location=location.belowbar, color=lineColorLow, size=size.tiny, offset=-pivotPeriod)
//─────────────────────────────
//【水平線(pivotライン)管理用の配列定義】
//─────────────────────────────
// 各ピボットに対して、作成した水平線オブジェクト、開始バー、ピボット価格、ピボット種類、確定フラグを保持
var line pivotLines = array.new_line()
var int pivotLineBars = array.new_int()
var float pivotLinePrices = array.new_float()
var int pivotLineTypes = array.new_int() // 1: スイングハイ, -1: スイングロー
var bool pivotLineFinaled = array.new_bool() // EMA条件で確定済みかどうか
//─────────────────────────────
//【新たなPivot発生時に水平線を作成】
//─────────────────────────────
if not na(pivotHighVal)
pivotBar = bar_index - pivotPeriod
newLine = line.new(pivotBar, pivotHighVal, pivotBar, pivotHighVal, extend=extend.none, color=lineColorHigh, width=lineWidth)
array.push(pivotLines, newLine)
array.push(pivotLineBars, pivotBar)
array.push(pivotLinePrices, pivotHighVal)
array.push(pivotLineTypes, 1) // 1:スイングハイ
array.push(pivotLineFinaled, false)
if not na(pivotLowVal)
pivotBar = bar_index - pivotPeriod
newLine = line.new(pivotBar, pivotLowVal, pivotBar, pivotLowVal, extend=extend.none, color=lineColorLow, width=lineWidth)
array.push(pivotLines, newLine)
array.push(pivotLineBars, pivotBar)
array.push(pivotLinePrices, pivotLowVal)
array.push(pivotLineTypes, -1) // -1:スイングロー
array.push(pivotLineFinaled, false)
//─────────────────────────────
//【古い水平線の削除:指定過去ローソク足数より前のラインを削除】
//─────────────────────────────
if array.size(pivotLines) > 0
while array.size(pivotLines) > 0 and (bar_index - array.get(pivotLineBars, 0) > displayBars)
line.delete(array.get(pivotLines, 0))
array.remove(pivotLines, 0)
array.remove(pivotLineBars, 0)
array.remove(pivotLinePrices, 0)
array.remove(pivotLineTypes, 0)
array.remove(pivotLineFinaled, 0)
//─────────────────────────────
//【各バーで、未確定の水平線を更新】
//─────────────────────────────
if array.size(pivotLines) > 0
for i = 0 to array.size(pivotLines) - 1
if not array.get(pivotLineFinaled, i)
pivotPrice = array.get(pivotLinePrices, i)
pivotType = array.get(pivotLineTypes, i)
startBar = array.get(pivotLineBars, i)
if bar_index >= startBar
lineObj = array.get(pivotLines, i)
line.set_x2(lineObj, bar_index)
// スイングハイの場合:EMAがピボット価格を上回ったら確定
if pivotType == 1 and emaValue > pivotPrice
line.set_x2(lineObj, bar_index)
array.set(pivotLineFinaled, i, true)
// スイングローの場合:EMAがピボット価格を下回ったら確定
if pivotType == -1 and emaValue < pivotPrice
line.set_x2(lineObj, bar_index)
array.set(pivotLineFinaled, i, true)
Gelişmiş Supertrend + EMA StratejiBu strateji, üç temel göstergenin kombinasyonunu kullanarak alım-satım sinyalleri üreten bir sistemdir:
Ana Göstergeler:
EMA 5 (Hızlı Hareketli Ortalama)
EMA 20 (Yavaş Hareketli Ortalama)
Supertrend (ATR tabanlı trend göstergesi)
Alış Sinyali Koşulları:
Şu iki koşul aynı anda gerçekleştiğinde alış sinyali üretilir:
EMA 5, EMA 20'yi yukarı kesiyor (emaCrossUp)
Supertrend yukarı trend gösteriyor (stUp)
Satış Sinyali Koşulları:
Şu iki koşul aynı anda gerçekleştiğinde satış sinyali üretilir:
EMA 5, EMA 20'yi aşağı kesiyor (emaCrossDown)
Supertrend aşağı trend gösteriyor (stDown)
Stratejinin Çalışma Mantığı:
Trend Teyidi: Supertrend, genel trend yönünü belirler
Momentum Teyidi: EMA kesişimleri, momentumu gösterir
Çift Onay: Her iki göstergenin de aynı yönü işaret etmesi gerekir
Görsel Göstergeler:
Yeşil "AL" etiketi: Alış noktalarını gösterir (mum altında)
Kırmızı "SAT" etiketi: Satış noktalarını gösterir (mum üstünde)
Mavi çizgi: EMA 5
Kırmızı çizgi: EMA 20
Yeşil/Kırmızı çizgi: Supertrend
Bilgi Tablosu İçeriği:
Mevcut Sinyal: Son üretilen sinyal
EMA Trend: EMA'ların gösterdiği trend
Supertrend: Supertrend'in gösterdiği yön
Son İşlem: En son gerçekleşen alım veya satım
Stratejinin Avantajları:
Trend takibi sağlar
Yanlış sinyalleri azaltır
Görsel olarak anlaşılması kolaydır
Çift onay sistemi ile güvenilirlik artar
Kullanım Önerileri:
Günlük veya 4 saatlik grafiklerde daha etkilidir
Güçlü trend dönemlerinde daha iyi çalışır
Yatay piyasalarda dikkatli kullanılmalıdır
Stop loss ve take profit seviyeleri eklenmelidir
Parametre Optimizasyonu:
- EMA periyotları piyasa volatilitesine göre ayarlanabilir
Supertrend parametreleri trend hassasiyetini belirler
Risk Yönetimi Önerileri:
Her işlemde sabit risk oranı kullanın
Trend yönünde işlem yapın
Piyasa volatilitesine göre stop loss belirleyin
Pozisyon büyüklüğünü risk yönetimine göre ayarlayın
11. En İyi Kullanım Senaryoları:
Trend başlangıçlarını yakalamak için
Trend dönüşlerini tespit etmek için
Momentum değişimlerini takip etmek için
Orta-uzun vadeli pozisyonlar için
Bu strateji, trend takibi ve momentum stratejilerinin bir kombinasyonudur. Özellikle trendli piyasalarda etkili olabilir, ancak her strateji gibi risk yönetimi ile birlikte kullanılmalıdır.
9 & 15 EMA Crossover Indicator [Educational Purposes]Disclaimer:
Educational Tool Only: The signals generated by this indicator are intended for educational and informational purposes only. They are not a recommendation to buy or sell any security.
No Financial Advice: I am not a licensed financial advisor, and this indicator should not be construed as financial advice.
Risk Warning: Trading in financial markets involves a high level of risk and may not be suitable for all investors. Always conduct your own research and consider your financial situation before making any decisions.
No Guarantees: While every effort has been made to ensure the reliability of this script, no guarantees are made regarding its accuracy or its ability to predict market movements.
SIOVERSE CTC 5MIndicator: EMA 50 Candle Color & Signal
This indicator combines EMA 10 and EMA 50 to generate buy/sell signals and visually highlight market trends using candle colors.
Key Features:
Candle Coloring:
Candles turn green when the price is above the EMA 50.
Candles turn red when the price is below the EMA 50.
Buy/Sell Signals:
Buy Signal: Triggered when the price closes above EMA 10 High and above EMA 50.
Sell Signal: Triggered when the price closes below EMA 10 Low and below EMA 50.
EMA 50 Line:
The EMA 50 is plotted as an orange line for trend confirmation.
Alerts:
Alerts are generated for buy and sell signals.
How It Works:
The indicator uses EMA 10 Low and EMA 10 High for signal generation but does not display them on the chart.
The EMA 50 acts as a trend filter:
Only buy signals are shown when the price is above the EMA 50.
Only sell signals are shown when the price is below the EMA 50.
Visuals:
Green candles indicate bullish conditions (price above EMA 50).
Red candles indicate bearish conditions (price below EMA 50).
Buy/sell signals are marked with labels ("BUY" or "SELL") on the chart.
CBC Strategy with Trend Confirmation & Separate Stop LossCBC Flip Strategy with Trend Confirmation and ATR-Based Targets
This strategy is based on the CBC Flip concept taught by MapleStax and inspired by the original CBC Flip indicator by AsiaRoo. It focuses on identifying potential reversals or trend continuation points using a combination of candlestick patterns (CBC Flips), trend filters, and a time-based entry window. This approach helps traders avoid false signals and increase trade accuracy.
What is a CBC Flip?
The CBC Flip is a candlestick-based pattern that identifies moments when the market is likely to change direction or strengthen its trend. It checks for a shift in price behavior between consecutive candles, signaling a bullish (upward) or bearish (downward) move.
However, not all flips are created equal! This strategy differentiates between Strong Flips and All Flips, allowing traders to choose between a more conservative or aggressive approach.
Strong Flips vs. All Flips
Strong Flips
A Strong Flip is a high-probability setup that occurs only after liquidity is swept from the previous candle’s high or low.
What is a liquidity sweep? This happens when the price briefly moves beyond the high or low of the previous candle, triggering stop-losses and trapping traders in the wrong direction. These sweeps often create fuel for the next move, making them powerful reversal signals.
Examples:
Long Setup: The price dips below the previous candle’s low (sweeping liquidity) and then closes higher, signaling a potential bullish move.
Short Setup: The price moves above the previous candle’s high and then closes lower, signaling a potential bearish move.
Why Use Strong Flips?
They provide fewer signals, but the accuracy is generally higher.
Ideal for trending markets where liquidity sweeps often mark key turning points.
All Flips
All Flips are less selective, offering both Strong Flips and additional signals without requiring a liquidity sweep.
This approach gives traders more frequent opportunities but comes with a higher risk of false signals, especially in sideways markets.
Examples:
Long Setup: A CBC flip occurs without sweeping the previous low, but the trend direction is confirmed (slow EMA is still above VWAP).
Short Setup: A CBC flip occurs without sweeping the previous high, but the trend is still bearish (slow EMA below VWAP).
Why Use All Flips?
Provides more frequent entries for active or aggressive traders.
Works well in trending markets but requires caution during consolidation periods.
How This Strategy Works
The strategy combines CBC Flips with multiple filters to ensure better trade quality:
Trend Confirmation: The slow EMA (20-period) must be positioned relative to the VWAP to confirm the overall trend direction.
Long Trades: Slow EMA must be above VWAP (upward trend).
Short Trades: Slow EMA must be below VWAP (downward trend).
Time-Based Filter: Traders can specify trading hours to limit entries to a particular time window, helping avoid low-volume or high-volatility periods.
Profit Target and Stop-Loss:
Profit Target: Defined as a multiple of the 14-period ATR (Average True Range). For example, if the ATR is 10 points and the profit target multiplier is set to 1.5, the strategy aims for a 15-point profit.
Stop-Loss: Uses a dynamic, candle-based stop-loss:
Long Trades: The trade closes if the market closes below the low of two candles ago.
Short Trades: The trade closes if the market closes above the high of two candles ago.
This approach adapts to recent price behavior and protects against unexpected reversals.
Customizable Settings
Strong Flips vs. All Flips: Choose between a more selective or aggressive entry style.
Profit Target Multiplier: Adjust the ATR multiplier to control the distance for profit targets.
Entry Time Range: Define specific trading hours for the strategy.
Indicators and Visuals
Fast EMA (10-Period) – Black Line
Slow EMA (20-Period) – Red Line
VWAP (Volume-Weighted Average Price) – Orange Line
Visual Labels:
▵ (Triangle Up) – Marks long entries (buy signals).
▿ (Triangle Down) – Marks short entries (sell signals).
Credits
CBC Flip Concept: Inspired by MapleStax, who teaches this concept.
Original Indicator: Developed by AsiaRoo, this strategy builds on the CBC Flip framework with additional features for improved trade management.
Risks and Disclaimer
This strategy is for educational purposes only and does not constitute financial advice.
Trading involves significant risk and may result in the loss of capital. Past performance does not guarantee future results. Use this strategy in a simulated environment before applying it to live trading.
Smooth Candles (Less Noise)smoothed candles for great and fast entry with tight stops, use with rsi and macd to confirm the entries to be more high probablity trades.
200MA x3 Investor Tool with Undervaluation LineThis indicator gives a very simple 200 period moving average along with a 3x overvalued line and a -2x undervalued line. These lines have been good predictors of times where crypto will retrace back to its mean.
Pump & Dump Indicator with RSI5-15 dakikalık yapay zeka destekli gelişmiş pump ve dump sinyalleri kripto varlıklar yüksek risk içerir tüm paranızı kaybedebilirsiniz lütfen yatırımlarınızı ona göre yapınız
ORB-5Min + Adaptive 12/48 EMA + PDH/PDLThis script integrates three powerful elements into a handy all-in-one tool for intraday trading: a 5-minute opening range (ORB) to highlight potential early support/resistance, color-coded EMAs (9, 12, 48, and 200) to gauge short- and long-term momentum, and the previous day’s high/low to mark key pivot points.
By visually emphasizing the ORB zone, adapting EMA colors based on price action, and displaying PDH/PDL, it helps day traders quickly spot breakout opportunities, momentum shifts, and critical support/resistance levels.
For the best results, use it on intraday charts and combine its insights with your broader market analysis or price action strategies.
Be sure to customize the settings—such as toggling the ORB lines, adjusting fill opacity, or choosing EMA colors—to match your trading style. This all-in-one solution saves chart space while providing essential reference points in one convenient script.
Crossing of MA VariantsThis indicator provides crossovers for various Moving Average variants and their input parameters. The Moving Average variants are:
- Simple Moving Average (SMA)
- Exponential Moving Average (EMA)
- Weighted Moving Average (WMA)
- Symmetrically Weighted Moving Average (SWMA)
- Hull Moving Average (HMA)
- Volume-Weighted Moving Average (VWMA)
- Double Exponential Moving Average (DEMA)
- Triple Exponential Moving Average (TEMA)
- Fractal Adaptive Moving Average (FRAMA)
- Arnaud Legoux Moving Average (ALMA)
- Least Squares Moving Average (LSMA)
This indicator also comes with various customizations, backgrounds, plots and alerts.
EMA ON/OFF labels {By McAi}EMA ON/OFF Labels {By McAi}
This EMA ON/OFF Labels script provides a set of customizable Exponential Moving Averages (EMAs) to help traders analyze trends effectively.
Features:
✅ Adjustable EMA Lengths – Modify the length of each EMA to fit your trading strategy.
✅ Customizable Visibility – Hide or show individual EMAs to keep your chart clean and focused.
✅ Dynamic Labeling – Enable or disable EMA labels for a quick overview of their positions.
✅ Custom Colors:
Blue: EMA 20
Orange: EMA 50
Yellow: EMA 200
Gray: Other EMAs
This EMA ON/OFF Labels {By McAi} script is perfect for traders who want flexibility in their moving average setup while maintaining a clean and organized chart.
SMA_EMA_RSI_MACD with Strength# **SMA_EMA_RSI_MACD with Strength Indicator**
### **Overview**
The **SMA_EMA_RSI_MACD with Strength Indicator** is a powerful tool designed for traders who want to combine multiple technical indicators to identify high-probability trade setups. This indicator integrates **Simple Moving Averages (SMA), Exponential Moving Averages (EMA), the Relative Strength Index (RSI), and the Moving Average Convergence Divergence (MACD)** to generate **Buy (Call) and Sell (Put) signals** along with a built-in strength measurement.
### **Key Features**
✅ **EMA & SMA-Based Trend Confirmation** – Identifies market trends using multiple short- and long-term moving averages.
✅ **RSI with Moving Average** – Measures momentum strength and ensures entry signals align with trend direction.
✅ **MACD Confirmation** – Uses MACD crossovers for added trade confirmation.
✅ **Strength Calculation** – Computes the strength of a signal based on RSI distance from neutral, MACD difference, and moving average spread.
✅ **Buy and Sell Labels** – Displays entry points along with signal strength on the chart.
✅ **Alerts for Trading Signals** – Get notified when a buy or sell signal is triggered.
### **How It Works**
🔹 **Buy (Call) Signal**:
- The short-term EMAs/SMA cross above long-term EMAs/SMA.
- RSI is above its moving average.
- MACD line is above the signal line.
- Strength calculation confirms trend reliability.
🔻 **Sell (Put) Signal**:
- The short-term EMAs/SMA cross below long-term EMAs/SMA.
- RSI is below its moving average.
- MACD line is below the signal line.
- Strength calculation confirms trend reliability.
### **Customization Options**
- Adjustable **RSI length and smoothing method** (SMA or EMA).
- Configurable **MACD parameters** (fast, slow, and signal length).
- Customizable **Stop Loss & Take Profit multipliers** using ATR.
- Alerts for **Buy (Call) and Sell (Put) signals**.
### **Best Use Cases**
✅ Works well for **day trading, swing trading, and scalping**.
✅ Effective in **trending markets** (best used with higher timeframes like 5m, 15m, 1H, or higher).
✅ Can be combined with **price action and support/resistance levels** for additional confluence.
### **Disclaimer**
This indicator is **for educational purposes only** and should not be considered financial advice. Always do your own research before making any trading decisions.
PumpC CBC EMAs + VWAPPumpC CBC EMAs + VWAP Indicator for Tradingview
Introduction
This is an indicator for the Candle By Candle (CBC) Flip strategy , based on the CBC Flip concept taught by MapleStax and inspired by the original CBC Flip indicator by AsiaRoo . The CBC Flip strategy is a simple yet effective approach to gauge if bulls or bears are in control for any given candle.
The logic behind the CBC Flip is as follows:
Bullish Flip : If the most recent candle’s close is above the previous candle’s high, bulls have taken control.
Bearish Flip : If the most recent candle’s close is below the previous candle’s low, bears are now in control.
No Flip : If neither condition is met, the previously dominant side (bulls or bears) remains in control until one of these conditions is satisfied, flipping the market sentiment—hence the name CBC Flip .
The PumpC CBC EMAs + VWAP Indicator enhances this simple strategy by adding trend confirmation filters using EMAs and VWAP , along with time-restricted signal generation and fully customizable alerts.
What Does This Indicator Do?
The PumpC CBC EMAs + VWAP Indicator helps traders identify CBC Flips to spot potential trend continuations or reversals. It combines candlestick logic , trend filters , and time-based restrictions to provide high-probability trade signals.
CBC Flip Detection
Bullish Flip : Current close is above the previous candle’s high.
Bearish Flip : Current close is below the previous candle’s low.
Strict Flips : Require a liquidity sweep for higher accuracy.
All Flips : Looser conditions that generate more frequent signals.
EMA and VWAP Trend Confirmation (Optional)
This filter ensures that long signals only trigger when the Slow EMA is above the VWAP , confirming an upward trend. For short signals, the Slow EMA must be below the VWAP.
Time-Based Filtering
The indicator allows you to set a specific trading window (e.g., 9:00 AM to 3:00 PM), helping you avoid low-volume or high-risk periods.
Visual Labels and Alerts
Labels : Arrows (▲ for long and ▼ for short) mark CBC Flip points on the chart.
Alerts : Fully customizable notifications for each signal type, based on your chosen filters.
Key Features
CBC Flip Detection : Identify potential reversals and trend continuations.
Strict vs. All Flips : Choose between higher-accuracy strict flips or more frequent all flips.
EMA-to-VWAP Filter : Optional trend confirmation filter to reduce false signals.
Customizable EMAs and VWAP : Configure lengths and colors for visual clarity.
Time-Restricted Signals : Focus on your preferred trading session.
Custom Alerts : Notifications for long and short signals based on filter settings.
Credits and Inspiration
The CBC Flip strategy was created by MapleStax .
This indicator is inspired by the original CBC Flip indicator by AsiaRoo .
Additional enhancements include EMA-to-VWAP filtering , custom alerts , and time-restricted signal generation for a more comprehensive trading experience.
Risks and Disclaimer
This indicator is for educational purposes only and does not constitute financial advice.
Trading involves significant risk, and past performance does not guarantee future results. Always test this indicator in a simulated environment before live trading.
10 EMA HTF LTF10 EMA HTF LTF – Exponential Moving Averages Indicator
📌 Indikator haqida
Ushbu indikator joriy vaqt oralig‘ida (LTF – Lower Timeframe) va yuqori vaqt oralig‘ida (HTF – Higher Timeframe) trendni tahlil qilish uchun 10 ta Exponential Moving Average (EMA) chizadi. Har bir EMA o‘zining uzunligiga qarab, harakatlanish tezligiga ega bo‘lib, trendlardagi o‘zgarishlarni kuzatish va trend davomiyligini aniqlash imkonini beradi.
📊 Xususiyatlar
✅ 10 ta EMA: (10, 15, 20, 25, 30, 35, 40, 45, 50, 55)
✅ Trendlardagi o‘zgarishlarni kuzatish uchun mos
✅ Rangli va aniq grafik tasvir
✅ Qisqa va uzoq muddatli trendlarni aniqlashga yordam beradi
📈 Foydalanish usuli
EMA’lar fanning shakliga kirsa, bu kuchli trend mavjudligini bildiradi.
Narx EMA’lardan yuqorida bo‘lsa – bullish trend (o‘sish), pastda bo‘lsa – bearish trend (pasayish).
EMA’lar bir-biriga yaqinlashsa – konsolidatsiya yoki trend o‘zgarishi ehtimoli bor.
🔔 Qaysi treyderlar uchun mos?
✔ Skalperlar va intraday treyderlar – qisqa muddatli trendlarni kuzatish uchun.
✔ Swing treyderlar – uzoq muddatli trendlarga asoslangan strategiyalar uchun.
✔ Yangi boshlovchilar – asosiy trend tahlil qilishni o‘rganish uchun oddiy va tushunarli indikator.
💡 Qo‘shimcha fikrlar
Bu indikator har qanday aktiv (forex, aksiyalar, kriptovalyuta) uchun ishlaydi va boshqa indikatorlar bilan birga qo‘llash mumkin.
SwingTrade_IshSimple indicator keeps on the right side of the market and follow the trend.
Fill color suggest to stay long or short
When SHORTMA, crosses LONGMA from down enter the long position, shown with triangle arrow up
When SHORTMA, crosses LONGMA from up enter the long position, shown with triangle arrow down
Trail the stop with yellow square shape
Note: enter above or below the close of the candle only
higher time frame fill color rules the market
use multi timeframe for better judgement
Trade the context and enjoy the profit
Combined EMA & Real Price IndicatorCombined EMA & Real Price Indicator
i needed this done for myself so I used chat gpt to assist me with the script.
Boilerplate Configurable Strategy [Yosiet]This is a Boilerplate Code!
Hello! First of all, let me introduce myself a little bit. I don't come from the world of finance, but from the world of information and communication technologies (ICT) where we specialize in data processing with the aim of automating it and eliminating all human factors and actors in the processes. You could say that I am an algotrader.
That said, in my journey through trading in recent years I have understood that this world is often shown to be incomplete. All those who want to learn about trading only end up learning a small part of what it really entails, they only seek to learn how to read candlesticks. Therefore, I want to share with the entire community a fraction of what I have really understood it to be.
As a computer scientist, the most important thing is the data, it is the raw material of our work and without data you simply cannot do anything. Entropy is simple: Data in -> Data is transformed -> Data out.
The quality of the outgoing data will directly depend on the incoming data, there is no greater mystery or magic in the process. In trading it is no different, because at the end of the day it is nothing more than data. As we often say, if garbage comes in, garbage comes out.
Most people focus on the results only, on the outgoing data, because in the end we all want the same thing, to make easy money. Very few pay attention to the input data, much less to the process.
Now, I am not here to delude you, because there is no bigger lie than easy money, but I am here to give you a boilerplate code that will help you create strategies where you only have to concentrate on the quality of the incoming data.
To the Point
The code is a strategy boilerplate that applies the technique that you decide to customize for the criteria for opening a position. It already has the other factors involved in trading programmed and automated.
1. The Entry
This section of the boilerplate is the one that each individual must customize according to their needs and knowledge. The code is offered with two simple, well-known strategies to exemplify how the code can be reused for your own benefits.
For the purposes of this post on tradingview, I am going to use the simplest of the known strategies in trading for entries: SMA Crossing
// SMA Cross Settings
maFast = ta.sma(close, length)
maSlow = ta.sma(open, length)
The Strategy Properties for all cases published here:
For Stock TSLA H1 From 01/01/2025 To 02/15/2025
For Crypto XMR-USDT 30m From 01/01/2025 To 02/15/2025
For Forex EUR-USD 5m From 01/01/2025 To 02/15/2025
But the goal of this post is not to sell you a dream, else to show you that the same Entry decision works very well for some and does not for others and with this boilerplate code you only have to think of entries, not exits.
2. Schedules, Days, Sessions
As you know, there are an infinite number of markets that are susceptible to the sessions of each country and the news that they announce during those sessions, so the code already offers parameters so that you can condition the days and hours of operation, filter the best time parameters for a specific market and time frame.
3. Data Filtering
The data offered in trading are numerical series presented in vectors on a time axis where an endless number of mathematical equations can be applied to process them, with matrix calculation and non-linear regressions being the best, in my humble opinion.
4. Read Fundamental Macroeconomic Events, News
The boilerplate has integration with the tradingview SDK to detect when news will occur and offers parameters so that you can enable an exclusion time margin to not operate anything during that time window.
5. Direction and Sense
In my experience I have found the peculiarity that the same algorithm works very well for a market in a time frame, but for the same market in another time frame it is only a waste of time and money. So now you can easily decide if you only want to open LONG, SHORT or both side positions and know how effective your strategy really is.
6. Reading the money, THE PURPOSE OF EVERYTHING
The most important section in trading and the reason why many clients usually hire me as a financial programmer, is reading and controlling the money, because in the end everyone wants to win and no one wants to lose. Now they can easily parameterize how the money should flow and this is the genius of this boilerplate, because it is what will really decide if an algorithm (Indicator: A bunch of math equations) for entries will really leave you good money over time.
7. Managing the Risk, The Ego Destroyer
Many trades, little money. Most traders focus on making money and none of them know about statistics and the few who do know something about it, only focus on the winrate. Well, with this code you can unlock what really matters, the true success criteria to be able to live off of trading: Profit Factor, Sortino Ratio, Sharpe Ratio and most importantly, will you really make money?
8. Managing Emotions
Finally, the main reason why many lose money is because they are very bad at managing their emotions, because with this they will no longer need to do so because the boilerplate has already programmed criteria to chase the price in a position, cut losses and maximize profits.
In short, this is a boilerplate code that already has the data processing and data output ready, you only have to worry about the data input.
“And so the trader learned: the greatest edge was not in predicting the storm, but in building a boat that could not sink.”
DISCLAIMER
This post is intended for programmers and quantitative traders who already have a certain level of knowledge and experience. It is not intended to be financial advice or to sell you any money-making script, if you use it, you do so at your own risk.
PSAR_simple_trend by x001tkThis trend indicator will help you to make directional trades on daily charts as good as intraday
Supertrend with 10 EMA, 20 EMA, 50 EMAThis indicator has Supertrend with 10 EMA, 20 EMA, 50 EMA on single screen. Enjoy !!
Arbitrage SpreadThis indicator was originally published by I_Leo_I
The moving average was modified from EMA to SMA. EMA responds more quickly to recent price changes. It captures short price movements. If you are a day trader or using quick scalping strategies, the EMA tends to be more effective as it provides faster signals.
This indicator helps to find spreads between cryptocurrencies, assess their correlation, spread, z score and atr z score.
The graphs are plotted as a percentage. Because of the limitation in pine tradingview for 5000 bars a period was introduced (after which a new starting point of the graph construction will be started), if you want it can be disabled
The multiplier parameter affects only the construction of the joint diagram on which z score and atr z score are calculated (construction of the diagram is done by dividing one pair by another and multiplying by the multiplier parameter) is shown with a red line
To create a notification you have to specify the data for parameters other than zero which you want to monitor. For parameters z score and atr z score data are counted in both directions
The data can be tracked via the data window
Link to image of the data window prnt.sc/93fKELKSQOhB
CSR Ultimate (Final)This indicator calculates and displays a "Candle Strength Ratio" (CSR) to help you gauge bullish versus bearish momentum on a given timeframe. Here’s what it does:
*Multiple Calculation Methods:*
*You can choose among three different methods:*
-Classic CSR: Compares the difference between the upper and lower parts of the candle relative to its total range.
-Weighted Body CSR: Gives more weight to the candle’s body relative to its wicks.
-Close-Focused CSR: Focuses on the net movement from open to close relative to the full range.
*Optional Enhancements:*
The indicator allows you to enable additional features to refine it:
-Volume Weighting: Adjusts the CSR based on the ratio of current volume to a moving average of volume, so a candle on higher-than-average volume might carry more weight.
-ATR Normalization: Normalizes the CSR using the Average True Range (ATR) to account for market volatility.
-Multi-Bar Averaging: Averages the CSR over a specified number of bars to smooth out noise.
-RSI Filter: Optionally checks an RSI condition (bullish if RSI > 50 or bearish if RSI < 50) to help filter out signals that might not be supported by overall momentum.
*Visual and Alert Features:*
The indicator plots the CSR line with color coding (green for bullish, red for bearish) and draws horizontal threshold lines. It also adjusts the chart background color when the CSR exceeds defined bullish or bearish levels and provides alerts when these thresholds are crossed.
VWAP & SMA 5 Buy/Sell Signalsenables signal for buying when bullish candle is observed above sma5 and vwap similiarly generates a sell signal when bearish candle is observedbelow sma5 and vwap