OPEN-SOURCE SCRIPT

Basic Directional Trading Strategy - Gatsby Traders

מעודכן
Here’s a simple yet effective directional trading strategy using a combination of indicators for trend, momentum, and confirmation. This strategy works well for both stocks and options trading.

Directional Trading Strategy: Trend + Momentum + Confirmation

1. Select a Timeframe

• Short-Term Trading: Use a 5-minute or 15-minute chart for intraday trading.
• Swing Trading: Use a daily chart for trades lasting a few days to weeks.

2. Indicators Used

1. Trend Indicator:
• Moving Averages (EMA): Use a 9-period EMA (short-term) and a 21-period EMA (medium-term).
• Purpose: To identify the trend direction and potential crossovers.
2. Momentum Indicator:
• MACD: Default settings (12, 26, 9).
• Purpose: To confirm momentum and identify trend changes.
3. Confirmation Indicator:
• Relative Strength Index (RSI): Default setting (14).
• Purpose: To identify overbought/oversold conditions or divergences.
4. Volume Indicator (Optional):
• On-Balance Volume (OBV): To confirm the strength of a price move.
• Purpose: Rising OBV during a trend supports its validity.

3. Entry Criteria

• Bullish Trade:
1. The 9 EMA crosses above the 21 EMA, signaling an uptrend.
2. MACD line crosses above the signal line (bullish momentum).
3. RSI is between 40-70 (confirming upward momentum without being overbought).
• Bearish Trade:
1. The 9 EMA crosses below the 21 EMA, signaling a downtrend.
2. MACD line crosses below the signal line (bearish momentum).
3. RSI is between 30-60 (confirming downward momentum without being oversold).

4. Exit Criteria

• Profit Target:
• Set a target based on a fixed risk/reward ratio, such as 2:1.
• Example: If your stop loss is $1, aim for a $2 profit per share.
• Trailing Stop:
• Use the 21 EMA as a trailing stop to ride the trend while locking in profits.
• Momentum Reversal:
• Exit when:
• MACD line crosses below the signal line (for bullish trades).
• MACD line crosses above the signal line (for bearish trades).
• RSI enters extreme levels (above 80 for bullish trades, below 20 for bearish trades).

5. Risk Management

• Position Sizing:
• Risk no more than 1-2% of your total capital per trade.
• Calculate position size based on stop-loss distance and total account size.
• Stop Loss Placement:
• For bullish trades: Place stop below the 21 EMA or recent swing low.
• For bearish trades: Place stop above the 21 EMA or recent swing high.

6. Example Trade Setup

• Stock: XYZ Corp.
• Timeframe: Daily chart.
• Indicators in Use: 9 EMA, 21 EMA, MACD, RSI.

1. Bullish Entry:
• 9 EMA crosses above the 21 EMA.
• MACD line crosses above the signal line.
• RSI is at 55 (not overbought).
• Volume increases, confirming the upward trend.
2. Execution:
• Buy call options (ITM or slightly OTM) or buy the stock outright.
• Set a stop loss below the 21 EMA.
3. Exit:
• Trail the stop loss with the 21 EMA.
• Take profit when RSI nears 80 or MACD gives a bearish crossover.

7. Backtest and Refine

1. Use historical price data to test the strategy.
2. Note win rates and average returns.
3. Adjust EMA periods or MACD settings based on results.
הערות שחרור
Same as the original indicator but does not show the red and green lines at 70 & 30 price marks on charts.
Chart patternsoptionsTrend Analysis

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?


גם על:

כתב ויתור