Engulfing Candles Strategy by ardhankurniawanThis strategy is based on the Engulfing Candlestick pattern and incorporates a Risk-Reward ratio of 1:2. It utilizes two primary indicators:
1. SMA 200 (200-period Simple Moving Average): Used to identify the overall trend, with buy signals occurring above the SMA and sell signals below it.
2. Bollinger Bands: Provides a volatility-based range for price action. Buy signals occur when the price is above both the SMA 200 and the middle Bollinger Band, while sell signals occur when the price is below both.
The strategy executes a long position (buy) when a Bullish Engulfing candle pattern forms above the SMA 200 and the middle Bollinger Band, and it exits the position using a stop loss at the low of the Bullish Engulfing candle and a take profit at a 1:2 risk-reward ratio. Similarly, a short position (sell) is initiated when a Bearish Engulfing pattern appears below the SMA 200 and the middle Bollinger Band, with the stop loss placed at the high of the Bearish Engulfing candle and a take profit at the same 1:2 risk-reward ratio.
The strategy is designed for trend-following trades with clear entry and exit points based on candlestick patterns and key indicators.
Disclaimer:
This trading strategy is for research purposes only and should not be considered as financial or investment advice. The use of this strategy involves risk, and past performance is not indicative of future results. Always conduct your own research and consult with a financial advisor before making any investment decisions. Trading involves significant risk, and you could lose more than your initial investment. By using this strategy, you agree to take full responsibility for any trades executed and the associated risks.
Indicadores e estratégias
My strategyimport pandas as pd
import ta
import time
from dhan import DhanHQ
# Dhan API Credentials
API_KEY = "your_api_key"
ACCESS_TOKEN = "your_access_token"
dhan = DhanHQ(api_key=API_KEY, access_token=ACCESS_TOKEN)
# Strategy Parameters
SYMBOL = "RELIANCE" # Replace with your stock symbol
INTERVAL = "1min" # Scalping requires a short timeframe
STOPLOSS_PERCENT = 0.2 # Stop loss percentage (0.2% per trade)
TARGET_RR_RATIO = 2 # Risk-Reward Ratio (1:2)
QUANTITY = 10 # Number of shares per trade
def get_historical_data(symbol, interval="1min", limit=50):
"""Fetch historical data from Dhan API."""
response = dhan.get_historical_data(symbol=symbol, interval=interval, limit=limit)
if response == "success":
df = pd.DataFrame(response )
df = df .astype(float)
df = df .astype(float)
df = df .astype(float)
df = df .astype(float)
return df
else:
raise Exception("Failed to fetch data: ", response )
def add_indicators(df):
"""Calculate EMA (9 & 20), VWAP, and RSI."""
df = ta.trend.ema_indicator(df , window=9)
df = ta.trend.ema_indicator(df , window=20)
df = ta.volume.volume_weighted_average_price(df , df , df , df )
df = ta.momentum.rsi(df , window=14)
return df
def check_signals(df):
"""Identify Buy and Sell signals based on EMA, VWAP, and RSI."""
latest = df.iloc
# Buy Condition
if latest > latest and latest > latest and 40 <= latest <= 60:
return "BUY"
# Sell Condition
if latest < latest and latest < latest and 40 <= latest <= 60:
return "SELL"
return None
def place_order(symbol, side, quantity):
"""Execute a market order."""
order_type = "BUY" if side == "BUY" else "SELL"
order = dhan.place_order(symbol=symbol, order_type="MARKET", quantity=quantity, transaction_type=order_type)
if order == "success":
print(f"{order_type} Order Placed: {order }")
return float(order ) # Return entry price
else:
raise Exception("Order Failed: ", order )
def scalping_strategy():
position = None
entry_price = 0
stoploss = 0
target = 0
while True:
try:
# Fetch and process data
df = get_historical_data(SYMBOL, INTERVAL)
df = add_indicators(df)
signal = check_signals(df)
# Execute trade
if signal == "BUY" and position is None:
entry_price = place_order(SYMBOL, "BUY", QUANTITY)
stoploss = entry_price * (1 - STOPLOSS_PERCENT / 100)
target = entry_price + (entry_price - stoploss) * TARGET_RR_RATIO
position = "LONG"
print(f"BUY @ {entry_price}, SL: {stoploss}, Target: {target}")
elif signal == "SELL" and position is None:
entry_price = place_order(SYMBOL, "SELL", QUANTITY)
stoploss = entry_price * (1 + STOPLOSS_PERCENT / 100)
target = entry_price - (stoploss - entry_price) * TARGET_RR_RATIO
position = "SHORT"
print(f"SELL @ {entry_price}, SL: {stoploss}, Target: {target}")
# Exit logic
if position:
current_price = df .iloc
if (position == "LONG" and (current_price <= stoploss or current_price >= target)) or \
(position == "SHORT" and (current_price >= stoploss or current_price <= target)):
print(f"Exiting {position} @ {current_price}")
position = None
time.sleep(60) # Wait for the next candle
except Exception as e:
print(f"Error: {e}")
time.sleep(60)
# Run the strategy
try:
scalping_strategy()
except KeyboardInterrupt:
print("Trading stopped manually.")
Sathanand crossoverThis Moving Average Crossover indicator uses two lines:
1️⃣ Short Moving Average (Short MA - Blue Line)
This is the faster moving average (default: 50-period).
It reacts quickly to price changes.
When it crosses above the Long MA → Buy Signal 📈
When it crosses below the Long MA → Sell Signal 📉
2️⃣ Long Moving Average (Long MA - Red Line)
This is the slower moving average (default: 200-period).
It smooths out long-term trends and avoids short-term fluctuations.
Acts as a trend confirmation line—staying above means an uptrend, below means a downtrend.
Buy & Sell Signals:
✅ Green "Up" Arrow (Buy Signal) → Short MA crosses above Long MA → Uptrend starts
✅ Red "Down" Arrow (Sell Signal) → Short MA crosses below Long MA → Downtrend starts
📊 In Short:
The crossover strategy helps identify trend reversals
Useful for trend-following traders
Works well in strong trending markets, but may give false signals in sideways markets
AdibXmos // © Adib2024
//@version=5
indicator('AdibXmos ', 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')
Gold Trading Strategy//@version=5
indicator("Gold Trading Strategy", overlay=true)
// Input parameters
shortMA = ta.sma(close, 9)
longMA = ta.sma(close, 21)
rsi = ta.rsi(close, 14)
= ta.bb(close, 20, 2)
// Time filter (IST time range)
timeFilter = (hour >= 12 and hour < 14) or (hour >= 18 and hour < 21)
// Buy condition
buyCondition = ta.crossover(shortMA, longMA) and rsi > 50 and close > bbMiddle and timeFilter
// Sell condition
sellCondition = ta.crossunder(shortMA, longMA) and rsi < 50 and close < bbMiddle and timeFilter
// Plot MAs
plot(shortMA, color=color.blue, title="9 MA")
plot(longMA, color=color.red, title="21 MA")
// Plot Bollinger Bands
plot(bbUpper, color=color.gray, title="BB Upper")
plot(bbMiddle, color=color.gray, title="BB Middle")
plot(bbLower, color=color.gray, title="BB Lower")
// Plot Buy & Sell signals
plotshape(series=buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, size=size.large, title="Buy Signal")
plotshape(series=sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, size=size.large, title="Sell Signal")
// Plot Entry & Exit Markers
plotshape(series=buyCondition, location=location.belowbar, color=color.blue, style=shape.triangleup, size=size.large, title="Entry")
plotshape(series=sellCondition, location=location.abovebar, color=color.orange, style=shape.triangledown, size=size.large, title="Exit")
// Add text labels for entry and exit points
var float labelOffset = ta.atr(14) // Offset labels for better visibility
if buyCondition
label.new(x=time, y=low - labelOffset, text="Entry", color=color.blue, textcolor=color.white, size=size.large, style=label.style_label_down)
if sellCondition
label.new(x=time, y=high + labelOffset, text="Exit", color=color.orange, textcolor=color.white, size=size.large, style=label.style_label_up)
UT Bot Pro Final//@version=6
indicator("UT Bot Pro Final", overlay=true, max_lines_count=500)
// === INPUT PARAMETERS ===
// Core Settings
atr_multiplier = input.float(1.0, "ATR Multiplier", minval=0.5, maxval=5, step=0.1, group="Core Settings")
atr_period = input.int(6, "ATR Period", minval=1, maxval=20, group="Core Settings")
// Trend Filter
use_trend_filter = input.bool(true, "Enable Trend Filter", group="Trend Filter")
trend_length = input.int(50, "Trend SMA Period", minval=10, group="Trend Filter")
// Volume Filter
use_volume_filter = input.bool(true, "Enable Volume Filter", group="Volume Filter")
volume_ma_length = input.int(20, "Volume MA Period", minval=5, group="Volume Filter")
volume_threshold = input.float(1.25, "Volume Threshold %", step=0.1, group="Volume Filter")
// === CORE LOGIC ===
xATR = ta.atr(atr_period)
nLoss = atr_multiplier * xATR
price = close
// Trend Filter
trend_sma = ta.sma(price, trend_length)
valid_uptrend = not use_trend_filter or (price > trend_sma)
valid_downtrend = not use_trend_filter or (price < trend_sma)
// Volume Filter
volume_ma = ta.sma(volume, volume_ma_length)
volume_ok = volume > (volume_ma * volume_threshold)
// Trailing Stop
var float xATRTrailingStop = na
xATRTrailingStop := switch
na(xATRTrailingStop ) => price - nLoss
price > xATRTrailingStop and valid_uptrend => math.max(xATRTrailingStop , price - nLoss)
price < xATRTrailingStop and valid_downtrend => math.min(xATRTrailingStop , price + nLoss)
=> xATRTrailingStop
// Signal Generation
buy_signal = ta.crossover(price, xATRTrailingStop) and valid_uptrend and (use_volume_filter ? volume_ok : true)
sell_signal = ta.crossunder(price, xATRTrailingStop) and valid_downtrend and (use_volume_filter ? volume_ok : true)
// === VISUALS ===
plot(xATRTrailingStop, "Trailing Stop", color=color.new(color.purple, 0), linewidth=2)
plotshape(
buy_signal, "Buy", shape.triangleup,
location.belowbar, color=color.green,
text="BUY", textcolor=color.white, size=size.small)
plotshape(
sell_signal, "Sell", shape.triangledown,
location.abovebar, color=color.red,
text="SELL", textcolor=color.white, size=size.small)
// === ALERTS ===
alertcondition(buy_signal, "Long Entry", "Bullish breakout detected")
alertcondition(sell_signal, "Short Entry", "Bearish breakdown detected")
Buyer/Seller DominanceThis Script is to find out the Buyer / Seller Dominance for any Index - Sam Thomas
RSI and MACD Buy/Sell Strategy with Signals//@version=5
indicator("RSI and MACD Buy/Sell Strategy with Signals", overlay=true)
// Define RSI and MACD parameters
rsiPeriod = 14
macdShort = 12
macdLong = 26
macdSignal = 9
// Calculate RSI
rsi = ta.rsi(close, rsiPeriod)
// Calculate MACD
= ta.macd(close, macdShort, macdLong, macdSignal)
macdHist = macdLine - signalLine
// Define buy and sell conditions
buyCondition = (rsi < 30) and (macdHist < -7 or macdHist < -8)
sellCondition = (rsi > 60) and (macdHist > 6)
// Plot Buy and Sell signals directly on the main price chart
plotshape(series=buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal", text="BUY", textcolor=color.white, size=size.small)
plotshape(series=sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal", text="SELL", textcolor=color.white, size=size.small)
Bollinger RSI Pro AdvancedЭтот индикатор Bollinger RSI Pro with Anomalous Volume Detection предназначен для торговли BTC/USDT на низких таймфреймах (1 минута – 1 час). Он сочетает полосы Боллинджера, RSI и анализ аномальных объемов, чтобы выявлять сильные движения цены, устраняя шум низкокачественной ликвидности
Oops ReversalOpen below prior days low and the Oops is triggered by a reversal through the low of the previous day.
Candle Close NotificationCandle Close Notification Indicator - Specification
1. 概要 (Overview)
本インジケーターは、TradingView 上でローソク足が確定した際に、そのローソク足が陰線(Bearish)または陽線(Bullish)であった場合に通知を送信するものです。
また、該当するローソク足の上または下にマークを表示し、視覚的にも識別しやすくなっています。
This indicator for TradingView sends notifications when a candlestick closes as either a bearish (red) or bullish (green) candle. It also marks the corresponding candles on the chart for visual reference.
2. 機能 (Features)
2.1 通知機能 (Notification Function)
ローソク足の確定時に、以下の条件に基づき アラート(通知) を送信します。
「Both」(両方): 陰線・陽線のどちらでも通知
「Bearish」(陰線のみ): 陰線の時のみ通知
「Bullish」(陽線のみ): 陽線の時のみ通知
When a candlestick closes, an alert notification is sent based on the selected option:
"Both" (Default): Notifies for both bearish and bullish candles.
"Bearish": Notifies only bearish candles.
"Bullish": Notifies only bullish candles.
2.2 チャートマーク表示機能 (Chart Marking Function)
ローソク足が確定した際、以下のルールでマークを表示します。
陰線(Bearish) の場合、赤色の「下向きマーク」を表示(ローソク足の上)
陽線(Bullish) の場合、緑色の「上向きマーク」を表示(ローソク足の下)
When a candlestick closes, a marker appears according to the following rules:
Bearish candle → A red downward marker appears above the candle.
Bullish candle → A green upward marker appears below the candle.
3. 通知オプションの設定 (Setting Notification Options)
スクリプト内の notify_option の値を変更することで、通知の種類を設定できます。
Both(デフォルト) → 陰線・陽線両方通知
Bearish → 陰線のみ通知
Bullish → 陽線のみ通知
Modify the notify_option value in the script to customize notifications:
Both (Default) → Notifies for both bearish and bullish candles.
Bearish → Notifies only bearish candles.
Bullish → Notifies only bullish candles.
TradingView の アラート機能 を有効にすることで、通知を受け取ることができます。
Enable TradingView’s Alert function to receive notifications.
VDM Cipher (BTC+ALT)Анализирует ключевые метрики и помогает выявлять оптимальные моменты для сделок.
🔹 Идеально подходит для трейдинга BTC и альткоинов
🔹 Гибкий, адаптивный и надежный
🔹 Разработан с учетом реальных рыночных условий
🔥 Важно! В течение 60 дней индикатор будет активно дорабатываться!
🔜 Следующее обновление:
✅ Автоматическое определение уровней поддержки и сопротивления
✅ Учёт объёмов для ещё большей точности
✅ Связка всех данных для создания мощных сигналов
✅ Автооповещения о возможных входах в Лонг и Шорт
Institutional Moves DetectorIndicator Name: Institutional Pattern Detector
What It Does:
Trend Following: It uses a Moving Average (MA) to understand the general direction of the price. The MA is like a smoothed-out line of the price over time, showing if the price trend is going up or down.
Volatility Measurement: The script employs Bollinger Bands (BB) to see how much the price is fluctuating. Bollinger Bands create an upper and lower "channel" around the price, which gets wider or narrower based on how volatile the price is.
Volume Check: It looks at trading volume to find times when there's unusually high activity, which could mean big players (institutions like banks or funds) are trading. It flags this when the volume is 1.5 times more than the average volume of the last 100 bars.
Pattern Detection for Trading Signals:
Entry Signal ("IN"): When there's high volume and the price is above the upper Bollinger Band, it suggests there might be strong buying from big institutions. This could mean the price might keep going up.
EXIT Signal ("OUT"): If there's high volume and the price falls below the lower Bollinger Band, it indicates possible strong selling pressure from institutions, suggesting the price might go down.
Visual Cues:
An orange label "IN" appears below the price bar for entry signals.
A red label "OUT" appears above the price bar for exit signals.
The moving average line is plotted on the chart in orange to help you see the trend.
Alerts: The script can alert you when these entry or exit signals occur, so you can get notifications without needing to stare at the chart all day.
For New Traders:
This indicator helps you spot when big traders might be influencing the market, potentially giving you a clue about when to enter or exit.
Remember, this is one tool among many. You should not base your trading solely on this; combine it with other analysis methods.
It's always wise to practice with a demo account before using real money to get a feel for how these signals work in actual market conditions.
Gold Trading Signals m.samimi// Pine Script v5
//@version=5
indicator("Gold Trading Signals", overlay=true)
// تنظیم اندیکاتورها
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
= ta.macd(close, 12, 26, 9)
rsi = ta.rsi(close, 14)
atr = ta.atr(14)
stochRsi = ta.stoch(close, high, low, 14)
volumeProfile = ta.sma(volume, 50)
// محاسبه Bollinger Bands به صورت دستی
bb_middle = ta.sma(close, 20)
bb_upper = bb_middle + 2 * ta.stdev(close, 20)
bb_lower = bb_middle - 2 * ta.stdev(close, 20)
// شرط خرید (Buy Signal)
buyCondition = ta.crossover(macdLine, signalLine) and close > ema50 and close > ema200 and rsi > 50 and stochRsi < 20
// شرط فروش (Sell Signal)
sellCondition = ta.crossunder(macdLine, signalLine) and close < ema50 and close < ema200 and rsi < 50 and stochRsi > 80
// واگراییها
divBull = ta.lowest(close, 5) < ta.lowest(close, 10) and rsi > ta.lowest(rsi, 10) // واگرایی مثبت
divBear = ta.highest(close, 5) > ta.highest(close, 10) and rsi < ta.highest(rsi, 10) // واگرایی منفی
// بررسی شکست مقاومت و حمایت
breakoutUp = close > bb_upper and volume > volumeProfile
breakoutDown = close < bb_lower and volume > volumeProfile
// مدیریت ریسک با ATR
stopLoss = atr * 1.5
riskReward = stopLoss * 2
// نمایش سیگنالها
plotshape(buyCondition or divBull or breakoutUp, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal")
plotshape(sellCondition or divBear or breakoutDown, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal")
// نمایش خطوط EMA
plot(ema50, title="EMA 50", color=color.blue)
plot(ema200, title="EMA 200", color=color.orange)
// نمایش Bollinger Bands
plot(bb_upper, title="BB Upper", color=color.gray)
plot(bb_middle, title="BB Middle", color=color.gray)
plot(bb_lower, title="BB Lower", color=color.gray)
// نمایش ATR
plot(atr, title="ATR", color=color.purple)
BybitPerpsArrayLibrary "BybitPerpsArray"
f_getSymbolsForGroup(groupName)
Parameters:
groupName (string)
Contains all of the BYBIT Perp charts- use function to call them in groups
Gold Trading Signals samimi// Pine Script v5
//@version=5
indicator("Gold Trading Signals", overlay=true)
// تنظیم اندیکاتورها
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
= ta.macd(close, 12, 26, 9)
rsi = ta.rsi(close, 14)
// شرط خرید (Buy Signal)
buyCondition = ta.crossover(macdLine, signalLine) and close > ema50 and close > ema200 and rsi > 50
// شرط فروش (Sell Signal)
sellCondition = ta.crossunder(macdLine, signalLine) and close < ema50 and close < ema200 and rsi < 50
// واگراییها
divBull = ta.lowest(close, 5) < ta.lowest(close, 10) and rsi > ta.lowest(rsi, 10) // واگرایی مثبت
divBear = ta.highest(close, 5) > ta.highest(close, 10) and rsi < ta.highest(rsi, 10) // واگرایی منفی
// نمایش سیگنالها
plotshape(buyCondition or divBull, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal")
plotshape(sellCondition or divBear, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal")
// نمایش خطوط EMA
plot(ema50, title="EMA 50", color=color.blue)
plot(ema200, title="EMA 200", color=color.orange)
SAR + RSI Strategy with SMA risk controlThis strategy first identifies RSI oversold or overbought and then within 1-3 candles of this condition looks for SAR signal and opens a trade accordingly. When the prices goes back to the 21 candle simple movin average, this closes the trade.
RGBB EMA StrategyBasic EMA crossover for length 22,55,100 and 200.
Long when all 4 ema in upward trend
Short when all 4 ema in downward trend
Only for educational purpose.