AdibXmos// © AdibXmos
//@version=5
indicator('Sood Indicator V2 ', overlay=true, max_labels_count=500)
show_tp_sl = input.bool(true, 'Display TP & SL', group='Techical', tooltip='Display the exact TP & SL price levels for BUY & SELL signals.')
rrr = input.string('1:2', 'Risk to Reward Ratio', group='Techical', options= , tooltip='Set a risk to reward ratio (RRR).')
tp_sl_multi = input.float(1, 'TP & SL Multiplier', 1, group='Techical', tooltip='Multiplies both TP and SL by a chosen index. Higher - higher risk.')
tp_sl_prec = input.int(2, 'TP & SL Precision', 0, group='Techical')
candle_stability_index_param = 0.5
rsi_index_param = 70
candle_delta_length_param = 4
disable_repeating_signals_param = input.bool(true, 'Disable Repeating Signals', group='Techical', tooltip='Removes repeating signals. Useful for removing clusters of signals and general clarity.')
GREEN = color.rgb(29, 255, 40)
RED = color.rgb(255, 0, 0)
TRANSPARENT = color.rgb(0, 0, 0, 100)
label_size = input.string('huge', 'Label Size', options= , group='Cosmetic')
label_style = input.string('text bubble', 'Label Style', , group='Cosmetic')
buy_label_color = input(GREEN, 'BUY Label Color', inline='Highlight', group='Cosmetic')
sell_label_color = input(RED, 'SELL Label Color', inline='Highlight', group='Cosmetic')
label_text_color = input(color.white, 'Label Text Color', inline='Highlight', group='Cosmetic')
stable_candle = math.abs(close - open) / ta.tr > candle_stability_index_param
rsi = ta.rsi(close, 14)
atr = ta.atr(14)
bullish_engulfing = close < open and close > open and close > open
rsi_below = rsi < rsi_index_param
decrease_over = close < close
var last_signal = ''
var tp = 0.
var sl = 0.
bull_state = bullish_engulfing and stable_candle and rsi_below and decrease_over and barstate.isconfirmed
bull = bull_state and (disable_repeating_signals_param ? (last_signal != 'buy' ? true : na) : true)
bearish_engulfing = close > open and close < open and close < open
rsi_above = rsi > 100 - rsi_index_param
increase_over = close > close
bear_state = bearish_engulfing and stable_candle and rsi_above and increase_over and barstate.isconfirmed
bear = bear_state and (disable_repeating_signals_param ? (last_signal != 'sell' ? true : na) : true)
round_up(number, decimals) =>
factor = math.pow(10, decimals)
math.ceil(number * factor) / factor
if bull
last_signal := 'buy'
dist = atr * tp_sl_multi
tp_dist = rrr == '2:3' ? dist / 2 * 3 : rrr == '1:2' ? dist * 2 : rrr == '1:4' ? dist * 4 : dist
tp := round_up(close + tp_dist, tp_sl_prec)
sl := round_up(close - dist, tp_sl_prec)
if label_style == 'text bubble'
label.new(bar_index, low, 'BUY', color=buy_label_color, style=label.style_label_up, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bar_index, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_triangleup, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bar_index, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_arrowup, textcolor=TRANSPARENT, size=label_size)
label.new(show_tp_sl ? bar_index : na, low, 'TP: ' + str.tostring(tp) + ' SL: ' + str.tostring(sl), yloc=yloc.price, color=color.gray, style=label.style_label_down, textcolor=label_text_color)
if bear
last_signal := 'sell'
dist = atr * tp_sl_multi
tp_dist = rrr == '2:3' ? dist / 2 * 3 : rrr == '1:2' ? dist * 2 : rrr == '1:4' ? dist * 4 : dist
tp := round_up(close - tp_dist, tp_sl_prec)
sl := round_up(close + dist, tp_sl_prec)
if label_style == 'text bubble'
label.new(bear ? bar_index : na, high, 'SELL', color=sell_label_color, style=label.style_label_down, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_triangledown, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_arrowdown, textcolor=TRANSPARENT, size=label_size)
label.new(show_tp_sl ? bar_index : na, low, 'TP: ' + str.tostring(tp) + ' SL: ' + str.tostring(sl), yloc=yloc.price, color=color.gray, style=label.style_label_up, textcolor=label_text_color)
alertcondition(bull or bear, 'BUY & SELL Signals', 'New signal!')
alertcondition(bull, 'BUY Signals (Only)', 'New signal: BUY')
alertcondition(bear, 'SELL Signals (Only)', 'New signal: SELL')
广量指标
Dynamic Support Resistance Strategy @tradingbauhausDynamic Support Resistance Strategy @tradingbauhaus
This script is designed to identify dynamic support and resistance levels on a trading chart based on pivots (highs and lows) detected over a specific period. It also includes a basic strategy logic to generate entry signals when the price breaks these support or resistance levels. Below is a step-by-step explanation of how it works:
How the Script Works:
Pivot Detection:
The script identifies pivots (highs and lows) using the pivothigh and pivotlow functions.
The period for detecting pivots is configurable (Pivot Period).
The source for pivots can be either High/Low (highs and lows) or Close/Open (close and open), depending on user selection.
Creation of Support and Resistance Channels:
The detected pivots are used to create dynamic support and resistance channels.
The maximum channel width is defined as a percentage (Maximum Channel Width %) of the price range over a 300-bar period.
Only channels containing a minimum number of pivots (Minimum Strength) are considered valid.
Visualization of Channels:
Support and resistance channels are plotted on the chart as shaded areas.
Channel colors are customizable:
Resistance: Red.
Support: Blue.
Channel (price inside): Gray.
Optionally, the detected pivots can be displayed on the chart.
Breakout Detection:
The script checks if the price breaks a support or resistance level.
If the price breaks a resistance level, a buy signal is generated.
If the price breaks a support level, a sell signal is generated.
Breakouts are visually marked with triangles (optional) and trigger alerts.
Moving Averages (Optional):
The script allows displaying two moving averages (SMA or EMA) with configurable periods.
These moving averages can be used as additional reference tools for analysis.
Strategy Logic:
When the price breaks a resistance level, the script enters a long position.
When the price breaks a support level, the script enters a short position.
Script Workflow:
Pivot Identification:
The script searches for highs and lows on the chart based on the configurable period.
These pivots are stored in arrays for later use.
Channel Creation:
For each pivot, the script calculates a support/resistance channel, ensuring it meets the maximum width and minimum pivot requirements.
Valid channels are stored and sorted by "strength" (number of included pivots).
Visualization:
Channels are plotted on the chart as shaded areas using the configured colors.
If enabled, pivots are marked on the chart with labels.
Breakout Detection:
The script checks if the price has broken a support or resistance level on the current bar.
If a breakout is detected, a signal is generated and optionally marked on the chart.
Strategy:
If the price breaks a resistance level, a buy signal is triggered.
If the price breaks a support level, a sell signal is triggered.
User Configuration:
The script allows customization of several parameters to adapt it to different trading styles and assets:
Pivot Period: Period for detecting pivots.
Source: Source for pivots (High/Low or Close/Open).
Maximum Channel Width %: Maximum channel width as a percentage of the price range.
Minimum Strength: Minimum number of pivots required to form a channel.
Maximum Number of S/R: Maximum number of channels to display.
Loopback Period: Lookback period for detecting pivots.
Colors: Customization of colors for resistance, support, and channel.
Extras: Options to display pivots, breakouts, and moving averages.
Example Use Case:
Chart Analysis:
On a daily chart, the script identifies key support and resistance levels based on pivots from the last 10 candles.
Channels are plotted as shaded areas, providing a clear visualization of key zones.
Breakout Trading:
If the price breaks a resistance level, the script generates a buy signal.
If the price breaks a support level, the script generates a sell signal.
Moving Averages:
If moving averages are enabled, they can be used as additional confirmation for signals.
Conclusion:
This script is a powerful tool for traders looking to identify dynamic support and resistance levels and capitalize on breakouts as trading signals. Its flexibility and customization make it suitable for a variety of assets and timeframes.
FİBO#0"yatırım tavsiyesi değildir"
fibonacci seviyelerini otomatik olarak bulan bir hazır paket indikatördür.Geliştimelere devam edilecektir.
Bitnode Market Sentiment IndicatorThe Bitnod Market Sentiment Indicator leverages volume analysis and price action to detect significant market movements, providing buy and sell signals based on large volume spikes and price trends. Ideal for traders looking to capture market psychology and spot accumulation or distribution phases, this indicator combines trend-following and volume-based signals to highlight key entry and exit points.
5분봉 레버리지 20배 자동매매 전략 (최종)//@version=5
indicator("5분봉 레버리지 20배 자동매매 전략 (최종)", overlay=true)
// === PARAMETERS ===
// RSI
rsiPeriod = input.int(14, title="RSI Period", minval=1)
overbought = input.float(70.0, title="RSI Overbought Level", step=0.1)
oversold = input.float(30.0, title="RSI Oversold Level", step=0.1)
// 이동평균선
smaShort = input.int(50, title="Short SMA Length", minval=1)
smaLong = input.int(200, title="Long SMA Length", minval=1)
// 리스크 관리
takeProfit = input.float(3.0, title="Take Profit %", step=0.1)
stopLoss = input.float(1.0, title="Stop Loss %", step=0.1)
// === INDICATORS ===
// RSI
rsiValue = ta.rsi(close, rsiPeriod)
// 이동평균선
smaShortValue = ta.sma(close, smaShort)
smaLongValue = ta.sma(close, smaLong)
// MACD
= ta.macd(close, 12, 26, 9)
// 볼린저 밴드
= ta.bb(close, 20, 2)
// 프랙탈
bullishFractal = ta.pivotlow(low, 2, 2) // 하락 프랙탈
bearishFractal = ta.pivothigh(high, 2, 2) // 상승 프랙탈
// 엘리어트 파동 (간단한 패턴 분석)
wave1 = (rsiValue < oversold) and (smaShortValue > smaLongValue) and (macdLine > signalLine)
wave3 = (rsiValue > oversold) and (macdLine > signalLine) and (close > upperBB)
wave5 = (rsiValue > 70) and (macdLine < signalLine) and (close > smaLongValue)
waveA = (rsiValue > overbought) and (macdLine < signalLine) and (close < smaShortValue)
waveC = (rsiValue < 30) and (macdLine > signalLine) and (close < lowerBB)
// === LONG ENTRY CONDITION ===
longCondition = (rsiValue < oversold) and (smaShortValue > smaLongValue) and (macdLine > signalLine) and (close <= lowerBB) and not na(bullishFractal) and (wave1 or wave5)
// === SHORT ENTRY CONDITION ===
shortCondition = (rsiValue > overbought) and (smaShortValue < smaLongValue) and (macdLine < signalLine) and (close >= upperBB) and not na(bearishFractal) and (waveA or waveC)
// === ALERTS ===
if (longCondition)
alert("LONG_SIGNAL", alert.freq_once_per_bar)
if (shortCondition)
alert("SHORT_SIGNAL", alert.freq_once_per_bar)
// === VISUAL INDICATORS ===
// 이동평균선
plot(smaShortValue, title="SMA 50", color=color.blue)
plot(smaLongValue, title="SMA 200", color=color.red)
// 볼린저 밴드
plot(upperBB, title="Upper BB", color=color.green)
plot(lowerBB, title="Lower BB", color=color.red)
// RSI 레벨
hline(overbought, "RSI Overbought", color=color.red)
hline(oversold, "RSI Oversold", color=color.green)
plot(rsiValue, title="RSI", color=color.purple)
// 프랙탈 표시
plotshape(not na(bullishFractal), title="Bullish Fractal", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, text="Bull")
plotshape(not na(bearishFractal), title="Bearish Fractal", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, text="Bear")
// ENTRY POINT 표시
var float lastLongEntry = na
var float lastShortEntry = na
if (longCondition)
lastLongEntry := close
if (shortCondition)
lastShortEntry := close
plotshape(not na(lastLongEntry), title="Long Entry Point", style=shape.labelup, location=location.belowbar, color=color.green, text="LONG")
plotshape(not na(lastShortEntry), title="Short Entry Point", style=shape.labeldown, location=location.abovebar, color=color.red, text="SHORT")
5분봉 자동매매 전략 (최적화: 안정화)//@version=5
strategy("5분봉 자동매매 전략 (최적화: 안정화)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === PARAMETERS ===
// RSI
rsiPeriod = input.int(14, title="RSI Period", minval=1)
overbought = input.float(70.0, title="RSI Overbought Level", step=0.1)
oversold = input.float(30.0, title="RSI Oversold Level", step=0.1)
// 이동평균선
smaShort = input.int(50, title="Short SMA Length", minval=1)
smaLong = input.int(200, title="Long SMA Length", minval=1)
// 거래량 필터
volumeThreshold = input.float(1.2, title="Volume Multiplier", step=0.1)
// 리스크 관리
takeProfit = input.float(3.0, title="Take Profit %", step=0.1)
stopLoss = input.float(1.0, title="Stop Loss %", step=0.1)
trailOffset = input.float(0.5, title="Trailing Stop Offset (Points)", step=0.1)
// === INDICATORS ===
rsiValue = ta.rsi(close, rsiPeriod)
smaShortValue = ta.sma(close, smaShort)
smaLongValue = ta.sma(close, smaLong)
= ta.macd(close, 12, 26, 9)
= ta.bb(close, 20, 2)
avgVolume = ta.sma(volume, 20)
// 상위 시간대 RSI 필터
higherRSI = request.security(syminfo.tickerid, "15", ta.rsi(close, rsiPeriod), lookahead=barmerge.lookahead_on)
// === LONG ENTRY CONDITION ===
longCondition = (rsiValue < oversold) and
(smaShortValue > smaLongValue) and
(macdLine > signalLine) and
(close <= lowerBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI < 50)
// === SHORT ENTRY CONDITION ===
shortCondition = (rsiValue > overbought) and
(smaShortValue < smaLongValue) and
(macdLine < signalLine) and
(close >= upperBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI > 50)
// === POSITIONS ===
if (longCondition and strategy.position_size == 0)
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", stop=strategy.position_avg_price * (1 - stopLoss / 100), limit=strategy.position_avg_price * (1 + takeProfit / 100), trail_points=trailOffset)
if (shortCondition and strategy.position_size == 0)
strategy.entry("Short", strategy.short)
strategy.exit("Short Exit", stop=strategy.position_avg_price * (1 + stopLoss / 100), limit=strategy.position_avg_price * (1 - takeProfit / 100), trail_points=trailOffset)
// === 손절 신호 표시 ===
var bool stopLongShown = false
var bool stopShortShown = false
if (strategy.position_size > 0 and close <= strategy.position_avg_price * (1 - stopLoss / 100) and not stopLongShown)
label.new(bar_index, close, text="STOP_LONG", color=color.red, style=label.style_label_down, textcolor=color.white)
stopLongShown := true
if (strategy.position_size < 0 and close >= strategy.position_avg_price * (1 + stopLoss / 100) and not stopShortShown)
label.new(bar_index, close, text="STOP_SHORT", color=color.red, style=label.style_label_up, textcolor=color.white)
stopShortShown := true
if (strategy.position_size == 0)
stopLongShown := false
stopShortShown := false
// === VISUAL INDICATORS ===
plot(smaShortValue, title="SMA 50", color=color.blue)
plot(smaLongValue, title="SMA 200", color=color.red)
plot(upperBB, title="Upper BB", color=color.green)
plot(lowerBB, title="Lower BB", color=color.red)
plot(rsiValue, title="RSI", color=color.purple)
plot(longCondition ? close : na, title="Long Signal", style=plot.style_cross, color=color.green, linewidth=2)
plot(shortCondition ? close : na, title="Short Signal", style=plot.style_cross, color=color.red, linewidth=2)
Custom OHLC Levelshgjfkjfhkhjkg hklgujk,ghkghk,l,l;g,hgikghulhujlguilgiulllgyuklhvkgyuhkuhkyukyukygukygukyukygukygukyugkyukyukyukyukyukuykyuk
towards the candlesمرحبا يا متداولين
. تعريف الموجات:
تم تعريف أربعة متغيرات تمثل القيم العليا والدنيا لأربع موجات مختلفة باستخدام دوال مثل ta.highest و ta.lowest.
تم تعريف أربعة متغيرات تمثل القيم العليا والدنيا لأربع موجات مختلفة باستخدام دوال مثل ta.highest و ta.lowest.
wave1: يمثل أعلى قمة في الـ 10 شموع الأخيرة.
wave2: يمثل أدنى قاع في الـ 10 شموع الأخيرة.
wave3: يمثل أعلى قمة في الـ 5 شموع الأخيرة.
wave4: يمثل أدنى قاع في الـ 5 شموع الأخيرة.
wave1: يتم رسمه باللون الأحمر.
wave2: يتم رسمه باللون الأخضر.
wave3: يتم رسمه باللون الداكن.
wave4: يتم رسمه باللون البرتقالي.
linewidth=2: تعني أن سماكة الخط ستكون 2.
title: هذا هو الاسم الذي سيظهر بجانب كل موجة.
تخصيص الخلفية:
هذه الوظيفة تغير لون الخلفية إلى الأسود لكي تبرز الموجات بشكل أفضل على الرسم البياني.
الخلاصة:
الكود يقوم بتحديد ورسم أربع "موجات" تعتمد على أعلى وأدنى الأسعار للشموع في فترات زمنية محددة. يتم رسم هذه الموجات بألوان مختلفة، مع خلفية سوداء لتحسين الرؤية والوضوح.
Cyber dataRSI on 4 TF
MA of RSI (14) below or above current RSI value
SuperTrend conditions
HMA60 Below or above price
Current volatility 14-peroid
Make your own customization with colors
Volume-Based RSI Color Indicator with MAsThis is not a typical RSI indicator; it is a unique variation that integrates volume analysis and moving averages (MAs) for the RSI. Here's how it stands out:
Volume-Based Color Coding: The RSI line changes color based on it's level
(overbought/oversold) and volume conditions. For example:
Red: RSI is overbought, and volume is significantly higher than average.
Green: RSI is oversold, and volume is significantly higher than average.
Blue: Default color for other scenarios.
RSI Moving Averages: it includes long-period (200) and short-period (20) moving averages of
the RSI, calculated using SMA or EMA, based on user preference. this adds a trend-
following component to the RSI analysis.
Customization Options: The script allows users to adjust parameters like RSI length,
overbought/oversold levels, high-volume multiplier, and MA type lengths.
These enhancements make the indicator more dynamic and tailored for traders looking to incorporate both momentum and volume trends into their strategy.
5분봉 자동매매 전략 (최적화: 안정화)//@version=5
strategy("5분봉 자동매매 전략 (최적화: 안정화)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === PARAMETERS ===
// RSI
rsiPeriod = input.int(14, title="RSI Period", minval=1)
overbought = input.float(70.0, title="RSI Overbought Level", step=0.1)
oversold = input.float(30.0, title="RSI Oversold Level", step=0.1)
// 이동평균선
smaShort = input.int(50, title="Short SMA Length", minval=1)
smaLong = input.int(200, title="Long SMA Length", minval=1)
// 거래량 필터
volumeThreshold = input.float(1.2, title="Volume Multiplier", step=0.1)
// 리스크 관리
takeProfit = input.float(3.0, title="Take Profit %", step=0.1)
stopLoss = input.float(1.0, title="Stop Loss %", step=0.1)
trailOffset = input.float(0.5, title="Trailing Stop Offset (Points)", step=0.1)
// === INDICATORS ===
rsiValue = ta.rsi(close, rsiPeriod)
smaShortValue = ta.sma(close, smaShort)
smaLongValue = ta.sma(close, smaLong)
= ta.macd(close, 12, 26, 9)
= ta.bb(close, 20, 2)
avgVolume = ta.sma(volume, 20)
// 상위 시간대 RSI 필터
higherRSI = request.security(syminfo.tickerid, "15", ta.rsi(close, rsiPeriod), lookahead=barmerge.lookahead_on)
// === LONG ENTRY CONDITION ===
longCondition = (rsiValue < oversold) and
(smaShortValue > smaLongValue) and
(macdLine > signalLine) and
(close <= lowerBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI < 50)
// === SHORT ENTRY CONDITION ===
shortCondition = (rsiValue > overbought) and
(smaShortValue < smaLongValue) and
(macdLine < signalLine) and
(close >= upperBB) and
(volume > avgVolume * volumeThreshold) and
(higherRSI > 50)
// === POSITIONS ===
if (longCondition and strategy.position_size == 0)
strategy.entry("Long", strategy.long)
strategy.exit("Long Exit", stop=strategy.position_avg_price * (1 - stopLoss / 100), limit=strategy.position_avg_price * (1 + takeProfit / 100), trail_points=trailOffset)
if (shortCondition and strategy.position_size == 0)
strategy.entry("Short", strategy.short)
strategy.exit("Short Exit", stop=strategy.position_avg_price * (1 + stopLoss / 100), limit=strategy.position_avg_price * (1 - takeProfit / 100), trail_points=trailOffset)
// === 손절 신호 표시 ===
var bool stopLongShown = false
var bool stopShortShown = false
if (strategy.position_size > 0 and close <= strategy.position_avg_price * (1 - stopLoss / 100) and not stopLongShown)
label.new(bar_index, close, text="STOP_LONG", color=color.red, style=label.style_label_down, textcolor=color.white)
stopLongShown := true
if (strategy.position_size < 0 and close >= strategy.position_avg_price * (1 + stopLoss / 100) and not stopShortShown)
label.new(bar_index, close, text="STOP_SHORT", color=color.red, style=label.style_label_up, textcolor=color.white)
stopShortShown := true
if (strategy.position_size == 0)
stopLongShown := false
stopShortShown := false
// === VISUAL INDICATORS ===
plot(smaShortValue, title="SMA 50", color=color.blue)
plot(smaLongValue, title="SMA 200", color=color.red)
plot(upperBB, title="Upper BB", color=color.green)
plot(lowerBB, title="Lower BB", color=color.red)
plot(rsiValue, title="RSI", color=color.purple)
plot(longCondition ? close : na, title="Long Signal", style=plot.style_cross, color=color.green, linewidth=2)
plot(shortCondition ? close : na, title="Short Signal", style=plot.style_cross, color=color.red, linewidth=2)
5분봉 레버리지 20배 자동매매 전략 (최종)//@version=5
indicator("5분봉 레버리지 20배 자동매매 전략 (최종)", overlay=true)
// === PARAMETERS ===
// RSI
rsiPeriod = input.int(14, title="RSI Period", minval=1)
overbought = input.float(70.0, title="RSI Overbought Level", step=0.1)
oversold = input.float(30.0, title="RSI Oversold Level", step=0.1)
// 이동평균선
smaShort = input.int(50, title="Short SMA Length", minval=1)
smaLong = input.int(200, title="Long SMA Length", minval=1)
// 리스크 관리
takeProfit = input.float(3.0, title="Take Profit %", step=0.1)
stopLoss = input.float(1.0, title="Stop Loss %", step=0.1)
// === INDICATORS ===
// RSI
rsiValue = ta.rsi(close, rsiPeriod)
// 이동평균선
smaShortValue = ta.sma(close, smaShort)
smaLongValue = ta.sma(close, smaLong)
// MACD
= ta.macd(close, 12, 26, 9)
// 볼린저 밴드
= ta.bb(close, 20, 2)
// 프랙탈
bullishFractal = ta.pivotlow(low, 2, 2) // 하락 프랙탈
bearishFractal = ta.pivothigh(high, 2, 2) // 상승 프랙탈
// 엘리어트 파동 (간단한 패턴 분석)
wave1 = (rsiValue < oversold) and (smaShortValue > smaLongValue) and (macdLine > signalLine)
wave3 = (rsiValue > oversold) and (macdLine > signalLine) and (close > upperBB)
wave5 = (rsiValue > 70) and (macdLine < signalLine) and (close > smaLongValue)
waveA = (rsiValue > overbought) and (macdLine < signalLine) and (close < smaShortValue)
waveC = (rsiValue < 30) and (macdLine > signalLine) and (close < lowerBB)
// === LONG ENTRY CONDITION ===
longCondition = (rsiValue < oversold) and (smaShortValue > smaLongValue) and (macdLine > signalLine) and (close <= lowerBB) and not na(bullishFractal) and (wave1 or wave5)
// === SHORT ENTRY CONDITION ===
shortCondition = (rsiValue > overbought) and (smaShortValue < smaLongValue) and (macdLine < signalLine) and (close >= upperBB) and not na(bearishFractal) and (waveA or waveC)
// === ALERTS ===
if (longCondition)
alert("LONG_SIGNAL", alert.freq_once_per_bar)
if (shortCondition)
alert("SHORT_SIGNAL", alert.freq_once_per_bar)
// === VISUAL INDICATORS ===
// 이동평균선
plot(smaShortValue, title="SMA 50", color=color.blue)
plot(smaLongValue, title="SMA 200", color=color.red)
// 볼린저 밴드
plot(upperBB, title="Upper BB", color=color.green)
plot(lowerBB, title="Lower BB", color=color.red)
// RSI 레벨
hline(overbought, "RSI Overbought", color=color.red)
hline(oversold, "RSI Oversold", color=color.green)
plot(rsiValue, title="RSI", color=color.purple)
// 프랙탈 표시
plotshape(not na(bullishFractal), title="Bullish Fractal", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, text="Bull")
plotshape(not na(bearishFractal), title="Bearish Fractal", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, text="Bear")
// ENTRY POINT 표시
var float lastLongEntry = na
var float lastShortEntry = na
if (longCondition)
lastLongEntry := close
if (shortCondition)
lastShortEntry := close
plotshape(not na(lastLongEntry), title="Long Entry Point", style=shape.labelup, location=location.belowbar, color=color.green, text="LONG")
plotshape(not na(lastShortEntry), title="Short Entry Point", style=shape.labeldown, location=location.abovebar, color=color.red, text="SHORT")
Cyber dataRSI on 4 TF
MA of RSI (14) below or above current RSI value
SuperTrend conditions
HMA60 Below or above price
Current volatility 14-peroid
Make your own customization with colors
EMA & RSI Buy/Sell Signalsbuy and sell signal for ema and rsi signals. has buy and sell signals for the perfect trade.
HOD/LOD/PMH/PML/PDH/PDL Strategy by @tradingbauhaus This script is a trading strategy @tradingbauhaus designed to trade based on key price levels, such as the High of Day (HOD), Low of Day (LOD), Premarket High (PMH), Premarket Low (PML), Previous Day High (PDH), and Previous Day Low (PDL). Below, I’ll explain in detail what the script does:
Core Functionality of the Script:
Calculates Key Price Levels:
HOD (High of Day): The highest price of the current day.
LOD (Low of Day): The lowest price of the current day.
PMH (Premarket High): The highest price during the premarket session (before the market opens).
PML (Premarket Low): The lowest price during the premarket session.
PDH (Previous Day High): The highest price of the previous day.
PDL (Previous Day Low): The lowest price of the previous day.
Draws Horizontal Lines on the Chart:
Plots horizontal lines on the chart for each key level (HOD, LOD, PMH, PML, PDH, PDL) with specific colors for easy visual identification.
Defines Entry and Exit Rules:
Long Entry (Buy): If the price crosses above the PMH (Premarket High) or the PDH (Previous Day High).
Short Entry (Sell): If the price crosses below the PML (Premarket Low) or the PDL (Previous Day Low).
Long Exit: If the price reaches the HOD (High of Day) during a long position.
Short Exit: If the price reaches the LOD (Low of Day) during a short position.
How the Script Works Step by Step:
Calculates Key Levels:
Uses the request.security function to fetch the HOD and LOD of the current day, as well as the highs and lows of the previous day (PDH and PDL).
Calculates the PMH and PML during the premarket session (before 9:30 AM).
Plots Levels on the Chart:
Uses the plot function to draw horizontal lines on the chart representing the key levels (HOD, LOD, PMH, PML, PDH, PDL).
Each level has a specific color for easy identification:
HOD: White.
LOD: Purple.
PDH: Orange.
PDL: Blue.
PMH: Green.
PML: Red.
Defines Trading Rules:
Uses conditions with ta.crossover and ta.crossunder to detect when the price crosses key levels.
Long Entry: If the price crosses above the PMH or PDH, a long position (buy) is opened.
Short Entry: If the price crosses below the PML or PDL, a short position (sell) is opened.
Long Exit: If the price reaches the HOD during a long position, the position is closed.
Short Exit: If the price reaches the LOD during a short position, the position is closed.
Executes Orders Automatically:
Uses the strategy.entry and strategy.close functions to open and close positions automatically based on the defined rules.
Advantages of This Strategy:
Based on Key Levels: Uses important price levels that often act as support and resistance.
Easy to Visualize: Horizontal lines on the chart make it easy to identify levels.
Automated: Entries and exits are executed automatically based on the defined rules.
Limitations of This Strategy:
Dependent on Volatility: Works best in markets with significant price movements.
False Crosses: There may be false crosses that generate incorrect signals.
No Advanced Risk Management: Does not include dynamic stop-loss or take-profit mechanisms.
How to Improve the Strategy:
Add Stop-Loss and Take-Profit: To limit losses and lock in profits.
Filter Signals with Indicators: Use RSI, MACD, or other indicators to confirm signals.
Optimize Levels: Adjust key levels based on the asset’s behavior.
In summary, this script is a trading strategy that operates based on key price levels, such as HOD, LOD, PMH, PML, PDH, and PDL. It is useful for traders who want to trade based on significant support and resistance levels.
Reversal Candlestick Strategy by @tradingbauhausReversal Candlestick Strategy by @tradingbauhaus
This strategy is designed to identify candlestick reversal patterns in the market, confirm them with a trend filter, and execute trades with dynamic risk management. Here’s a detailed explanation of how it works step by step:
1. Identify Candlestick Reversal Patterns
The strategy looks for specific candlestick patterns that indicate potential reversals in price direction. These patterns are divided into bullish (indicating a potential upward reversal) and bearish (indicating a potential downward reversal).
Bullish Patterns:
Hammer: A candle with a small body and a long lower shadow, appearing in a downtrend.
Inverted Hammer: A candle with a small body and a long upper shadow, appearing in a downtrend.
Bullish Engulfing: A two-candle pattern where the second candle (bullish) completely engulfs the body of the first candle (bearish).
Tweezer Bottom: Two candles with equal lows, where the first is bearish and the second is bullish.
Bearish Patterns:
Shooting Star: A candle with a small body and a long upper shadow, appearing in an uptrend.
Hanging Man: A candle with a small body and a long lower shadow, appearing in an uptrend.
Bearish Engulfing: A two-candle pattern where the second candle (bearish) completely engulfs the body of the first candle (bullish).
Tweezer Top: Two candles with equal highs, where the first is bullish and the second is bearish.
2. Apply Trend Filters
To ensure the patterns occur in the context of a strong trend, the strategy uses a trend filter based on the Stochastic RSI. This helps confirm whether the market is overbought or oversold, increasing the reliability of the signals.
Bullish Condition: The Stochastic RSI is above a threshold (e.g., 80), indicating the market is overbought and a reversal to the downside is likely.
Bearish Condition: The Stochastic RSI is below a threshold (e.g., 20), indicating the market is oversold and a reversal to the upside is likely.
3. Dynamic Risk Management
The strategy uses the Average True Range (ATR) to calculate dynamic stop loss and take profit levels. This ensures that the risk management adapts to the current market volatility.
Take Profit: Calculated as a multiple of the ATR (e.g., 1.5x) above the entry price for long trades or below the entry price for short trades.
Stop Loss: Calculated as a multiple of the ATR (e.g., 1.0x) below the entry price for long trades or above the entry price for short trades.
4. Execute Trades
The strategy executes trades based on the detected patterns and confirmed trend conditions.
Bullish Trades (Buy):
When a bullish pattern (e.g., Hammer, Bullish Engulfing) is detected and the trend filter confirms a potential upward reversal, the strategy enters a long position.
The trade is closed when the price reaches either the take profit or stop loss level.
Bearish Trades (Sell):
When a bearish pattern (e.g., Shooting Star, Bearish Engulfing) is detected and the trend filter confirms a potential downward reversal, the strategy enters a short position.
The trade is closed when the price reaches either the take profit or stop loss level.
5. Visualize Patterns on the Chart
The strategy adds labels to the chart to mark where the patterns are detected:
Green Labels: Bullish patterns (e.g., Hammer, Bullish Engulfing).
Red Labels: Bearish patterns (e.g., Shooting Star, Bearish Engulfing).
This helps traders visually identify the signals generated by the strategy.
6. Example Workflow
Market Condition: The market is in a downtrend, and the Stochastic RSI is below 20 (oversold).
Pattern Detection: A Hammer pattern is detected.
Trend Filter Confirmation: The Stochastic RSI confirms the market is oversold, increasing the likelihood of a reversal.
Trade Execution: The strategy enters a long position.
Risk Management: The trade is protected by a stop loss and take profit calculated using the ATR.
Exit: The trade is closed when the price reaches either the take profit or stop loss level.
Advantages of the Strategy
Reliable Patterns: Uses well-known candlestick patterns that are widely recognized in technical analysis.
Trend Confirmation: Adds a trend filter to reduce false signals and increase accuracy.
Dynamic Risk Management: Adapts to market volatility using the ATR for stop loss and take profit levels.
Visualization: Provides clear labels on the chart for easy identification of patterns.
Considerations
False Signals: Like any strategy, it may generate false signals in sideways or choppy markets.
Optimization: Parameters (e.g., ATR multipliers, RSI thresholds) should be optimized for specific assets and timeframes.
Backtesting: Always test the strategy on historical data before using it in live trading.
Conclusion
Reversal Candlestick Strategy by @tradingbauhaus is a systematic approach to trading reversals using candlestick patterns, trend filters, and dynamic risk management. It is designed to identify high-probability setups and manage risk effectively, making it a valuable tool for traders looking to capitalize on market reversals.
Scalping Indicatorٹریڈنگ ویو پر آپ کے بتائے گئے ریکوائرمنٹس کے مطابق ایک انڈیکیٹر بنانے کے لیے، ہم پائن اسکرپٹ (Pine Script) استعمال کریں گے۔ آپ کا مقصد یہ ہے کہ جب مارکیٹ میں کرش ہو، تو 5 منٹ، 3 منٹ اور 15 منٹ کی ایکسپونینشل موونگ ایوریج (EMA) لائنز کی بنیاد پر بائے اور سیل سگنل ملیں۔ ہم ایک ایسا انڈیکیٹر تخلیق کریں گے جو ان سگنلز کو واضح طور پر ظاہر کرے۔
اس انڈیکیٹر میں درج ذیل بنیادی نکات شامل ہوں گے:
5 منٹ، 3 منٹ اور 15 منٹ کی EMA لائنز کی پیمائش۔
جب مارکیٹ کرش کرے (یعنی قیمت میں اچانک کمی آ جائے)، تو وہ سگنلز دیں جو بائے اور سیل کے فیصلے میں مدد کریں۔
ایک واضح سگنل بار یا اسٹرپ لائنز کی شکل میں بائے اور سیل کے لیے۔
یہاں ایک بنیادی پائن اسکرپٹ ہے جو آپ کی ضروریات کے قریب ہوسکتا ہے:
pinescript
Copy code
Support & Resistance + Range Filter + Volume Profile//@version=5
indicator("Support & Resistance + Range Filter + Volume Profile ", overlay=true, max_boxes_count=500, max_lines_count=500, max_bars_back=5000)
// ---------------------------------------------------------------------------------------------------------------------}
// 𝙐𝙎𝙀𝙍 𝙄𝙉𝙋𝙐𝙉𝙏𝙎
// ---------------------------------------------------------------------------------------------------------------------{
// Support and Resistance Inputs
int lookbackPeriod = input.int(20, "Lookback Period", minval=1, group="Support & Resistance")
int vol_len = input.int(2, "Delta Volume Filter Length", tooltip="Higher input, will filter low volume boxes", group="Support & Resistance")
float box_width = input.float(1, "Adjust Box Width", maxval=1000, minval=0, step=0.1, group="Support & Resistance")
// Range Filter Inputs
src = input(close, title="Source", group="Range Filter")
per = input.int(100, minval=1, title="Sampling Period", group="Range Filter")
mult = input.float(3.0, minval=0.1, title="Range Multiplier", group="Range Filter")
// Range Filter Colors
upColor = input.color(color.white, "Up Color", group="Range Filter")
midColor = input.color(#90bff9, "Mid Color", group="Range Filter")
downColor = input.color(color.blue, "Down Color", group="Range Filter")
// Volume Profile Inputs
vpGR = 'Volume & Sentiment Profile'
vpSH = input.bool(true, 'Volume Profile', group=vpGR)
vpUC = input.color(color.new(#5d606b, 50), ' Up Volume ', inline='VP', group=vpGR)
vpDC = input.color(color.new(#d1d4dc, 50), 'Down Volume ', inline='VP', group=vpGR)
vaUC = input.color(color.new(#2962ff, 30), ' Value Area Up', inline='VA', group=vpGR)
vaDC = input.color(color.new(#fbc02d, 30), 'Value Area Down', inline='VA', group=vpGR)
spSH = input.bool(true, 'Sentiment Profile', group=vpGR)
spUC = input.color(color.new(#26a69a, 30), ' Bullish', inline='BB', group=vpGR)
spDC = input.color(color.new(#ef5350, 30), 'Bearish', inline='BB', group=vpGR)
sdSH = input.bool(true, 'Supply & Demand Zones', group=vpGR)
sdTH = input.int(15, ' Supply & Demand Threshold %', minval=0, maxval=41, group=vpGR) / 100
sdSC = input.color(color.new(#ec1313, 80), ' Supply Zones', inline='SD', group=vpGR)
sdDC = input.color(color.new(#0094FF, 80), 'Demand Zones', inline='SD', group=vpGR)
pcSH = input.string('Developing POC', 'Point of Control', options= , inline='POC', group=vpGR)
pocC = input.color(#f44336, '', inline='POC', group=vpGR)
pocW = input.int(2, '', minval=1, inline='POC', group=vpGR)
vpVA = input.float(68, 'Value Area (%)', minval=0, maxval=100, group=vpGR) / 100
vahS = input.bool(true, 'Value Area High (VAH)', inline='VAH', group=vpGR)
vahC = input.color(#2962ff, '', inline='VAH', group=vpGR)
vahW = input.int(1, '', minval=1, inline='VAH', group=vpGR)
vlSH = input.bool(true, 'Value Area Low (VAL)', inline='VAL', group=vpGR)
valC = input.color(#2962ff, '', inline='VAL', group=vpGR)
valW = input.int(1, '', minval=1, inline='VAL', group=vpGR)
vpPT = input.string('Bar Polarity', 'Profile Polarity Method', options= , group=vpGR)
vpLR = input.string('Fixed Range', 'Profile Lookback Range', options= , group=vpGR)
vpLN = input.int(360, 'Lookback Length / Fixed Range', minval=10, maxval=5000, step=10, group=vpGR)
vpST = input.bool(true, 'Profile Stats', inline='STT', group=vpGR)
ppLS = input.string('Small', "", options= , inline='STT', group=vpGR)
lcDB = input.string('Top Right', '', options= , inline='STT', group=vpGR)
vpLV = input.bool(true, 'Profile Price Levels', inline='BBe', group=vpGR)
rpLS = input.string('Small', "", options= , inline='BBe', group=vpGR)
vpPL = input.string('Right', 'Profile Placement', options= , group=vpGR)
vpNR = input.int(100, 'Profile Number of Rows', minval=10, maxval=150, step=10, group=vpGR)
vpWD = input.float(31, 'Profile Width', minval=0, maxval=250, group=vpGR) / 100
vpHO = input.int(13, 'Profile Horizontal Offset', maxval=50, group=vpGR)
vaBG = input.bool(false, 'Value Area Background ', inline='vBG', group=vpGR)
vBGC = input.color(color.new(#2962ff, 89), '', inline='vBG', group=vpGR)
vpBG = input.bool(false, 'Profile Range Background ', inline='pBG', group=vpGR)
bgC = input.color(color.new(#2962ff, 95), '', inline='pBG', group=vpGR)
vhGR = 'Volume Histogram'
vhSH = input.bool(true, 'Volume Histogram', group=vhGR)
vmaS = input.bool(true, 'Volume MA, Length', inline='vol2', group=vhGR)
vmaL = input.int(21, '', minval=1, inline='vol2', group=vhGR)
vhUC = input.color(color.new(#26a69a, 30), ' Growing', inline='vol1', group=vhGR)
vhDC = input.color(color.new(#ef5350, 30), 'Falling', inline='vol1', group=vhGR)
vmaC = input.color(color.new(#2962ff, 0), 'Volume MA', inline='vol1', group=vhGR)
vhPL = input.string('Top', ' Placement', options= , group=vhGR)
vhHT = 11 - input.int(8, ' Hight', minval=1, maxval=10, group=vhGR)
vhVO = input.int(1, ' Vertical Offset', minval=0, maxval=20, group=vhGR) / 20
cbGR = 'Volume Weighted Colored Bars'
vwcb = input.bool(false, 'Volume Weighted Colored Bars', group=cbGR)
upTH = input.float(1.618, ' Upper Threshold', minval=1., step=.1, group=cbGR)
dnTH = input.float(0.618, ' Lower Threshold', minval=.1, step=.1, group=cbGR)
// ---------------------------------------------------------------------------------------------------------------------}
// 𝙎𝙐𝙋𝙋𝙊𝙍𝙏 𝘼𝙉𝘿 𝙍𝙀𝙎𝙄𝙎𝙏𝘼𝙉𝘾𝙀 𝘾𝘼𝙇𝘾𝙐𝙇𝘼𝙏𝙄𝙊𝙉𝙎
// ---------------------------------------------------------------------------------------------------------------------{
// Delta Volume Function
upAndDownVolume() =>
posVol = 0.0
negVol = 0.0
var isBuyVolume = true
switch
close > open => isBuyVolume := true
close < open => isBuyVolume := false
if isBuyVolume
posVol += volume
else
negVol -= volume
posVol + negVol
// Function to identify support and resistance boxes
calcSupportResistance(src, lookbackPeriod) =>
Vol = upAndDownVolume()
vol_hi = ta.highest(Vol/2.5, vol_len)
vol_lo = ta.lowest(Vol/2.5, vol_len)
var float supportLevel = na
var float resistanceLevel = na
var box sup = na
var box res = na
var color res_color = na
var color sup_color = na
// Find pivot points
pivotHigh = ta.pivothigh(src, lookbackPeriod, lookbackPeriod)
pivotLow = ta.pivotlow (src, lookbackPeriod, lookbackPeriod)
atr = ta.atr(200)
withd = atr * box_width
// Find support levels with Positive Volume
if (not na(pivotLow)) and Vol > vol_hi
supportLevel := pivotLow
topLeft = chart.point.from_index(bar_index-lookbackPeriod, supportLevel)
bottomRight = chart.point.from_index(bar_index, supportLevel-withd)
sup_color := color.from_gradient(Vol, 0, ta.highest(Vol, 25), color(na), color.new(color.green, 30))
sup := box.new(topLeft, bottomRight, border_color=color.green, border_width=1, bgcolor=sup_color, text="Vol: "+str.tostring(math.round(Vol,2)), text_color=chart.fg_color, text_size=size.small)
// Find resistance levels with Negative Volume
if (not na(pivotHigh)) and Vol < vol_lo
resistanceLevel := pivotHigh
topLeft = chart.point.from_index(bar_index-lookbackPeriod, resistanceLevel)
bottomRight = chart.point.from_index(bar_index, resistanceLevel+withd)
res_color := color.from_gradient(Vol, ta.lowest(Vol, 25), 0, color.new(color.red, 30), color(na))
res := box.new(topLeft, bottomRight, border_color=color.red, border_width=1, bgcolor=res_color, text="Vol: "+str.tostring(math.round(Vol,2)), text_color=chart.fg_color, text_size=size.small)
= calcSupportResistance(close, lookbackPeriod)
// ---------------------------------------------------------------------------------------------------------------------}
// 𝙍𝘼𝙉𝙂𝙀 𝙁𝙄𝙇𝙏𝙀𝙍 𝘾𝘼𝙇𝘾𝙐𝙇𝘼𝙏𝙄𝙊𝙉𝙎
// ---------------------------------------------------------------------------------------------------------------------{
// Smooth Average Range
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
smoothrng
smrng = smoothrng(src, per, mult)
// Range Filter
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt ) ? x - r < nz(rngfilt ) ? nz(rngfilt ) : x - r :
x + r > nz(rngfilt ) ? nz(rngfilt ) : x + r
rngfilt
filt = rngfilt(src, smrng)
// Filter Direction
upward = 0.0
upward := filt > filt ? nz(upward ) + 1 : filt < filt ? 0 : nz(upward )
downward = 0.0
downward := filt < filt ? nz(downward ) + 1 : filt > filt ? 0 : nz(downward )
// Target Bands
hband = filt + smrng
lband = filt - smrng
// Colors
filtcolor = upward > 0 ? upColor : downward > 0 ? downColor : midColor
barcolor = src > filt and src > src and upward > 0 ? upColor :
src > filt and src < src and upward > 0 ? upColor :
src < filt and src < src and downward > 0 ? downColor :
src < filt and src > src and downward > 0 ? downColor : midColor
filtplot = plot(filt, color=filtcolor, linewidth=2, title="Range Filter")
hbandplot = plot(hband, color=color.new(upColor, 70), title="High Target")
lbandplot = plot(lband, color=color.new(downColor, 70), title="Low Target")
// Fills
fill(hbandplot, filtplot, color=color.new(upColor, 90), title="High Target Range")
fill(lbandplot, filtplot, color=color.new(downColor, 90), title="Low Target Range")
// Break Outs
longCond = bool(na)
shortCond = bool(na)
longCond := src > filt and src > src and upward > 0 or
src > filt and src < src and upward > 0
shortCond := src < filt and src < src and downward > 0 or
src < filt and src > src and downward > 0
CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni
longCondition = longCond and CondIni == -1
shortCondition = shortCond and CondIni == 1
// Plot Buy/Sell Signals
plotshape(longCondition, title="Buy Signal", text="Buy", textcolor=color.white, style=shape.labelup, size=size.small, location=location.belowbar, color=color.new(#aaaaaa, 20))
plotshape(shortCondition, title="Sell Signal", text="Sell", textcolor=color.white, style=shape.labeldown, size=size.small, location=location.abovebar, color=color.new(downColor, 20))
// ---------------------------------------------------------------------------------------------------------------------}
// 𝙑𝙊𝙇𝙐𝙈𝙀 𝙋𝙍𝙊𝙁𝙄𝙇𝙀 𝘾𝘼𝙇𝘾𝙐𝙇𝘼𝙏𝙄𝙊𝙉𝙎
// ---------------------------------------------------------------------------------------------------------------------{
// (Include the Volume Profile calculations and visualizations from the original script here)
// ...
// ---------------------------------------------------------------------------------------------------------------------}
// 𝙑𝙄𝙎𝙐𝘼𝙇𝙄𝙕𝘼𝙏𝙄𝙊𝙉
// ---------------------------------------------------------------------------------------------------------------------{
// (Include the visualization logic from the Volume Profile script here)
// ...
// ---------------------------------------------------------------------------------------------------------------------}
// 𝘼𝙇𝙀𝙍𝙏𝙎
// ---------------------------------------------------------------------------------------------------------------------{
// (Include the alert conditions from the Volume Profile script here)
// ...
// ---------------------------------------------------------------------------------------------------------------------}