EMA Crossover Short-Only Strategy5 min timeframe for best results
and best for index only first analyse then implement your own strategy for better optimisation
Chỉ báo và chiến lược
ETO_TrendTrendi inceleyen, hacimli olan coinlerde yükselişleri ve düşüşleri yakalamak için kullanılıyor. Bilindik verileri bir araya getirip uygun şartlarda bir algoritma hazırlandı
Adaptive Momentum Reversion StrategyThe Adaptive Momentum Reversion Strategy: An Empirical Approach to Market Behavior
The Adaptive Momentum Reversion Strategy seeks to capitalize on market price dynamics by combining concepts from momentum and mean reversion theories. This hybrid approach leverages a Rate of Change (ROC) indicator along with Bollinger Bands to identify overbought and oversold conditions, triggering trades based on the crossing of specific thresholds. The strategy aims to detect momentum shifts and exploit price reversions to their mean.
Theoretical Framework
Momentum and Mean Reversion: Momentum trading assumes that assets with a recent history of strong performance will continue in that direction, while mean reversion suggests that assets tend to return to their historical average over time (Fama & French, 1988; Poterba & Summers, 1988). This strategy incorporates elements of both, looking for periods when momentum is either overextended (and likely to revert) or when the asset’s price is temporarily underpriced relative to its historical trend.
Rate of Change (ROC): The ROC is a straightforward momentum indicator that measures the percentage change in price over a specified period (Wilder, 1978). The strategy calculates the ROC over a 2-period window, making it responsive to short-term price changes. By using ROC, the strategy aims to detect price acceleration and deceleration.
Bollinger Bands: Bollinger Bands are used to identify volatility and potential price extremes, often signaling overbought or oversold conditions. The bands consist of a moving average and two standard deviation bounds that adjust dynamically with price volatility (Bollinger, 2002).
The strategy employs two sets of Bollinger Bands: one for short-term volatility (lower band) and another for longer-term trends (upper band), with different lengths and standard deviation multipliers.
Strategy Construction
Indicator Inputs:
ROC Period: The rate of change is computed over a 2-period window, which provides sensitivity to short-term price fluctuations.
Bollinger Bands:
Lower Band: Calculated with a 18-period length and a standard deviation of 1.7.
Upper Band: Calculated with a 21-period length and a standard deviation of 2.1.
Calculations:
ROC Calculation: The ROC is computed by comparing the current close price to the close price from rocPeriod days ago, expressing it as a percentage.
Bollinger Bands: The strategy calculates both upper and lower Bollinger Bands around the ROC, using a simple moving average as the central basis. The lower Bollinger Band is used as a reference for identifying potential long entry points when the ROC crosses above it, while the upper Bollinger Band serves as a reference for exits, when the ROC crosses below it.
Trading Conditions:
Long Entry: A long position is initiated when the ROC crosses above the lower Bollinger Band, signaling a potential shift from a period of low momentum to an increase in price movement.
Exit Condition: A position is closed when the ROC crosses under the upper Bollinger Band, or when the ROC drops below the lower band again, indicating a reversal or weakening of momentum.
Visual Indicators:
ROC Plot: The ROC is plotted as a line to visualize the momentum direction.
Bollinger Bands: The upper and lower bands, along with their basis (simple moving averages), are plotted to delineate the expected range for the ROC.
Background Color: To enhance decision-making, the strategy colors the background when extreme conditions are detected—green for oversold (ROC below the lower band) and red for overbought (ROC above the upper band), indicating potential reversal zones.
Strategy Performance Considerations
The use of Bollinger Bands in this strategy provides an adaptive framework that adjusts to changing market volatility. When volatility increases, the bands widen, allowing for larger price movements, while during quieter periods, the bands contract, reducing trade signals. This adaptiveness is critical in maintaining strategy effectiveness across different market conditions.
The strategy’s pyramiding setting is disabled (pyramiding=0), ensuring that only one position is taken at a time, which is a conservative risk management approach. Additionally, the strategy includes transaction costs and slippage parameters to account for real-world trading conditions.
Empirical Evidence and Relevance
The combination of momentum and mean reversion has been widely studied and shown to provide profitable opportunities under certain market conditions. Studies such as Jegadeesh and Titman (1993) confirm that momentum strategies tend to work well in trending markets, while mean reversion strategies have been effective during periods of high volatility or after sharp price movements (De Bondt & Thaler, 1985). By integrating both strategies into one system, the Adaptive Momentum Reversion Strategy may be able to capitalize on both trending and reverting market behavior.
Furthermore, research by Chan (1996) on momentum-based trading systems demonstrates that adaptive strategies, which adjust to changes in market volatility, often outperform static strategies, providing a compelling rationale for the use of Bollinger Bands in this context.
Conclusion
The Adaptive Momentum Reversion Strategy provides a robust framework for trading based on the dual concepts of momentum and mean reversion. By using ROC in combination with Bollinger Bands, the strategy is capable of identifying overbought and oversold conditions while adapting to changing market conditions. The use of adaptive indicators ensures that the strategy remains flexible and can perform across different market environments, potentially offering a competitive edge for traders who seek to balance risk and reward in their trading approaches.
References
Bollinger, J. (2002). Bollinger on Bollinger Bands. McGraw-Hill Professional.
Chan, L. K. C. (1996). Momentum, Mean Reversion, and the Cross-Section of Stock Returns. Journal of Finance, 51(5), 1681-1713.
De Bondt, W. F., & Thaler, R. H. (1985). Does the Stock Market Overreact? Journal of Finance, 40(3), 793-805.
Fama, E. F., & French, K. R. (1988). Permanent and Temporary Components of Stock Prices. Journal of Political Economy, 96(2), 246-273.
Jegadeesh, N., & Titman, S. (1993). Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency. Journal of Finance, 48(1), 65-91.
Poterba, J. M., & Summers, L. H. (1988). Mean Reversion in Stock Prices: Evidence and Implications. Journal of Financial Economics, 22(1), 27-59.
Wilder, J. W. (1978). New Concepts in Technical Trading Systems. Trend Research.
Divergence Finder (RSI/Price) Strategy with OptionsThis is a strategy using my other indicator: Divergence Finder (RSI/Price) with Options
Requested by a User.
INFO: you need to configure Strategy depending on the asset, timeframe, and your preference.
The default values are just here for testing !
You can preview the expected outcome directly in TradingView and try to find the best settings directly from it.
You can activate or desactivate Long or short.
Set a Stop and Take Profit.
You should be able to set alert directly from order executed, or from triggered Alert.
For more information you could check the Divergence Finder indicator directly.
Version 0.1
CELEBI KESISMEmerhaba. bu üründe sarı zemin kesişme güzel bir yükselişin habercisidir. saatlikte 100-300 değerleri güzel çalışır. 4 saatlikte en iyi sonucu verir ki bu da 8-45 ayarları ile güzel çalışır.
SCE ReversalsThis tool uses past market data to attempt to identify where changes in “memory” may occur to spot reversals. The Hurst Exponent was a big inspiration for this code. The main driver is identifying when past ranges expand and contract, leading to a change in direction. With the use of Sum of Squared Errors, users do not need to input anything.
Getting optimized parameters
// Define ranges for N and lkb
N_range = array.from(15, 20, 25, 30, 35, 40, 45, 50, 55, 60)
// Function to calculate SSE
sse_calc(_N) =>
x = math.pow(close - close , 2)
y = math.pow(close - close , 2) + math.pow(close, 2)
z = x / y
scaled_z = z * math.log(_N)
min_r = ta.lowest(scaled_z, _N)
max_r = ta.highest(scaled_z, _N)
norm_r = (scaled_z - min_r) / (max_r - min_r)
SMA = ta.sma(close, _N)
reversal_bullish = norm_r == 1.000 and norm_r < 0.90 and close < SMA and session.ismarket and barstate.isconfirmed
reversal_bearish = norm_r == 1.000 and norm_r < 0.90 and close > SMA and session.ismarket and barstate.isconfirmed
var float error = na
if reversal_bullish or reversal_bearish
error := math.pow(close - SMA, 2)
error
else
error := 999999999999999999999999999999999999999
error
error
var int N_opt = na
var float min_SSE = na
// Loop through ranges and calculate SSE
for N in N_range
sse = sse_calc(N)
if na(min_SSE) or sse < min_SSE
min_SSE := sse
N_opt := N
The N_range list encompasses every lookback value to check with. The sse_calc function accepts an individual element to then perform the calculation for Reversals. If there is a reversal, the error becomes how far away the close is from a moving average with that look back. Lowest error wins. That would be the look back used for the Reversals calculation.
Reversals calculation
// Calculating with optimized parameters
x_opt = math.pow(close - close , 2)
y_opt = math.pow(close - close , 2) + math.pow(close, 2)
z_opt = x_opt / y_opt
scaled_z_opt = z_opt * math.log(N_opt)
min_r_opt = ta.lowest(scaled_z_opt, N_opt)
max_r_opt = ta.highest(scaled_z_opt, N_opt)
norm_r_opt = (scaled_z_opt - min_r_opt) / (max_r_opt - min_r_opt)
SMA_opt = ta.sma(close, N_opt)
reversal_bullish_opt = norm_r_opt == 1.000 and norm_r_opt < 0.90 and close < SMA_opt and close > high and close > open and session.ismarket and barstate.isconfirmed
reversal_bearish_opt = norm_r_opt == 1.000 and norm_r_opt < 0.90 and close > SMA_opt and close < low and close < open and session.ismarket and barstate.isconfirmed
X_opt and y_opt are the compared values to develop the system. Everything done afterwards is scaling and using it to spot the Reversals. X_opt is the current close, minus the close with the optimal N bars back, squared. Then y_opt is also that but plus the current close squared. Z_opt is then x_opt / y_opt. This gives us a pretty small number that will go up when we approach tops or bottoms. To make life a little easier I normalize the value between 0 and 1.
After I find the moving average with the optimal N, I can check if there is a Reversal. Reversals are there when the last value is at 1 and the current value drops below 0.90. This would tell us that “memory” was strong and is now changing. To determine direction and help with accuracy, if the close is above the moving average it is a bearish alert, and vice versa. As well as the close must be below the last low for a bearish Reversal, above the last high for a bullish Reversal. Also the close must be above the open for a bullish Reversal, and below for a bearish one.
Visual examples
This NASDAQ:TSLA chart shows how alerts may come around. The bullish and bearish labels are plotted on the chart along with a reference line to see price interact with.
The indicator has the potential to be inactive, like we see here on $OKLO. There is only one alert, and it marks the bottom nicely.
Stocks with strong trends like NYSE:NOW may be more susceptible to false alerts. Assets that are volatile and bounce around a lot may be better.
It works on intra day charts the same as on Daily or longer charts. We see here on NASDAQ:QQQ it spotted the bottom on this particular trading day.
This tool is meant to aid traders in making decisions, not to be followed blindly. No trading tool is 100% accurate and Sum of Squared Errors does not guarantee the most optimal value. I encourage feedback and constructive criticism.
omkar patil Vortex Indicator//@version=5
strategy("Nifty Options Strategy", overlay=true)
// Input parameters
fastLength = input.int(9, title="Fast Moving Average Length")
slowLength = input.int(21, title="Slow Moving Average Length")
atrMultiplier = input.float(1.5, title="ATR Multiplier for Stop Loss")
riskPerTrade = input.float(1, title="Risk per Trade (%)", minval=0.1, maxval=100)
// Data for Nifty
nifty_close = close
// Moving averages
fastMA = ta.sma(nifty_close, fastLength)
slowMA = ta.sma(nifty_close, slowLength)
// Plot moving averages
plot(fastMA, color=color.blue, title="Fast MA")
plot(slowMA, color=color.red, title="Slow MA")
// Entry and Exit Conditions
longCondition = ta.crossover(fastMA, slowMA)
shortCondition = ta.crossunder(fastMA, slowMA)
// ATR for stop loss
atr = ta.atr(14)
longStopLoss = strategy.position_avg_price - (atr * atrMultiplier)
shortStopLoss = strategy.position_avg_price + (atr * atrMultiplier)
// Capital allocation
capital = strategy.equity
riskAmount = (capital * riskPerTrade) / 100
qty = riskAmount / atr
// Strategy Execution
if (longCondition)
strategy.entry("Buy Nifty", strategy.long, qty, comment="Long Entry")
RSI %20 Change HighlightBu gösterge rsı 26 v3 70 uzerini altını kestiğini gösterir
rsı da %20 kik ani degişimlerde mumları beyaza boyar
ema 50 ve 200
son tepe ve dibi gçsteren cizgi
momentum
rsı ve hisg
daha fazla geliştirilebilir
bol kazançlar fikirlerinizi yazarsınız
Simple Moving Average Cross StrategyCondiciones de compra:
Se ejecuta una compra cuando el precio cruza la SMA de abajo hacia arriba.
La barra correspondiente se colorea en verde.
Condiciones de venta:
Se ejecuta una venta cuando el precio cruza la SMA de arriba hacia abajo.
La barra correspondiente se colorea en rojo.
Visualización:
La SMA se grafica en color azul para facilitar la identificación de los cruces.
Simple Moving Average Cross StrategyCondiciones de compra:
Se ejecuta una compra cuando el precio cruza la SMA de abajo hacia arriba.
La barra correspondiente se colorea en verde.
Condiciones de venta:
Se ejecuta una venta cuando el precio cruza la SMA de arriba hacia abajo.
La barra correspondiente se colorea en rojo.
Visualización:
La SMA se grafica en color azul para facilitar la identificación de los cruces.
RSI %20 Change rsı ın yatay piyasa da hareket ederken anlık genişleme yapması durumun da bu da %20 dir beyAZ MUMLA BELİRTİR. RSI 70 ve 26 dını yuları kestiğin de bunları belirtir ve ema 50 ve 200 kullanılmıstır. fikirlerinizi merak ediyorum yorum yaparsanız sevinirim. bol lazançlar
Moving Average - VBVMoving Average VBV - with multiples lines with vertical shift
Médias Móveis VBV, com múltiplas linhas com deslocamento vertical.
Smart Money Concepts (Advanced)Inspired and initially based on LuxAlgo's Smart Money Concepts Indicator I created a library lib_smc that started to convert every function and return objects. This allowed certain customizations like tracking the current fill level of FVGs or tracking the creation of Order Blocks, by monitoring consecutive bars against the current trend.
This indicator is provided as is, based on, but probably not always be up to date with my lib_smc that I am using for my projects.
WARNING: This indicator shows EXPERIMENTAL Order Blocks that are tracked LIVE. Unlike usual Order Blocks these are not just based on the last confirmed Swing Point (formed 50 bars before) but on consecutive candles opposing an unconfirmed trend. Blocks are confirmed by price movements relative to the unconfirmed block and unconfirmed swing points. This means that some Order Blocks will appear on pullbacks, as well as reversals.
Features
Swing Points (HH / LH / HL / LL), indicating support / resistance zones price might reject off of or want to push through
Market Structure (BOS / ChoCh), indicates confirmation for a continued / changing trend
live Order Blocks (OB), see warning above.
Fair Value Gaps (FVG), optional from higher timeframes
Equal Highs / Lows (EQH/EQL), indicates strong support / resistance zones, especially when the bars forming it have long wicks toward that zone
using my lib_no_delay all moving averages are working from bar 0, so it can be used on charts with limited bars
SMA MTF Diff [Screener]Indicador que calcula y muestra la diferencia porcentual entre la SMA 200 en timeframe de 1 minuto y la SMA 50 en timeframe de 5 minutos.
Un valor positivo indica que la SMA 200 1m está por encima de la SMA 50 5m.
Ejemplo: Un valor de 5 significa que la SMA 200 1m está 5% por encima de la SMA 50 5m.
SMA MTF Difference %Indicador que calcula y muestra la diferencia porcentual entre la SMA 200 en timeframe de 1 minuto y la SMA 50 en timeframe de 5 minutos.
Un valor positivo indica que la SMA 200 1m está por encima de la SMA 50 5m.
Ejemplo: Un valor de 5 significa que la SMA 200 1m está 5% por encima de la SMA 50 5m.
TEY CandlesL'indicateur TEY Candles colore les bougies selon le momentum directionnel basé sur le DMI.
Vert : Momentum haussier.
Rouge : Momentum baissier.
Violet : Phase neutre, ralentissement de la volatilité, permettant ainsi de détecter les phases d'accumulation et de distribution.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The TEY Candles indicator colors the candles based on directional momentum derived from the DMI.
Green: Bullish momentum.
Red: Bearish momentum.
Purple: Neutral phase, indicating a slowdown in volatility, which helps identify accumulation and distribution phases.
Combined Market Structure Break & Order Block//@version=5
indicator("Combined Market Structure Break & Order Block", "MSB-OB", overlay=true, max_lines_count=500, max_bars_back=4900, max_boxes_count=500)
settings = "Settings"
zigzag_len = input.int(9, "ZigZag Length", group=settings)
show_zigzag = input.bool(true, "Show Zigzag", group=settings)
fib_factor = input.float(0.33, "Fib Factor for breakout confirmation", 0, 1, 0.01, group=settings)
text_size = input.string(size.tiny, "Text Size", , group=settings)
delete_boxes = input.bool(true, "Delete Old/Broken Boxes", group=settings)
// Colors and display settings for order blocks and breaker blocks
bu_ob_inline_color = "Bu-OB Colors"
be_ob_inline_color = "Be-OB Colors"
bu_bb_inline_color = "Bu-BB Colors"
be_bb_inline_color = "Be-BB Colors"
bu_ob_display_settings = "Bu-OB Display Settings"
bu_ob_color = input.color(color.new(color.green, 70), "Color", group=bu_ob_display_settings, inline=bu_ob_inline_color)
bu_ob_border_color = input.color(color.green, "Border Color", group=bu_ob_display_settings, inline=bu_ob_inline_color)
bu_ob_text_color = input.color(color.green, "Text Color", group=bu_ob_display_settings, inline=bu_ob_inline_color)
be_ob_display_settings = "Be-OB Display Settings"
be_ob_color = input.color(color.new(color.red, 70), "Color", group=be_ob_display_settings, inline=be_ob_inline_color)
be_ob_border_color = input.color(color.red, "Border Color", group=be_ob_display_settings, inline=be_ob_inline_color)
be_ob_text_color = input.color(color.red, "Text Color", group=be_ob_display_settings, inline=be_ob_inline_color)
bu_bb_display_settings = "Bu-BB & Bu-MB Display Settings"
bu_bb_color = input.color(color.new(color.green, 70), "Color", group=bu_bb_display_settings, inline=bu_bb_inline_color)
bu_bb_border_color = input.color(color.green, "Border Color", group=bu_bb_display_settings, inline=bu_bb_inline_color)
bu_bb_text_color = input.color(color.green, "Text Color", group=bu_bb_display_settings, inline=bu_bb_inline_color)
be_bb_display_settings = "Be-BB & Be-MB Display Settings"
be_bb_color = input.color(color.new(color.red, 70), "Color", group=be_bb_display_settings, inline=be_bb_inline_color)
be_bb_border_color = input.color(color.red, "Border Color", group=be_bb_display_settings, inline=be_bb_inline_color)
be_bb_text_color = input.color(color.red, "Text Color", group=be_bb_display_settings, inline=be_bb_inline_color)
// Arrays to store market points
var float high_points_arr = array.new_float(5)
var int high_index_arr = array.new_int(5)
var float low_points_arr = array.new_float(5)
var int low_index_arr = array.new_int(5)
var box bu_ob_boxes = array.new_box(5)
var box be_ob_boxes = array.new_box(5)
var box bu_bb_boxes = array.new_box(5)
var box be_bb_boxes = array.new_box(5)
// Trend determination and zigzag calculation
to_up = high >= ta.highest(zigzag_len)
to_down = low <= ta.lowest(zigzag_len)
trend = 1
trend := nz(trend , 1)
trend := trend == 1 and to_down ? -1 : trend == -1 and to_up ? 1 : trend
last_trend_up_since = ta.barssince(to_up )
low_val = ta.lowest(nz(last_trend_up_since > 0 ? last_trend_up_since : 1, 1))
low_index = bar_index - ta.barssince(low_val == low)
last_trend_down_since = ta.barssince(to_down )
high_val = ta.highest(nz(last_trend_down_since > 0 ? last_trend_down_since : 1, 1))
high_index = bar_index - ta.barssince(high_val == high)
// Functions
f_get_high(ind) =>
f_get_low(ind) =>
f_delete_box(box_arr) =>
if delete_boxes
box.delete(array.shift(box_arr))
else
array.shift(box_arr)
0
// Calculations and updates for market structure
= f_get_high(0)
= f_get_high(1)
= f_get_low(0)
= f_get_low(1)
// Show Zigzag
if ta.change(trend) != 0 and show_zigzag
if trend == 1
line.new(h0i, h0, l0i, l0)
if trend == -1
line.new(l0i, l0, h0i, h0)
// Main structure and alert logic
// ...
Gelişmiş Kırılım İndikatörü//@version=5
indicator("Gelişmiş Kırılım İndikatörü", overlay=true)
// Giriş parametreleri
uzunluk = input.int(50, title="Direnç/Destek Tespiti İçin Dönem", minval=1)
min_dokunma = input.int(3, title="Min. Dokunma Sayısı", minval=1)
direnc_renk = input.color(color.red, title="Direnç Rengi")
destek_renk = input.color(color.green, title="Destek Rengi")
// Direnç ve destek tespiti
en_yuksek = ta.highest(high, uzunluk)
en_dusuk = ta.lowest(low, uzunluk)
// Fiyatın bu seviyelere yakınlığı
direnc_dokunma = ta.valuewhen(high >= en_yuksek, 1, 0)
destek_dokunma = ta.valuewhen(low <= en_dusuk, 1, 0)
direnc_gecerli = direnc_dokunma >= min_dokunma
destek_gecerli = destek_dokunma >= min_dokunma
// Kırılım kontrolü
direnc_kirilimi = close > en_yuksek and direnc_gecerli
destek_kirilimi = close < en_dusuk and destek_gecerli
// Kırılım noktalarının gösterimi
plotshape(series=direnc_kirilimi, location=location.belowbar, color=direnc_renk, style=shape.labelup, text="Direnç Kırılımı")
plotshape(series=destek_kirilimi, location=location.abovebar, color=destek_renk, style=shape.labeldown, text="Destek Kırılımı")
// Direnç ve destek çizgileri
plot(direnc_gecerli ? en_yuksek : na, title="Direnç", color=direnc_renk, linewidth=2, style=plot.style_line)
plot(destek_gecerli ? en_dusuk : na, title="Destek", color=destek_renk, linewidth=2, style=plot.style_line)
Amiggggg - Price2rePrice with Heikin Ashi candles (Smoothethis script good for sell and buy
halesho bebar
this is changed rsi useful for 5 min chart
forex and crypto
EMA/SMA + Multi-Timeframe Dashboard (Vertical)20/50 ema and 200 sma
The EMA SMA Trading Indicator combines the power of Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) to help traders identify trends, reversals, and key entry/exit points.
Features:
Dual Moving Averages: Tracks both EMA and SMA to provide a balanced view of short-term and long-term market trends.
Customizable Periods: Allows users to set unique periods for EMA and SMA to suit their trading style and timeframe (e.g., day trading, swing trading, or investing).
Cross Alerts: Highlights EMA and SMA crossover points, which often indicate potential buy or sell signals.
Color-Coded Lines: Visual differentiation between EMA (dynamic and responsive) and SMA (smooth and lagging) for better readability.
Multi-Timeframe Compatibility: Suitable for scalping, intraday trading, and long-term analysis.
Usage:
Trend Confirmation: When the EMA is above the SMA, it signals a bullish trend; when it is below the SMA, it signals a bearish trend.
Crossover Strategy: Use crossovers as potential buy (EMA crosses above SMA) or sell (EMA crosses below SMA) signals.
Dynamic Support/Resistance: EMA can act as short-term support/resistance, while SMA represents long-term levels.
This indicator is perfect for traders who want to combine EMA's speed with SMA's stability for improved decision-making in volatile markets. Customizable alerts and visual cues make it user-friendly for beginners and experienced traders.
Make informed decisions and take your trading to the next level with the EMA SMA Trading Indicator!