PROTECTED SOURCE SCRIPT

Nifty scalping 3 minutes

已更新
Overview:

The "Nifty Scalping 3 Minutes" strategy is a uniquely tailored trading system for Nifty Futures traders, with a clear focus on capital preservation, dynamic risk management, and high-probability trade entries. This strategy uses unique combination of standard technical indicators like Jurik Moving Average (JMA), Exponential Moving Average (EMA), and Bollinger Bands, but it truly stands out through its Price-Volume Spike Detection system—a unique mechanism designed to trigger trades only during periods of high momentum and market participation. The strategy also incorporates robust risk management, ensuring that traders minimize losses while maximizing profits. in complete back test range max drawdown is less than 1%

Scalping Approach and Requirements:

The strategy focuses on quick in and out trades, aiming to capture small, quick profits during periods of heightened market activity. For optimal performance, traders should have ₹2,00,000 or more in capital available per trade. The dynamic lot calculation and risk controls require this level of capital to function effectively.
Small, frequent trades are the focus, and the strategy is ideal for traders comfortable with high-frequency executions. Traders with insufficient capital or those not comfortable with frequent trades may find this strategy unsuitable.

Default Properties for Publication:

Initial Capital: ₹2,000,000
Lot Size: 25 contracts (adjusted dynamically based on available margin)
Stop-Loss: Risk per trade capped at 1% of equity.
Slippage and Commission: Realistic values are factored into the backtesting.

Key Feature: Price-Volume Spike Detection

1. Condition: Trades are executed only when there is a significant price spike confirmed by a volume spike. The candle width is calculated by multiplying the price change (difference between the candle's open and close) by the volume, and this result is compared to a 126-period average of both price and volume.
A trade is triggered when the current price-volume spike exceeds this average by a preset volume multiplier (default set at 3). This ensures that both the price change and volume are unusually strong compared to normal market behavior.
2. Reasoning: Many traders fail to incorporate the relationship between price movement and volume effectively. By using this Price-Volume Spike Detection mechanism, the strategy ensures that it only enters trades during periods of strong market momentum when both price and volume confirm a real market move, not just noise or small fluctuations.
The 126-period moving average of volume is chosen specifically because it represents a complete trading session on the 3-minute chart. This ensures that the volume spike is compared against a realistic baseline of daily activity, making the detection more robust and reliable.
The volume multiplier allows flexibility in determining the threshold for a significant spike, enabling users to fine-tune the strategy according to their risk tolerance and market conditions.

Trade Placement Logic:

1. Trend Confirmation with JMA and EMA:
Condition: The strategy will only consider entering a trade when JMA crosses above EMA for a long trade or JMA crosses below EMA for a short trade.
Reasoning: The JMA is used for its low lag and responsiveness, allowing it to capture early trends, while the EMA adds a level of confirmation by weighing recent price action more heavily. This dual confirmation ensures that trades are entered only when a solid trend is in place.
2. Bollinger Bands for Volatility Breakouts:
Condition: In addition to the JMA-EMA crossover, the price must break outside the Bollinger Bands—above the upper band for long trades, or below the lower band for short trades.
Reasoning: Bollinger Bands are a volatility indicator. By requiring a price breakout beyond the bands, the strategy ensures that trades are placed during periods of high volatility, avoiding low-momentum, sideways markets.
3. Volume and Price Confirmation (Price-Volume Spike Detection):
Condition: A trade is only triggered if the price-volume spike condition is met. This ensures that the market move is backed by strong volume and that the price change is significant relative to the recent average activity.
Reasoning: This condition filters out low-volume environments where price movements are more likely to reverse or stall. By waiting for a spike in both price and volume, the strategy ensures that it enters trades during high-momentum periods, where follow-through is more likely.

Exit Logic and Risk Management:

1. Stop-Loss (SL) Placement:
Condition: Upon entering a trade, an initial stop-loss is placed below the candle low for long trades or above the candle high for short trades. This is adjusted if the risk exceeds 1% of total capital.
Reasoning: The stop-loss is placed at a logical level that accounts for recent price action, ensuring that the trade is given room to develop while protecting capital from unexpected market reversals.
2. Profit Target and Partial Profit Booking:
Condition: The first profit target is set at 2.1x the initial risk for long trades, and 2.5x the initial risk for short trades.
Reasoning: The 2.1x risk-reward ratio for long trades provides a solid return while maintaining a conservative risk profile. For short trades, the strategy uses a higher 2.5x risk-reward ratio because market falls tend to be sharper and quicker than rises, allowing for larger profit targets to be reached more reliably.
Partial Profit Booking: Once the first target is hit, 60% of the position is closed to lock in profits. The remaining 40% is left to run with a trailing stop.
3. ATR-Based Trailing Stop:
Condition: Once the first target is hit, the ATR (Average True Range) trailing stop is applied to the remaining position. This dynamically adjusts the stop-loss as the trade moves in a favorable direction.
Reasoning: The trailing stop allows the trade to capture further gains if the trend continues, while protecting profits if the momentum weakens. The ATR ensures that the stop adjusts according to the market's current volatility, providing flexibility and protection.
4. Time-Based Exit:
Condition: If a trade is still open by 3:20 PM, it is automatically closed to avoid end-of-day volatility.
Reasoning: The time-based exit ensures that trades are not held into the often-volatile closing minutes of the market, reducing the risk of unexpected price swings.
Capital and Risk Management:
1. Lot Size Calculation:
Condition: The strategy calculates the number of lots dynamically based on the available margin. It uses only 10% of total equity for each trade, and ensures that the maximum risk per trade does not exceed 1% of total capital.
Reasoning: This ensures that traders are not over-leveraged and that the risk is controlled for each trade. Capital protection is at the core of the strategy, ensuring that even during adverse market conditions, the trader’s capital is preserved.
2. Stop-Loss Protection:
Condition: The stop-loss is designed to ensure that no more than 1% of capital is at risk in any trade.
Reasoning: By limiting risk exposure, the strategy focuses on long-term capital preservation while still allowing for profitable trades in favorable market conditions.
STBT/BTST Facilitation:
1. Feature: The strategy allows traders the option to hold positions overnight, facilitating STBT (Sell Today Buy Tomorrow) and BTST (Buy Today Sell Tomorrow) trades.
Reasoning: Backtests show that holding positions overnight when all trade conditions are still valid can lead to beneficial outcomes. This feature allows traders to take advantage of overnight market movements, providing flexibility beyond intraday trades.

Why This Strategy Stands Out:

Price-Volume Spike Detection: Unlike traditional strategies, this one uniquely focuses on Price-Volume Spike Detection to filter out low-probability trades. By ensuring that both price and volume spikes are present, the strategy guarantees that trades are placed only when there is significant market momentum.

Risk Management with Capital Protection: The strategy strictly limits the risk per trade to 1% of capital, ensuring long-term capital preservation. This is especially important for traders who wish to avoid large drawdowns and prefer a sustainable approach to trading.

2.5x Risk-Reward for Short Trades: Recognizing the sharpness of market declines, the strategy employs a 2.5x risk-reward ratio for short trades, maximizing profits during bearish trends.

Dynamic Exit Strategy: With partial profit booking and ATR-based trailing stops, the strategy is designed to capture gains efficiently while protecting capital through dynamic exit conditions.

Summary of Execution:

Entry: Triggered when JMA crosses EMA, combined with Bollinger Band breakouts and Price-Volume Spike Detection.
Capital Management: Trades are executed with 10% of available capital, and the risk per trade is capped at 1%.
Exit: Trades exit when stop-loss, ATR trailing stop, or time-based exit conditions are met.
Profit Booking: 60% of the position is closed at the first target, with the remainder trailed using an ATR-based stop.
版本注释
Overview
This updated version of the Nifty Scalping 3 Minutes strategy builds on the earlier release by incorporating automated trade execution on the Dhan platform. The strategy allows traders to select fixed lot sizes and set a maximum allowable loss per lot according to their preferences, replacing the previous dynamic lot calculation system. It also corrects previous issues with candle calculations to ensure more accurate execution. Designed for traders who want to automate their futures trading, this strategy focuses on capital preservation and dynamic risk management.

Key Updates:
  1. Automated Trading on Dhan: This version integrates automated order placement on the Dhan platform using custom JSON alert messages, giving traders hands-free execution of trades.
  2. Fixed Lot Calculation: The dynamic lot calculation used in the earlier version has been replaced. Traders now input their preferred lot size directly, offering full control over their position sizing.
  3. Max Loss Per Lot: Traders can set the maximum risk per lot, ensuring that their stop-losses are calculated based on their personal risk appetite. However, it is important to note that while the stop-loss (SL) is calculated based on this input, it only triggers after the current candle closes, which may lead to deviations from the expected loss in volatile conditions.
  4. Corrected Candle Calculation: Candle calculations have been refined to ensure accuracy in trade entries and exits, addressing issues present in earlier versions of the strategy.


How to Use the Strategy:

Custom Inputs:

  • Lot Size: Choose the number of lots to trade per execution. This offers flexibility for traders to adjust their risk based on their account size and market conditions.
  • Max Loss Per Lot: Set the maximum loss you’re willing to incur per lot (e.g., ₹600). The strategy will calculate the stop-loss based on this input. However, actual losses may differ slightly due to the SL being triggered after the candle closes.
  • Partial Profit Booking: Define the percentage at which to book partial profits (e.g., 60%), allowing you to lock in gains while managing the remaining position with a trailing stop.



Strategy Logic:

This version still utilizes the combination of Jurik Moving Average (JMA), Exponential Moving Average (EMA), Bollinger Bands, and a Price-Volume Spike Detection mechanism to identify strong market momentum and execute high-probability trades. It incorporates key conditions to ensure that trades are taken during optimal market conditions:

  • JMA and EMA Crossovers: Trades are initiated based on the crossover of JMA and EMA, ensuring trend alignment.
  • Bollinger Band Breakouts: This strategy waits for price breakouts beyond the Bollinger Bands, ensuring that trades are taken in high-volatility environments.
  • Price-Volume Spike Detection: A trade is only triggered if both price and volume spikes confirm significant market momentum.
  • Entry and Exit Conditions:
  • Long Trades: Triggered when JMA crosses above EMA and additional filters (like Bollinger Band breakouts and volume spikes) are satisfied.
  • Short Trades: Triggered when JMA crosses below EMA with the same filtering conditions for market confirmation.
  • Stop-Losses: Calculated based on the max risk per lot, but SL is triggered only after candle close. This may lead to slight variations in real-world scenarios.
  • Automation and Risk Management:
  • JSON Alert System for Dhan Platform: Orders are automatically executed on the Dhan platform through JSON alert messages. These messages handle multi-leg orders and execute trades based on user-input parameters such as lot size and risk limits.
  • Risk Control: Traders set the maximum allowable loss per lot, ensuring their capital is protected. In addition, partial profits can be booked at specified levels to lock in gains while allowing the remaining position to be trailed for additional profit.


Why Use This Version:
This version builds on the lessons from previous iterations, addressing issues with dynamic lot calculation and candle inaccuracies. It now offers traders more control, clearer risk management, and seamless integration with the Dhan platform for fully automated futures trading. The strategy is ideal for traders looking for a well-tested, robust approach to intraday futures trading, with an emphasis on maintaining capital safety while capturing high-probability market moves.


Disclaimer:

We are not sponsored by Dhan, nor do we have any affiliation, partnership, or relationship with Dhan. This strategy simply integrates with the Dhan platform for automated trading based on user input, but there is no formal link or connection between this strategy and Dhan as a company.
Bands and ChannelsMoving AveragesniftyfuturesniftyindicatorniftyintradayniftyscalpingniftytradeideaniftytradesniftytradesetupVolume

受保护脚本

该脚本是闭源发布的,您可以自由使用它。您可以收藏它以在图表上使用。您无法查看或修改其源代码。

想在图表上使用此脚本?


更多:

免责声明