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.
指标和策略
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.")
Advanced Multi-Strategy Trading SystemTrade with the trend: The strategy uses EMAs, RSI, and MACD to identify the trend and momentum, helping you enter trades that align with the broader market movement.
Risk management: You can control your risk with dynamic position sizing, stop loss, and take profit levels. The trailing stop ensures that you lock in profits as the market moves in your favor.
Strategy Execution: When the buy or sell signals appear, the strategy will automatically enter trades for you. The script calculates optimal position sizes and manages the trades based on your predefined risk parameters.
Previous HTF Highs, Lows & Equilibriums [ᴅᴀɴɪ]#Previous HTF Highs, Lows & Equilibriums
Indicator Description
This powerful and user-friendly indicator is designed to help traders visualize key levels from multiple higher timeframes directly on their chart. It plots the previous session's high, low, and equilibrium (EQ) levels for up to 4 customizable timeframes, allowing you to analyze price action across different time horizons simultaneously.
Key Features
#1 Multi-Timeframe Support:
Choose up to 4 higher timeframes (e.g., 1H, 4H, 1D, 1W) to plot levels on your chart.
Each timeframe's levels are displayed with clear, customizable lines.
#2 Previous Session Levels:
Plots the previous session's high, low, and EQ (EQ = (high + low) / 2) for each selected timeframe.
Levels are dynamically updated at the start of each new session.
#3 Customizable Line Styles:
Choose between solid, dashed, or dotted lines for each level.
Customize colors for high, low, and EQ levels to suit your preferences.
#4 Dynamic Labels:
Each level is labeled with the corresponding timeframe (e.g., "1D - H" for daily high, "4H - L" for 4-hour low).
Labels are positioned dynamically to avoid clutter and ensure readability.
#5 Toggle On/Off:
Easily toggle the visibility of all levels with a single button, making it simple to declutter your chart when needed.
#6 Compatible with All Markets:
Works seamlessly across all instruments (stocks, forex, crypto, futures, etc.) and timeframes.
How to Use?
1. Add the indicator to your chart.
2. Select up to 4 higher timeframes to plot levels.
3. Customize line styles and colors to match your trading style.
4. Toggle levels on/off as needed to keep your chart clean and focused
Disclaimer
This indicator is not a trading signal generator . It does not predict market direction or provide buy/sell signals. Instead, it is a tool to help you visualize key levels from higher timeframes, enabling you to make more informed trading decisions. Always combine this tool with your own analysis, risk management, and trading strategy.
Thank you for choosing this indicator! I hope it becomes a valuable part of your trading toolkit. Remember, trading is a journey, and having the right tools can make all the difference. Whether you're a seasoned trader or just starting out, this indicator is designed to help you stay organized and focused on what matters most—price action. Happy trading, and may your charts be ever in your favor! 😊
Wickless Candle Marker (Exot1c)all credit to exotic
Wickless Candle Marker with Length Adjust and Color Changer
This Pine Script indicator identifies and marks wickless candles on your chart. A wickless candle occurs when:
Bullish: The candle has no lower wick (i.e., the low equals the minimum of the open or close, and the close is above the open).
Bearish: The candle has no upper wick (i.e., the high equals the maximum of the open or close, and the close is below the open).
The indicator draws boxes around these wickless candles to highlight them visually. Key features include:
Customizable Boxes:
Adjust the height and length of the boxes.
Set the transparency of the boxes for better visibility.
Dynamic Color Changer:
Option to enable dynamic color changes for the boxes.
Define custom colors for bullish and bearish wickless candles when dynamic coloring is enabled.
Automatic Cleanup:
If price action "trades into" a marked box (i.e., the price range overlaps with the box), the box is automatically removed to keep the chart clean.
Flexible Use:
Useful for identifying potential reversal zones or continuation patterns based on wickless candles.
Can be combined with other indicators or strategies for enhanced analysis.
How to Use:
Apply the indicator to your chart.
Customize the box appearance (height, length, transparency) and colors in the settings.
Enable the dynamic color changer if you want the box colors to change based on your defined dynamic colors.
Observe the marked wickless candles and use them as part of your trading strategy.
This indicator is ideal for traders who focus on price action and want to quickly spot key candlestick patterns on their charts.
Percent Change HistogramThis indicator shows you percent changes in a super visual way using a color-coded histogram.
Here's how the colors work:
🟩 Dark green = percent change is growing stronger
🟢 Light green = still positive but losing steam
🟥 Dark red = getting more negative
🔴 Light red = negative but improving
The cool part? You can set any lookback period you want. For example:
24 periods on 1H chart = last 24 hours
30 periods on daily = last month
7 periods on daily = last week
Pro tip: You're not locked to your chart's timeframe! Want to see monthly changes while trading on 5min?
No problem.
You can even stack multiple indicators to watch different intervals simultaneously (daily, weekly, monthly) - super helpful for multi-timeframe analysis.
Perfect for spotting momentum shifts across different timeframes without switching between charts.
7:15 PM Candle Highlighter//@version=5
indicator("7:15 PM Candle Highlighter", overlay=true)
// Define the time for the 7:15 PM candle
target_hour = 8
target_minute =30
// Check if the current candle matches the target time
is_target_candle = (hour == target_hour) and (minute == target_minute)
// Highlight the 7:15 PM candle with a rectangle
if is_target_candle
label.new(bar_index, high, "7:15 PM", color=color.new(color.blue, 0), textcolor=color.white, style=label.style_label_down, yloc=yloc.abovebar)
box.new(left=bar_index, top=high, right=bar_index+1, bottom=low, border_color=color.blue, bgcolor=color.new(color.blue, 90))
// Optional: Plot a shape on the chart to indicate the 7:15 PM candle
plotshape(is_target_candle, style=shape.labelup, location=location.belowbar, color=color.blue, text="7:15 PM", textcolor=color.white)
STOCH ET RSI BY MATMATCe script combine l'Indice de Force Relative (RSI) et le Stochastic pour offrir une analyse approfondie des conditions de surachat et de survente sur le marché. Il met en évidence les moments où ces deux indicateurs atteignent des zones extrêmes et affiche un indicateur visuel clair sous le graphique.
Fonctionnalités principales :
✅ Affichage du RSI et du Stochastic
Le RSI est tracé avec une couleur violette semi-transparente.
Le Stochastic est représenté par les lignes %K (rouge) et %D (gris).
✅ Zones de surachat et de survente
Les seuils de 70/30 pour le RSI et 80/20 pour le RSI sont marqués par des lignes horizontales.
Une zone violette est remplie entre 30 et 70 pour le RSI afin de faciliter la lecture.
✅ Ligne centrale à 50 pour le RSI
Ajout d'une ligne pointillée blanche à 50 pour mieux visualiser la neutralité du RSI.
✅ Indicateur de surachat / survente sous le graphique
Une barre de couleur dynamique est affichée sous le graphique :
Rouge lorsque le RSI > 70 et le Stoch > 80 (Surachat).
Vert lorsque le RSI < 30 et le Stoch < 20 (Survente).
Gris foncé lorsque les conditions ne sont pas remplies.
✅ Alertes intégrées
Alerte de surachat : Se déclenche lorsque le RSI et le Stoch sont en zone de surachat.
Alerte de survente : Se déclenche lorsque le RSI et le Stoch sont en zone de survente.
Comment utiliser ce script ?
Ajoutez ce script à votre graphique dans TradingView.
Utilisez les couleurs et les signaux visuels pour repérer les opportunités de trading.
Activez les alertes pour être notifié automatiquement des conditions extrêmes du marché.
💡 Idéal pour les traders qui veulent confirmer les zones de surachat et de survente avant d'entrer ou de sortir d'une position.
6 Medias Móviles con RSI, Dólar MEP y Tendencia Tendencia Mayoritaria:
La variable trend se inicializa con el valor "Neutral", de forma explícita.
Usé la palabra clave var para asegurarnos de que el valor de la variable trend se mantenga a través de las barras.
Manejo del na:
Se ha eliminado el uso de na de manera incorrecta y se ha utilizado una forma correcta de asignación, con valores explícitos para variables de tipo string.
Valor del label:
Se ha cambiado la posición del label a una forma más correcta de manejarlo, usando el índice de la barra.
Tendencia:
La variable trend ahora se evalúa correctamente sin errores.
Directional High-Low VolatilityDirectional volatility.
Calculated as : High-Low / previous close
Creates a table showing the historical vol values along with the values from the user defined range too.
Directional High-Low Volatility It calculates the volatility of the asset.
It provides a table for the historical values and the used defined range too.
gold 1m stgyye script gold me 1m sahi kaam karta hai chaho to aap test Karke dekh sakte ho iska Norman Maine Kiya ware
Pre-Pump Alert Systemdesigned to identify potential pre-pump opportunities in cryptocurrencies by scanning for specific technical conditions. It combines multiple indicators and conditions to alert you when certain criteria are met, signaling a possible price movement. Here's a detailed breakdown of what your script does:
Key Features of the Script
RSI (Relative Strength Index) Conditions:
Detects when the RSI crosses below 35 (oversold condition) or above 75 (overbought condition).
These levels indicate potential reversal points or local tops/bottoms.
MACD (Moving Average Convergence Divergence) Crossover:
Identifies MACD crossovers on the 4-hour timeframe.
A bullish crossover (MACD line crossing above the signal line) suggests potential upward momentum.
Volume Spikes:
Detects when the current volume is >150% of the 24-hour average volume.
Volume spikes often indicate increased interest and potential price movement.
Price Touching Key EMAs (Exponential Moving Averages):
Monitors when the price touches or crosses key EMAs: 13, 48, and 200.
These EMAs act as dynamic support/resistance levels.
Bollinger Band Squeeze:
Identifies when the Bollinger Bands narrow significantly (a squeeze).
A squeeze often precedes a breakout or strong price movement.
Breakout of Key Support/Resistance Levels:
Alerts when the price breaks above a resistance level or below a support level with volume confirmation.
This indicates a potential trend continuation or reversal.
Bollinger Bands ±1σ/±2σ/±3σBollinger Bands (BB) are constructed using the following formula:
±1σ: Simple Moving Average (SMA) ± Standard Deviation
±2σ: Simple Moving Average ± (Standard Deviation × 2)
±3σ: Simple Moving Average ± (Standard Deviation × 3)
The probability of price movement staying within each band is as follows:
±1σ: 68.26%
±2σ: 95.44%
±3σ: 99.74%
Buy/Sell AlgoThis script is an advanced trading software that harnesses real-time price data to provide the most accurate and timely buy signals:
📊 Real-Time Data: Continuously processes live market data to track price movements and identify key trends.
🔄 Advanced Algorithm: Leverages a dynamic crossover strategy between two moving averages (9-period short MA and 21-period long MA) to pinpoint optimal entry points with precision.
📍 Buy Signals: Automatically generates “BUY” signals when the short-term moving average crosses above the long-term moving average, reflecting a high-probability trend reversal to the upside.
🟩 Visual Indicators: Candle bars are dynamically colored green during bullish signals, providing clear visual confirmation for buyers.
EMA50150 with SMA150 Stop-loss and Re-Entry #gangesThis strategy is a trading system that uses Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) to determine entry and exit points for trades. Here's a breakdown of the key components and logic:
Key Indicators:
EMA 50 (Exponential Moving Average with a 50-period window): This is a more responsive moving average to recent price movements.
EMA 150 (Exponential Moving Average with a 150-period window): A slower-moving average that helps identify longer-term trends.
SMA 150 (Simple Moving Average with a 150-period window): This acts as a stop-loss indicator for long trades.
User Inputs:
Start Date and End Date: The strategy is applied only within this date range, ensuring that trading only occurs during the specified period.
Trade Conditions:
Buy Signal (Long Position):
A buy is triggered when the 50-period EMA crosses above the 150-period EMA (indicating the price is gaining upward momentum).
Sell Signal (Short Position):
A sell is triggered when the 50-period EMA crosses below the 150-period EMA (indicating the price is losing upward momentum and moving downward).
Stop-Loss for Long Positions:
If the price drops below the 150-period SMA, the strategy closes any long positions as a stop-loss mechanism to limit further losses.
Re-Entry After Stop-Loss:
After a stop-loss is triggered, the strategy monitors for a re-entry signal:
Re-buy: If the price crosses above the 150-period EMA from below, a new long position is triggered.
Re-sell: If the 50-period EMA crosses below the 150-period EMA, a new short position is triggered.
Trade Execution:
Buy or Sell: The strategy enters trades based on the conditions described and exits them if the stop-loss conditions are met.
Re-entry: After a stop-loss, the strategy tries to re-enter the market based on the same buy/sell conditions.
Risk Management:
Commission and Slippage: The strategy includes a 0.1% commission on each trade and allows for 3 pips of slippage to account for real market conditions.
Visuals:
The strategy plots the 50-period EMA (blue), 150-period EMA (red), and 150-period SMA (orange) on the chart, helping users visualize the key levels for decision-making.
Date Range Filter:
The strategy only executes trades during the user-defined date range, which helps limit trades to a specific period and avoid backtesting errors on irrelevant data.
Stop-Loss Logic:
The stop-loss is triggered when the price crosses below the 150-period SMA, closing the long position to protect against significant drawdowns.
Overall Strategy Goal:
The strategy aims to capture long-term trends using the EMAs for entry signals, while protecting profits through the stop-loss mechanism and offering a way to re-enter the market after a stop-loss.
Power Trend [MacAlgo]Description:
The Power Trend Indicator is a sophisticated technical analysis tool that overlays on your trading charts to identify prevailing market trends. It utilizes a combination of ATR-based trend calculations, moving averages, volume analysis, and momentum indicators to generate reliable buy and sell signals. Additionally, it offers customizable settings to adapt to various trading styles and timeframes.
Key Features:
Adaptive ATR Calculation: Automatically adjusts the ATR (Average True Range) period and multiplier based on the selected timeframe for more accurate trend detection.
Dynamic Trend Lines: Plots continuous trend lines with color-coded bars to visually represent bullish and bearish trends.
Buy/Sell Signals: Generates standard and power buy/sell signals to help you make informed trading decisions.
Volume Analysis: Incorporates average buy and sell volumes to identify strong market movements.
Multiple Timeframe Support: Automatically adjusts the indicator's timeframe or allows for manual selection to suit your trading preferences.
Highlighting: Highlights trending bars for easy visualization of market conditions.
Alerts: Customizable alert conditions to notify you of potential trading opportunities in real-time.
How it Works:
1. ATR-Based Trend Calculation:
ATR Period & Multiplier: Calculates ATR based on user-defined periods and multipliers, dynamically adjusting according to the chart's timeframe.
Trend Determination: Identifies trends as bullish (1) or bearish (-1) based on price movements relative to ATR-based upper (up) and lower (dn) trend lines.
2. Moving Averages:
EMA & SMA: Calculates exponential and simple moving averages to smooth price data and identify underlying trends.
AlphaTrend Line: Combines a 50-period EMA and a 30-period SMA on a 4-hour timeframe to create the AlphaTrend line, providing a robust trend reference.
3. Volume Analysis:
Buy/Sell Volume: Differentiates between buy and sell volumes to gauge market strength.
Average Volume: Compares current volume against average buy/sell volumes to detect significant market movements.
4. Momentum Indicators:
RSI, MACD, OBV: Incorporates Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), and On-Balance Volume (OBV) to assess momentum and confirm trend strength.
5. Signal Generation:
Standard Signals: Basic buy and sell signals based on trend crossovers.
Power Signals: Enhanced signals requiring multiple conditions (e.g., increased volume, momentum confirmation) for higher confidence trades.
Customization Options:
Tailor the Power Trend Indicator to your specific trading needs with the following settings:
ATR Period: Set the period for ATR calculation (default: 8).
ATR Multiplier: Adjust the ATR multiplier to fine-tune trend sensitivity (default: 3.0).
Source: Choose the price source (e.g., HL2, Close) for calculations.
Change ATR Calculation Method: Toggle between different ATR calculation methods.
Show Buy/Sell Signals: Enable or disable the display of buy and sell signals on the chart.
Highlighting: Turn on or off the bar highlighting feature.
Timeframe Adjustment: Choose between automatic timeframe adjustment or manually set
the indicator's timeframe.
Manual Indicator Timeframe: If manual adjustment is selected, specify the desired timeframe (default: 60 minutes).
Visual Components:
Trend Lines: Continuous lines representing the current trend, color-coded for easy identification (green for bullish, red for bearish, orange for neutral).
Bar Coloring: Bars are colored based on the current trend and its relationship to the AlphaTrend line.
Buy/Sell Triangles: Triangular markers appear on the chart to indicate buy and sell signals.
Power Signals: Larger triangles highlight strong buy and sell opportunities based on multiple confirming factors.
Highlighting: Transparent overlays highlight trending areas to enhance visual clarity.
Alerts:
Stay informed with customizable alerts that notify you of important market movements:
SuperTrend Buy/Sell: Alerts when standard buy or sell signals are generated.
Power Buy/Sell Alerts: Notifications for strong buy or sell signals based on comprehensive conditions.
Trend Direction Change: Alerts when the trend changes from bullish to bearish or vice versa.
How to Use:
Add to Chart: Apply the Power Trend Indicator to your preferred trading chart on TradingView.
Configure Settings: Adjust the input parameters to match your trading style and the timeframe you are analyzing.
Analyze Trends: Observe the trend lines, bar colors, and AlphaTrend line to understand the current market trend.
Follow Signals: Look for buy and sell signals or power signals to identify potential entry and exit points.
Set Alerts: Enable alerts to receive real-time notifications of significant trading opportunities.
Adjust as Needed: Fine-tune the settings based on market conditions and your trading experience.
Important Notes:
Backtesting: While the Power Trend Indicator is built using robust technical analysis principles, it's essential to backtest and validate its performance within your trading strategy.
Market Conditions: The indicator performs best in trending markets. In sideways or highly volatile markets, signal reliability may vary.
Risk Management: Always employ proper risk management techniques when trading based on indicator signals to protect your capital.
Disclaimer:
This indicator is intended for educational purposes only and does not provide financial advice or guarantee future performance. Trading involves risk, and past results are not indicative of future outcomes. Always conduct your own analysis and risk management.
İstanbul StratejisiBB+RSI+OBV kullanarak alım satım stratejisidir.
BB+RSI+OBV kullanarak alım satım stratejisidir.
BB+RSI+OBV kullanarak alım satım stratejisidir.
BB+RSI+OBV kullanarak alım satım stratejisidir.
BB+RSI+OBV kullanarak alım satım stratejisidir.
BB+RSI+OBV kullanarak alım satım stratejisidir.
kezio//@version=5
indicator("Smart Money Concept SMC", overlay=true)
// Configurações do usuário
length = input(20, title="Período para estrutura")
sensitivity = input(2, title="Sensibilidade BOS")
// Cálculo de Highs e Lows
highs = ta.highest(high, length)
lows = ta.lowest(low, length)
// Detecção de Break of Structure (BOS)
BOS_Bullish = ta.crossover(high, ta.highest(high, sensitivity))
BOS_Bearish = ta.crossunder(low, ta.lowest(low, sensitivity))
// Detecção de Change of Character (CHOCH)
CHOCH_Bullish = ta.crossover(high, ta.lowest(low, sensitivity))
CHOCH_Bearish = ta.crossunder(low, ta.highest(high, sensitivity))
// Identificação de Liquidity Grabs
liquidity_grab_bullish = ta.lowest(low, sensitivity) < low and close > open
liquidity_grab_bearish = ta.highest(high, sensitivity) > high and close < open
// Marcação das Zonas de Oferta e Demanda
var float demandZone = na
var float supplyZone = na
if BOS_Bullish
demandZone := ta.lowest(low, sensitivity)
if BOS_Bearish
supplyZone := ta.highest(high, sensitivity)
// Plotando os sinais
plotshape(BOS_Bullish, location=location.belowbar, color=color.green, style=shape.labelup, title="BOS Up")
plotshape(BOS_Bearish, location=location.abovebar, color=color.red, style=shape.labeldown, title="BOS Down")
plotshape(CHOCH_Bullish, location=location.belowbar, color=color.blue, style=shape.triangleup, title="CHOCH Up")
plotshape(CHOCH_Bearish, location=location.abovebar, color=color.orange, style=shape.triangledown, title="CHOCH Down")
plotshape(liquidity_grab_bullish, location=location.belowbar, color=color.purple, style=shape.circle, title="Liquidity Grab Buy")
plotshape(liquidity_grab_bearish, location=location.abovebar, color=color.purple, style=shape.circle, title="Liquidity Grab Sell")
// Desenha zonas institucionais
bgcolor(BOS_Bullish ? color.green : na, transp=90)
bgcolor(BOS_Bearish ? color.red : na, transp=90)
Gaussian Channel Strategy v3.0- Open long position as soon as the gaussian channel is green, the close price is above the high gaussian channel band and when the Stochastic RSI is above 80 or below 20.
- Close long positions when the close price crosses the high gaussian channel band to the downside.
Date range can be adjusted in settings
EMA and SMA Crossover with RSI14 FilteringExplanation of the Script:
Indicators:
EMA 5 and SMA 10: These are the two moving averages used to determine the trend direction.
Buy signal is triggered when EMA 5 crosses above SMA 10.
Sell signal is triggered when EMA 5 crosses below SMA 10.
RSI 14: This is used to filter buy and sell signals.
Buy trades are allowed only if RSI 14 is above 60.
Sell trades are allowed only if RSI 14 is below 50.
Buy Conditions:
The strategy waits for the EMA crossover (EMA 5 crosses above SMA 10).
The strategy checks if RSI 14 is above 60 for confirmation.
If the price is below 60 on RSI 14 at the time of crossover, the strategy will wait until the price crosses above 60 on RSI 14 to initiate the buy.
Sell Conditions:
The strategy waits for the EMA crossover (EMA 5 crosses below SMA 10).
The strategy checks if RSI 14 is below 50 for confirmation.
If the price is above 50 on RSI 14 at the time of crossover, the strategy will wait until the price crosses below 50 on RSI 14 to initiate the sell.
Exit Conditions:
The Buy position is closed if the EMA crossover reverses (EMA 5 crosses below SMA 10) or RSI 14 drops below 50.
The Sell position is closed if the EMA crossover reverses (EMA 5 crosses above SMA 10) or RSI 14 rises above 60.
Plotting:
The script plots the EMA 5, SMA 10, and RSI 14 on the chart for easy visualization.
Horizontal lines are drawn at RSI 60 and RSI 50 levels for reference.
Key Features:
Price Confirmation: The strategy ensures that buy trades are only initiated if RSI 14 crosses above 60, and sell trades are only initiated if RSI 14 crosses below 50. Additionally, price action must cross these RSI levels to confirm the trade.
Reversal Exits: Positions are closed when the EMA crossover or RSI condition reverses.
Backtesting:
Paste this script into the Pine Editor on TradingView to test it with historical data.
You can adjust the EMA, SMA, and RSI lengths based on your preferences.
Let me know if you need further adjustments or clarification!