PROTECTED SOURCE SCRIPT

SRFRZ EMA Crossover with RSI Strategy

173
SRFRZ EMA Crossover with RSI Strategy

1. Overview

Strategy Name: SRFRZ EMA Crossover with RSI Strategy

Summary: A trend-following strategy designed for Indian stock and index markets, operating on any timeframe (optimized for 1H or 4H charts). It combines a 9-period and 21-period EMA crossover with RSI confirmation to identify high-probability long entries during the Indian trading session (9:15 AM–3:25 PM IST). Backtested with a fixed 20% capital allocation per trade, 3% stop loss, and 50% take profit, it aims for consistent returns in trending markets.
Intended Audience: Intermediate traders familiar with EMA and RSI, seeking automated signals for Indian markets.

2. How It Works (Core Logic)
Entry Conditions (Long/Buy Signal):
Primary Trigger: A "Golden Cross" occurs when the 9-period EMA crosses above the 21-period EMA, signaling bullish momentum.
RSI Confirmation: RSI (14-period) must be above 55, or cross above 55, to confirm strong momentum.
Trend Filter: The 9-period EMA must remain above the 21-period EMA for delayed RSI-triggered entries.
Session Filter: Trades are only executed during the Indian market session (9:15 AM–3:25 PM IST, Monday–Friday).


Exit Conditions:
Take Profit (TP): Fixed at 50% above the entry price (e.g., entry at ₹100, TP at ₹150).
Stop Loss (SL): Fixed at 3% below the entry price (e.g., entry at ₹100, SL at ₹97).
Indicator-Based Exit: Close the position if a "Death Cross" occurs (21-period EMA crosses above 9-period EMA).
Position Sizing: Allocates 20% of initial capital (₹100,000 default) per trade, calculated as (initial_capital * 0.20) / entry_price.

3. Key Indicators & Parameters
Primary Indicators:
EMA (9-period): Fast-moving average to capture short-term trends (plotted in blue).
EMA (21-period): Slower-moving average for trend confirmation (plotted in red).
RSI (14-period): Measures momentum, with a threshold of 55 for bullish confirmation (plotted in purple).


Customizable Settings in Pine Script:
initial_capital: Default ₹100,000 (adjust based on your account size).
qty_percent: Default 20% of capital per trade (adjust for risk tolerance).
sl_percent: Default 3% stop loss (adjust for volatility).
tp_percent: Default 50% take profit (adjust for reward targets).
session_time: Default "0915-1525:1234567" (Indian session, adjustable for other markets).
Default Values: Optimized for Indian stocks/indices (e.g., NIFTY 50) on 1H or 4H charts.

Risk Management:
Always use the built-in 3% stop loss.
Avoid trading during major news events (e.g., RBI announcements), as Pine Script cannot filter these.
Risk only 20% of capital per trade to diversify exposure.

Pro Tips:
Combine with support/resistance levels for manual confirmation.
Test on a demo account to validate performance on your chosen asset.
Monitor RSI for overbought conditions (>70) to anticipate reversals.

4. Visuals on Chart
Plotted Indicators:
Blue line: 9-period EMA.
Red line: 21-period EMA.
Purple line: RSI (14-period) in a separate pane.

Trade Signals:
Green triangle (below bar): Long entry.
Red triangle (above bar): Long exit (via TP, SL, or Death Cross).

5. Disclaimer & Notes
Risk Warning: Past performance is not indicative of future results. Trading involves significant risk. This strategy is for educational purposes only and is not financial advice.
Customization: The script is open-source (modify freely). Fork it to add short-selling logic or additional filters.


Note: The strategy avoids trades during non-session hours but cannot filter news events. Manually check economic calendars.

Add the script to your chart and adjust inputs (e.g., capital, TP/SL percentages).
Enable alerts for "Long Entry" and "Long Exit TP/SL" or "EMA Exit" to automate signals.
Optionally, connect to a broker via webhooks for auto-trading (consult your broker’s API).

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。