LIT ConfirmationsThe LIT Confirmations Indicator is a customizable checklist tool designed for traders who follow a structured approach to analyzing charts. This tool allows users to document and track key trading confirmations directly on their TradingView charts, ensuring a systematic and organized workflow for decision-making.
Strategy!
Strategy Tester [Cometreon]The Strategy Tester is a powerful backtesting tool that allows you to evaluate and optimize strategies created with the Strategy Builder or signals generated by the Signal Tester. It offers a comprehensive suite of options for risk management and optimization of trading performance.
Key Features:
Testing strategies on different symbols and timeframes
Advanced risk management with multiple Take Profit and Stop Loss options
Customization of trading sessions and initial capital
Generation of customized alerts for entry, exit, and TP/SL modifications
Technical Details and Customizable Inputs:
Source Entry Long and Short: Select entry conditions for the strategy from the "Signal Tester" or "Strategy Builder".
Source Exit Long and Short: Select exit conditions for the strategy from the "Signal Tester" or "Strategy Builder".
Trading Session: Choose the period in which the strategy will enter positions, selecting from: Months, Days, up to 3 hourly sessions, and the strategy's activity range, i.e., start and end date.
Alert Message: Set custom messages for each type of Alert, such as Entry Long, Exit Short, or Change SL Long
Plot: Choose whether to show Long and Short positions on the chart
Risk Management:
Customize the exits and risk management of your strategy, with a wide range of options including:
Initial Capital: Set the starting capital for the strategy
Quantity: Choose the entry quantity for each type of position, selecting from: Contracts, USD, Percentage of equity, and percentage of initial capital.
Take Profit: Configure up to 4 different Take Profits, choosing each type of level from:
- % : Percentage from the entry price.
- USD : Distance in USD from the entry price.
- Pip : Distance in Pips from the entry price.
- ATR : Set the ATR Take Profit multiplier using the length of the "ATR Period Long".
- Swing : Set the length to calculate the Swing as Take Profit Level
- Risk Reward : Set the Take Profit based on the Risk-Reward of the Stop Loss, vice versa for the Stop Loss (Take Profit or Stop Loss cannot both have the Risk Reward option).
Stop Loss: Set the Stop Loss to reduce the loss in case of defeat, also choosing the type of level as for the "Take Profit".
Break Even: Choose whether to modify the Stop Loss level when the price breaks a certain Take Profit level, you can choose the Stop level, adding or removing (%, USD, or Pip) from the entry level.
Trailing Take Profit: When the price breaks a set price, it allows activating an exit level by subtracting/increasing from the chosen Stop level, the level will continue to update every time the Stop source is updated, for example in Long every time High exceeds the previous one.
Trailing Stop Loss: When the price breaks a set price, it allows activating an exit level by subtracting/increasing from the chosen Stop level, the level will continue to update every time the Stop source is updated, for example in Long every time Low exceeds the previous one.
Exit Before End Session: Allows setting an exit time, for example to exit 1 candle before the end of the daily session.
How to Use The Indicator:
Add the Strategy Tester to the chart
Input signals generated by other TradeLab Beta indicators
Configure risk and capital management settings
Run the strategy backtesting and analyze the results
Optimize the strategy based on the obtained results
Take your trading to the next level with TradeLab Beta's Strategy Tester this powerful backtesting tool and start optimizing your trading strategies today.
Don't waste any more time and visit the link to get access to all Cometreon indicators.
Strategy Builder [Cometreon]The Strategy Builder is an advanced indicator that allows you to create customized trading strategies directly on TradingView. With the ability to define up to five entry conditions and two exit conditions, this tool offers unprecedented flexibility in creating complex strategies.
Key Features:
Creation of strategies with 5 entry conditions and 2 exit conditions
Use of any indicator available on TradingView, including private indicators
Advanced options for signal and condition management
Technical Details and Customizable Inputs:
Activate Signal: Option to activate or deactivate the Long or Short condition
Special Condition:** It's possible to activate a "Special" condition, choosing from:
1) Precedent Signal: Searches for the condition in a previous candle. For example, entering 4 will check the condition in the fourth previous candle.
2) Check Signal: Verifies if the condition has occurred in a certain number of candles. For example, entering 6 will check if the condition has occurred in at least one of the 6 previous candles.
3) Multiple Signal: Checks multiple consecutive conditions. For example, with 3 the condition must occur in all 3 previous candles, unlike the "Check Signal" where a single occurrence is sufficient.
4) Confirm Signal: Checks that the condition has not occurred previously. For example, entering 5 verifies that the condition has not been activated in any of the 5 previous candles.
Source Long and Short: Allows choosing the first value to create the condition, using any indicator on TradingView, including our private indicators with derived signals
Type Long and Short":** Defines the type of condition, with a wide range of intuitive options including:
1) Cross Over Value: Source Long/Short crosses upward the second value.
2) Cross Under Value: Source Long/Short crosses downward the second value.
3) Greater Than: Source Long/Short is greater than the second value.
4) Lower Than: Source Long/Short is less than the second value.
5) Equal To: Source Long/Short is equal to the second value.
6) Increase: Source Long/Short is greater than the previous candle.
7) Decrease: Source Long/Short is less than the previous candle.
8) No Change: Source Long/Short is equal to the previous candle.
9) Change Value: Source Long/Short is different from the previous candle.
Only First: Avoids multiple or repeated signals, excluding a signal if the condition was active in the previous candle.
Type Value: Allows choosing the type of the second value:
1) Normal: allows manually entering a value (for example, 20 or 50).
2) Choose: allows selecting a value from another indicator, as for the first value.
How to Use The Indicator:
Define entry and exit conditions using desired indicators
Configure signal management options for each condition
Test the created strategy directly on the chart or in combination with the Strategy Tester
Unlock the potential of your trading strategies with TradeLab Beta's Strategy Builder start creating customized strategies optimized for your trading goals.
Don't waste any more time and visit the link to get access to all Cometreon indicators.
Signal Tester [Cometreon]Signal Tester is a powerful tool that allows you to analyze and visualize up to 100 historical positions directly on the TradingView chart. This indicator is ideal for quickly testing the effectiveness of trading signals from various sources.
Key Features:
Graphical visualization of entry and exit signals
Support for analysis on different timeframes
Ability to test signals from bots, groups, or personal strategies
Technical Details and Customizable Inputs:
Position Selection : Choose up to 100 recent positions, both long and short, to display signals directly on the chart.
Data Entry : Easily select the date and position type (long/short) in the settings.
How to Use the Indicator:
Enter entry and exit signals in the indicator settings.
Analyze the results directly on the chart.
Add the generated signals to the Strategy Tester to verify their effectiveness.
Start testing your trading signals now with TradeLab Beta's Signal Tester access this powerful tool and take your market analysis to the next level!
Don't waste any more time and visit the link to get access to all Cometreon indicators.
Fractional Accumulation Distribution Strategy🔹 INTRODUCTION:
As traders and investors, we often find ourselves searching for ways to maximize our market positioning—trying to capture the best price, manage risk, and adapt to ever-changing volatility. Through years of working with a variety of traders and investors, a common theme emerged: the most successful market participants were those who accumulated positions strategically over time, rather than relying on one-off, rigid entry points. However, even the best of them struggled to consistently time their entries and exits for optimal results.
That's why I created the Fractional Accumulation/Distribution Strategy (FADS)—an adaptable solution designed to dynamically adjust position sizing and entry points based on changing market conditions, enabling both passive and active market participants to optimize their approach.
The FADS trading strategy combines volatility-based trend detection and adaptive position scaling to maximize profitability across varied market conditions. By using the price ranges from higher timeframes, FADS pinpoints extreme demand and supply zones with a high statistical probability of reversal, making it effective in both high and low volatility environments. By applying adjustable threshold settings, users can focus on meaningful price movements to reduce unnecessary trades. Adaptive position scaling further enhances this approach by adjusting position sizes based on entry level distances, allowing for strategic position building that balances risk and reward in uncertain markets. This systematic scaling begins with smaller positions, expanding as the trend solidifies, creating a refined, robust trading experience.
🔹 FEATURES:
Multi-Timeframe Volatility-Based Trend Detection
Accumulation/Distribution Level Filter
Customizable Period for Highest/Lowest Prices Capture
Adjustable Sensitivity & Frequency in Positioning
Broad control settings of Strategy
Adaptive Position Scaling
🔹 SETTINGS:
Volatility : Determines trading range based on market volatility . Highest range value number of periods.
Factor : Adjusts the width of the Accumulation & Distribution bands separately. The Level Filter feature offers customizable triggering bands, allowing users to fine-tune the initiation point for the Accumulation/Distribution sequence. This flexibility enables traders to align entries more precisely with market conditions, setting optimal thresholds for initiating trade chains, whether in accumulating positions during uptrends or distributing in downtrends.
Lowest : Choose the price source (e.g., Close, Low). Number of bars considered when determining the lowest price level. Selecting the checkbox generate a signal when the price crosses below the previous lowest value for calculating the lowest value used for trade signals.
Highest : Choose the price source (e.g., Close, High). Number of bars considered when determining the highest price levels. Selecting the checkbox generate a signal when the price crosses above the previous highest value for calculating the highest value used for trade signals.
Accumulation Spread : Adjusts the buying frequency sensitivity by setting the distance between entries based on personal risk tolerance. Larger values for less frequent buys; smaller values for more frequent buys.
Distribution Spread : Adjusts the selling frequency sensitivity by setting the distance between exits based on reward preference. Larger values for less frequent sells; smaller values for more frequent sells.
Percentage of Capital Allocation : Sets the portion of total capital used for the initial trade in a strategy. It sets the scale for subsequent trades during accumulation phase.
🔹 APPLICATIONS:
❖ Accumulation and Distribution Phases
Early entries are avoided by initiating accumulation only after a trend reversal is confirmed and price breaks below long-term range.
Position sizes are determined by the distance between consecutive trades, smaller distance results in smaller position sizes and vice versa.
Average position cost is reduced by accumulating larger positions at the lower prices, potentially resulting in improved profitability.
Early exits are avoided by initiating distribution only after trend reversal is confirmed and price breaks above long-term range.
The pace of distribution can be tracked by the violet line that represents average positions during distribution phase
❖ Use Cases (Different than default setting input is used for illustration purposes)
If the starting point of accumulation starts too high for the risk preference, Accumulation Level Filter can be lowered by increasing the 🟢 threshold Factor.
If the starting point of distribution is too low for the reward preference, the Distribution Level Filter can be raised by increasing the 🔴 threshold Factor.
In lower timeframes, positions during the accumulation phase could be purchased at higher levels relative to prior entry positions. To optimize for this, consider extending the period used to capture the lowest prices. Similarly, during the distribution phase, increasing the period for identifying higher prices can improve accuracy.
🔹 Strategy Properties:
Adjusting properties within the script settings is recommended to align with specific accounts and trading platforms, ensuring realistic strategy results.
Balance (default): $100,000
Initial Order Size: 1% of the default balance
Commission: 0.1%
Slippage: 5 Ticks
Backtesting: Backtested using TradingView’s built-in strategy testing tool with default commission rates of 0.1% and slippage of 5 ticks. It reflects average market conditions for Apple Inc. (APPL) on 1-hour timeframe
Disclaimers: Commission and slippage varies with market conditions and brokerage policies. The assumed value may not represent all trading environments.
PAST PERFORMANCE DOESN’T GUARANTEE FUTURE RESULTS!
Disclaimer: Please remember that past performance may not be indicative of future results. Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting. This post and the script don’t provide any financial advice.
This invite-only script is being published as part of my commitment to developing tools that align with TradingView’s community standards. Access requests will be reviewed carefully after the script passes TradingView's moderation process.
Fibonacci ATR Fusion - Strategy [presentTrading]Open-script again! This time is also an ATR-related strategy. Enjoy! :)
If you have any questions, let me know, and I'll help make this as effective as possible.
█ Introduction and How It Is Different
The Fibonacci ATR Fusion Strategy is an advanced trading approach that uniquely integrates Fibonacci-based weighted averages with the Average True Range (ATR) to identify and capitalize on significant market trends.
Unlike traditional strategies that rely on single indicators or static parameters, this method combines multiple timeframes and dynamic volatility measurements to enhance precision and adaptability. Additionally, it features a 4-step Take Profit (TP) mechanism, allowing for systematic profit-taking at various levels, which optimizes both risk management and return potential in long and short market positions.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
The Fibonacci ATR Fusion Strategy utilizes a combination of technical indicators and weighted averages to determine optimal entry and exit points. Below is a breakdown of its key components and operational logic.
🔶 1. Enhanced True Range Calculation
The strategy begins by calculating the True Range (TR) to measure market volatility accurately.
TR = max(High - Low, abs(High - Previous Close), abs(Low - Previous Close))
High and Low: Highest and lowest prices of the current trading period.
Previous Close: Closing price of the preceding trading period.
max: Selects the largest value among the three calculations to account for gaps and limit movements.
🔶 2. Buying Pressure (BP) Calculation
Buying Pressure (BP) quantifies the extent to which buyers are driving the price upwards within a period.
BP = Close - True Low
Close: Current period's closing price.
True Low: The lower boundary determined in the True Range calculation.
🔶 3. Ratio Calculation for Different Periods
To assess the strength of buying pressure relative to volatility, the strategy calculates a ratio over various Fibonacci-based timeframes.
Ratio = 100 * (Sum of BP over n periods) / (Sum of TR over n periods)
n: Length of the period (e.g., 8, 13, 21, 34, 55).
Sum of BP: Cumulative Buying Pressure over n periods.
Sum of TR: Cumulative True Range over n periods.
This ratio normalizes buying pressure, making it comparable across different timeframes.
🔶 4. Weighted Average Calculation
The strategy employs a weighted average of ratios from multiple Fibonacci-based periods to smooth out signals and enhance trend detection.
Weighted Avg = (w1 * Ratio_p1 + w2 * Ratio_p2 + w3 * Ratio_p3 + w4 * Ratio_p4 + Ratio_p5) / (w1 + w2 + w3 + w4 + 1)
w1, w2, w3, w4: Weights assigned to each ratio period.
Ratio_p1 to Ratio_p5: Ratios calculated for periods p1 to p5 (e.g., 8, 13, 21, 34, 55).
This weighted approach emphasizes shorter periods more heavily, capturing recent market dynamics while still considering longer-term trends.
🔶 5. Simple Moving Average (SMA) of Weighted Average
To further smooth the weighted average and reduce noise, a Simple Moving Average (SMA) is applied.
Weighted Avg SMA = SMA(Weighted Avg, m)
- m: SMA period (e.g., 3).
This smoothed line serves as the primary signal generator for trade entries and exits.
🔶 6. Trading Condition Thresholds
The strategy defines specific threshold values to determine optimal entry and exit points based on crossovers and crossunders of the SMA.
Long Condition = Crossover(Weighted Avg SMA, Long Entry Threshold)
Short Condition = Crossunder(Weighted Avg SMA, Short Entry Threshold)
Long Exit = Crossunder(Weighted Avg SMA, Long Exit Threshold)
Short Exit = Crossover(Weighted Avg SMA, Short Exit Threshold)
Long Entry Threshold (T_LE): Level at which a long position is triggered.
Short Entry Threshold (T_SE): Level at which a short position is triggered.
Long Exit Threshold (T_LX): Level at which a long position is exited.
Short Exit Threshold (T_SX): Level at which a short position is exited.
These conditions ensure that trades are only executed when clear trends are identified, enhancing the strategy's reliability.
Previous local performance
🔶 7. ATR-Based Take Profit Mechanism
When enabled, the strategy employs a 4-step Take Profit system to systematically secure profits as the trade moves in the desired direction.
TP Price_1 Long = Entry Price + (TP1ATR * ATR Value)
TP Price_2 Long = Entry Price + (TP2ATR * ATR Value)
TP Price_3 Long = Entry Price + (TP3ATR * ATR Value)
TP Price_1 Short = Entry Price - (TP1ATR * ATR Value)
TP Price_2 Short = Entry Price - (TP2ATR * ATR Value)
TP Price_3 Short = Entry Price - (TP3ATR * ATR Value)
- ATR Value: Calculated using ATR over a specified period (e.g., 14).
- TPxATR: User-defined multipliers for each take profit level.
- TPx_percent: Percentage of the position to exit at each TP level.
This multi-tiered exit strategy allows for partial position closures, optimizing profit capture while maintaining exposure to potential further gains.
█ Trade Direction
The Fibonacci ATR Fusion Strategy is designed to operate in both long and short market conditions, providing flexibility to traders in varying market environments.
Long Trades: Initiated when the SMA of the weighted average crosses above the Long Entry Threshold (T_LE), indicating strong upward momentum.
Short Trades: Initiated when the SMA of the weighted average crosses below the Short Entry Threshold (T_SE), signaling robust downward momentum.
Additionally, the strategy can be configured to trade exclusively in one direction—Long, Short, or Both—based on the trader’s preference and market analysis.
█ Usage
Implementing the Fibonacci ATR Fusion Strategy involves several steps to ensure it aligns with your trading objectives and market conditions.
1. Configure Strategy Parameters:
- Trading Direction: Choose between Long, Short, or Both based on your market outlook.
- Trading Condition Thresholds: Set the Long Entry, Short Entry, Long Exit, and Short Exit thresholds to define when to enter and exit trades.
2. Set Take Profit Levels (if enabled):
- ATR Multipliers: Define how many ATRs away from the entry price each take profit level is set.
- Take Profit Percentages: Allocate what percentage of the position to close at each TP level.
3. Apply to Desired Chart:
- Add the strategy to the chart of the asset you wish to trade.
- Observe the plotted Fibonacci ATR and SMA Fibonacci ATR indicators for visual confirmation.
4. Monitor and Adjust:
- Regularly review the strategy’s performance through backtesting.
- Adjust the input parameters based on historical performance and changing market dynamics.
5. Risk Management:
- Ensure that the sum of take profit percentages does not exceed 100% to avoid over-closing positions.
- Utilize the ATR-based TP levels to adapt to varying market volatilities, maintaining a balanced risk-reward ratio.
█ Default Settings
Understanding the default settings is crucial for optimizing the Fibonacci ATR Fusion Strategy's performance. Here's a precise and simple overview of the key parameters and their effects:
🔶 Key Parameters and Their Effects
1. Trading Direction (`tradingDirection`)
- Default: Both
- Effect: Determines whether the strategy takes both long and short positions or restricts to one direction. Selecting Both allows maximum flexibility, while Long or Short can be used for directional bias.
2. Trading Condition Thresholds
Long Entry (long_entry_threshold = 58.0): Higher values reduce false positives but may miss trades.
Short Entry (short_entry_threshold = 42.0): Lower values capture early short trends but may increase false signals.
Long Exit (long_exit_threshold = 42.0): Exits long positions early, securing profits but potentially cutting trends short.
Short Exit (short_exit_threshold = 58.0): Delays short exits to capture favorable movements, avoiding premature exits.
3. Take Profit Configuration (`useTakeProfit` = false)
- Effect: When enabled, the strategy employs a 4-step TP mechanism to secure profits at multiple levels. By default, it is disabled to allow users to opt-in based on their trading style.
4. ATR-Based Take Profit Multipliers
TP1 (tp1ATR = 3.0): Sets the first TP at 3 ATRs for initial profit capture.
TP2 (tp2ATR = 8.0): Targets larger trends, though less likely to be reached.
TP3 (tp3ATR = 14.0): Optimizes for extreme price moves, seldom triggered.
5. Take Profit Percentages
TP Level 1 (tp1_percent = 12%): Secures 12% at the first TP.
TP Level 2 (tp2_percent = 12%): Exits another 12% at the second TP.
TP Level 3 (tp3_percent = 12%): Closes an additional 12% at the third TP.
6. Weighted Average Parameters
Ratio Periods: Fibonacci-based intervals (8, 13, 21, 34, 55) balance responsiveness.
Weights: Emphasizes recent data for timely responses to market trends.
SMA Period (weighted_avg_sma_period = 3): Smoothens data with minimal lag, balancing noise reduction and responsiveness.
7. ATR Period (`atrPeriod` = 14)
Effect: Sets the ATR calculation length, impacting TP sensitivity to volatility.
🔶 Impact on Performance
- Sensitivity and Responsiveness:
- Shorter Ratio Periods and Higher Weights: Make the weighted average more responsive to recent price changes, allowing quicker trade entries and exits but increasing the likelihood of false signals.
- Longer Ratio Periods and Lower Weights: Provide smoother signals with fewer false positives but may delay trade entries, potentially missing out on significant price moves.
- Profit Taking:
- ATR Multipliers: Higher multipliers set take profit levels further away, targeting larger price movements but reducing the probability of reaching these levels.
- Fixed Percentages: Allocating equal percentages at each TP level ensures consistent profit realization and risk management, preventing overexposure.
- Trade Direction Control:
- Selecting Specific Directions: Restricting trades to Long or Short can align the strategy with market trends or personal biases, potentially enhancing performance in trending markets.
- Risk Management:
- Take Profit Percentages: Dividing the position into smaller percentages at multiple TP levels helps lock in profits progressively, reducing risk and allowing the remaining position to ride further trends.
- Market Adaptability:
- Weighted Averages and ATR: By combining multiple timeframes and adjusting to volatility, the strategy adapts to different market conditions, maintaining effectiveness across various asset classes and timeframes.
---
If you want to know more about ATR, can also check "SuperATR 7-Step Profit".
Enjoy trading.
Stoch RSI and RSI Buy/Sell Signals with MACD Trend FilterDescription of the Indicator
This Pine Script is designed to provide traders with buy and sell signals based on the combination of Stochastic RSI, RSI, and MACD indicators, enhanced by the confirmation of candle colors. The primary goal is to facilitate informed trading decisions in various market conditions by utilizing different indicators and their interactions. The script allows customization of various parameters, providing flexibility for traders to adapt it to their specific trading styles.
Usefulness
This indicator is not just a mashup of existing indicators; it integrates the functionality of multiple momentum and trend-detection methods into a cohesive trading tool. The combination of Stochastic RSI, RSI, and MACD offers a well-rounded approach to analyzing market conditions, allowing traders to identify entry and exit points effectively. The inclusion of color-coded signals (strong vs. weak) further enhances its utility by providing visual cues about the strength of the signals.
How to Use This Indicator
Input Settings: Adjust the parameters for the Stochastic RSI, RSI, and MACD to fit your trading style. Set the overbought/oversold levels according to your risk tolerance.
Signal Colors:
Strong Buy Signal: Indicated by a green label and confirmed by a green candle (close > open).
Weak Buy Signal: Indicated by a blue label and confirmed by a green candle (close > open).
Strong Sell Signal: Indicated by a red label and confirmed by a red candle (close < open).
Weak Sell Signal: Indicated by an orange label and confirmed by a red candle (close < open).
Example Trading Strategy Using This Indicator
To effectively use this indicator as part of your trading strategy, follow these detailed steps:
Setup:
Timeframe : Select a timeframe that aligns with your trading style (e.g., 15-minute for intraday, 1-hour for swing trading, or daily for longer-term positions).
Indicator Settings : Customize the Stochastic RSI, RSI, and MACD parameters to suit your trading approach. Adjust overbought/oversold levels to match your risk tolerance.
Strategy:
1. Strong Buy Entry Criteria :
Wait for a strong buy signal (green label) when the RSI is at or below the oversold level (e.g., ≤ 35), indicating a deeply oversold market. Confirm that the MACD shows a decreasing trend (bearish momentum weakening) to validate a potential reversal. Ensure the current candle is green (close > open) if candle color confirmation is enabled.
Example Use : On a 1-hour chart, if the RSI drops below 35, MACD shows three consecutive bars of decreasing negative momentum, and a green candle forms, enter a buy position. This setup signals a robust entry with strong momentum backing it.
2. Weak Buy Entry Criteria :
Monitor for weak buy signals (blue label) when RSI is above the oversold level but still below the neutral (e.g., between 36 and 50). This indicates a market recovering from an oversold state but not fully reversing yet. These signals can be used for early entries with additional confirmations, such as support levels or higher timeframe trends.
Example Use : On the same 1-hour chart, if RSI is at 45, the MACD shows momentum stabilizing (not necessarily negative), and a green candle appears, consider a partial or cautious entry. Use this as an early warning for a potential bullish move, especially when higher timeframe indicators align.
3. Strong Sell Entry Criteria :
Look for a strong sell signal (red label) when RSI is at or above the overbought level (e.g., ≥ 65), signaling a strong overbought condition. The MACD should show three consecutive bars of increasing positive momentum to indicate that the bullish trend is weakening. Ensure the current candle is red (close < open) if candle color confirmation is enabled.
Example Use : If RSI reaches 70, MACD shows increasing momentum that starts to level off, and a red candle forms on a 1-hour chart, initiate a short position with a stop loss set above recent resistance. This is a high-confidence signal for potential price reversal or pullback.
4. Weak Sell Entry Criteria :
Use weak sell signals (orange label) when RSI is between the neutral and overbought levels (e.g., between 50 and 64). These can indicate potential short opportunities that might not yet be fully mature but are worth monitoring. Look for other confirmations like resistance levels or trendline touches to strengthen the signal.
Example Use : If RSI reads 60 on a 1-hour chart, and the MACD shows slight positive momentum with signs of slowing down, place a cautious sell position or scale out of existing long positions. This setup allows you to prepare for a possible downtrend.
Trade Management:
Stop Loss : For buy trades, place stop losses below recent swing lows. For sell trades, set stops above recent swing highs to manage risk effectively.
Take Profit : Target nearby resistance or support levels, apply risk-to-reward ratios (e.g., 1:2), or use trailing stops to lock in profits as price moves in your favor.
Confirmation : Align these signals with broader trends on higher timeframes. For example, if you receive a weak buy signal on a 15-minute chart, check the 1-hour or daily chart to ensure the overall trend is not bearish.
Real-World Example: Imagine trading on a 15-minute chart :
For a buy:
A strong buy signal (green) appears when the RSI dips to 32, MACD shows declining bearish momentum, and a green candle forms. Enter a buy position with a stop loss below the most recent support level.
Alternatively, a weak buy signal (blue) appears when RSI is at 47. Use this as a signal to start monitoring the market closely or enter a smaller position if other indicators (like support and volume analysis) align.
For a sell:
A strong sell signal (red) with RSI at 72 and a red candle signals to short with conviction. Place your stop loss just above the last peak.
A weak sell signal (orange) with RSI at 62 might prompt caution but can still be acted on if confirmed by declining volume or touching a resistance level.
These strategies show how to blend both strong and weak signals into your trading for more nuanced decision-making.
Technical Analysis of the Code
1. Stochastic RSI Calculation:
The script calculates the Stochastic RSI (stochRsiK) using the RSI as input and smooths it with a moving average (stochRsiD).
Code Explanation : ta.stoch(rsi, rsi, rsi, stochLength) computes the Stochastic RSI, and ta.sma(stochRsiK, stochSmoothing) applies smoothing.
2. RSI Calculation :
The RSI is computed over a user-defined period and checks for overbought or oversold conditions.
Code Explanation : rsi = ta.rsi(close, rsiLength) calculates RSI values.
3. MACD Trend Filter :
MACD is calculated with fast, slow, and signal lengths, identifying trends via three consecutive bars moving in the same direction.
Code Explanation : = ta.macd(close, macdLengthFast, macdLengthSlow, macdSignalLength) sets MACD values. Conditions like macdLine < macdLine confirm trends.
4. Buy and Sell Conditions :
The script checks Stochastic RSI, RSI, and MACD values to set buy/sell flags. Candle color filters further confirm valid entries.
Code Explanation : buyConditionMet and sellConditionMet logically check all conditions and toggles (enableStochCondition, enableRSICondition, etc.).
5. Signal Flags and Confirmation :
Flags track when conditions are met and ensure signals only appear on appropriate candle colors.
Code Explanation : Conditional blocks (if statements) update buyFlag and sellFlag.
6. Labels and Alerts :
The indicator plots "BUY" or "SELL" labels with the RSI value when signals trigger and sets alerts through alertcondition().
Code Explanation : label.new() displays the signal, color-coded for strength based on RSI.
NOTE : All strategies can be enabled or disabled in the settings, allowing traders to customize the indicator to their preferences and trading styles.
MMRI Chart (Primary)The **Mannarino Market Risk Indicator (MMRI)** is a financial risk measurement tool created by financial strategist Gregory Mannarino. It’s designed to assess the risk level in the stock market and economy based on current bond market conditions and the strength of the U.S. dollar. The MMRI considers factors like the U.S. 10-Year Treasury Yield and the Dollar Index (DXY), which indicate investor confidence in government debt and the dollar's purchasing power, respectively.
The formula for MMRI uses the 10-Year Treasury Yield multiplied by the Dollar Index, divided by a constant (1.61) to normalize the risk measure. A higher MMRI score suggests increased market risk, while a lower score indicates more stability. Mannarino has set certain thresholds to interpret the MMRI score:
- **Below 100**: Low risk.
- **100–200**: Moderate risk.
- **200–300**: High risk.
- **Above 300**: Extreme risk, indicating market instability and potential downturns.
This tool aims to provide insight into economic conditions that may affect asset classes like stocks, bonds, and precious metals. Mannarino often updates MMRI scores and risk analyses in his public market updates.
Z-Score RSI StrategyOverview
The Z-Score RSI Indicator is an experimental take on momentum analysis. By applying the Relative Strength Index (RSI) to a Z-score of price data, it measures how far prices deviate from their mean, scaled by standard deviation. This isn’t your traditional use of RSI, which is typically based on price data alone. Nevertheless, this unconventional approach can yield unique insights into market trends and potential reversals.
Theory and Interpretation
The RSI calculates the balance between average gains and losses over a set period, outputting values from 0 to 100. Typically, people look at the overbought or oversold levels to identify momentum extremes that might be likely to lead to a reversal. However, I’ve often found that RSI can be effective for trend-following when observing the crossover of its moving average with the midline or the crossover of the RSI with its own moving average. These crossovers can provide useful trend signals in various market conditions.
By combining RSI with a Z-score of price, this indicator estimates the relative strength of the price’s distance from its mean. Positive Z-score trends may signal a potential for higher-than-average prices in the near future (scaled by the standard deviation), while negative trends suggest the opposite. Essentially, when the Z-Score RSI indicates a trend, it reflects that the Z-score (the distance between the average and current price) is likely to continue moving in the trend’s direction. Generally, this signals a potential price movement, though it’s important to note that this could also occur if there’s a shift in the mean or standard deviation, rather than a meaningful change in price itself.
While the Z-Score RSI could be an insightful addition to a comprehensive trading system, it should be interpreted carefully. Mean shifts may validate the indicator’s predictions without necessarily indicating any notable price change, meaning it’s best used in tandem with other indicators or strategies.
Recommendations
Before putting this indicator to use, conduct thorough backtesting and avoid overfitting. The added parameters allow fine-tuning to fit various assets, but be careful not to optimize purely for the highest historical returns. Doing so may create an overly tailored strategy that performs well in backtests but fails in live markets. Keep it balanced and look for robust performance across multiple scenarios, as overfitting is likely to lead to disappointing real-world results.
Equilibrium Candles + Pattern [Honestcowboy]The Equilibrium Candles is a very simple trend continuation or reversal strategy depending on your settings.
How an Equilibrium Candle is created:
We calculate the equilibrium by measuring the mid point between highest and lowest point over X amount of bars back.
This now is the opening price for each bar and will be considered a green bar if price closes above equilibrium.
Bars get shaded by checking if regular candle close is higher than open etc. So you still see what the normal candles are doing.
Why are they useful?
The equilibrium is calculated the same as Baseline in Ichimoku Cloud. Which provides a point where price is very likely to retrace to. This script visualises the distance between close and equilibrium using candles. To provide a clear visual of how price relates to this equilibrium point.
This also makes it more straightforward to develop strategies based on this simple concept and makes the trader purely focus on this relationship and not think of any Ichimoku Cloud theories.
Script uses a very simple pattern to enter trades:
It will count how many candles have been one directional (above or below equilibrium)
Based on user input after X candles (7 by default) script shows we are in a trend (bg colors)
On the first pullback (candle closes on other side of equilibrium) it will look to enter a trade.
Places a stop order at the high of the candle if bullish trend or reverse if bearish trend.
If based on user input after X opposite candles (2 by default) order is not filled will cancel it and look for a new trend.
Use Reverse Logic:
There is a use reverse logic in the settings which on default is turned on. It will turn long orders into short orders making the stop orders become limit orders. It will use the normal long SL as target for the short. And TP as stop for the short. This to provide a means to reverse equity curve in case your pair is mean reverting by nature instead of trending.
ATR Calculation:
Averaged ATR, which is using ta.percentile_nearest_rank of 60% of a normal ATR (14 period) over the last 200 bars. This in simple words finds a value slightly above the mean ATR value over that period.
Big Candle Exit Logic:
Using Averaged ATR the script will check if a candle closes X times that ATR from the equilibrium point. This is then considered an overextension and all trades are closed.
This is also based on user input.
Simple trade management logic:
Checks if the user has selected to use TP and SL, or/and big candle exit.
Places a TP and SL based on averaged ATR at a multiplier based on user Input.
Closes trade if there is a Big Candle Exit or an opposite direction signal from indicator.
Script can be fully automated to MT5
There are risk settings in % and symbol settings provided at the bottom of the indicator. The script will send alert to MT5 broker trying to mimic the execution that happens on tradingview. There are always delays when using a bridge to MT5 broker and there could be errors so be mindful of that. This script sends alerts in format so they can be read by tradingview.to which is a bridge between the platforms.
Use the all alert function calls feature when setting up alerts and make sure you provide the right webhook if you want to use this approach.
There is also a simple buy and sell alert feature if you don't want to fully automate but still get alerts. These are available in the dropdown when creating an alert.
Almost every setting in this indicator has a tooltip added to it. So if any setting is not clear hover over the (?) icon on the right of the setting.
The backtest uses a 4% exposure per trade and a 10 point slippage. I did not include a commission cause I'm not personaly aware what the commissions are on most forex brokers. I'm only aware of minimal slippage to use in a backtest. Trading conditions vary per broker you use so always pay close attention to trading costs on your own broker. Use a full automation at your own risk and discretion and do proper backtesting.
SuperATR 7-Step Profit - Strategy [presentTrading] Long time no see!
█ Introduction and How It Is Different
The SuperATR 7-Step Profit Strategy is a multi-layered trading approach that integrates adaptive Average True Range (ATR) calculations with momentum-based trend detection. What sets this strategy apart is its sophisticated 7-step take-profit mechanism, which combines four ATR-based exit levels and three fixed percentage levels. This hybrid approach allows traders to dynamically adjust to market volatility while systematically capturing profits in both long and short market positions.
Traditional trading strategies often rely on static indicators or single-layered exit strategies, which may not adapt well to changing market conditions. The SuperATR 7-Step Profit Strategy addresses this limitation by:
- Using Adaptive ATR: Enhances the standard ATR by making it responsive to current market momentum.
- Incorporating Momentum-Based Trend Detection: Identifies stronger trends with higher probability of continuation.
- Employing a Multi-Step Take-Profit System: Allows for gradual profit-taking at predetermined levels, optimizing returns while minimizing risk.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
The strategy revolves around detecting strong market trends and capitalizing on them using an adaptive ATR and momentum indicators. Below is a detailed breakdown of each component of the strategy.
🔶 1. True Range Calculation with Enhanced Volatility Detection
The True Range (TR) measures market volatility by considering the most significant price movements. The enhanced TR is calculated as:
TR = Max
Where:
High and Low are the current bar's high and low prices.
Previous Close is the closing price of the previous bar.
Abs denotes the absolute value.
Max selects the maximum value among the three calculations.
🔶 2. Momentum Factor Calculation
To make the ATR adaptive, the strategy incorporates a Momentum Factor (MF), which adjusts the ATR based on recent price movements.
Momentum = Close - Close
Stdev_Close = Standard Deviation of Close over n periods
Normalized_Momentum = Momentum / Stdev_Close (if Stdev_Close ≠ 0)
Momentum_Factor = Abs(Normalized_Momentum)
Where:
Close is the current closing price.
n is the momentum_period, a user-defined input (default is 7).
Standard Deviation measures the dispersion of closing prices over n periods.
Abs ensures the momentum factor is always positive.
🔶 3. Adaptive ATR Calculation
The Adaptive ATR (AATR) adjusts the traditional ATR based on the Momentum Factor, making it more responsive during volatile periods and smoother during consolidation.
Short_ATR = SMA(True Range, short_period)
Long_ATR = SMA(True Range, long_period)
Adaptive_ATR = /
Where:
SMA is the Simple Moving Average.
short_period and long_period are user-defined inputs (defaults are 3 and 7, respectively).
🔶 4. Trend Strength Calculation
The strategy quantifies the strength of the trend to filter out weak signals.
Price_Change = Close - Close
ATR_Multiple = Price_Change / Adaptive_ATR (if Adaptive_ATR ≠ 0)
Trend_Strength = SMA(ATR_Multiple, n)
🔶 5. Trend Signal Determination
If (Short_MA > Long_MA) AND (Trend_Strength > Trend_Strength_Threshold):
Trend_Signal = 1 (Strong Uptrend)
Elif (Short_MA < Long_MA) AND (Trend_Strength < -Trend_Strength_Threshold):
Trend_Signal = -1 (Strong Downtrend)
Else:
Trend_Signal = 0 (No Clear Trend)
🔶 6. Trend Confirmation with Price Action
Adaptive_ATR_SMA = SMA(Adaptive_ATR, atr_sma_period)
If (Trend_Signal == 1) AND (Close > Short_MA) AND (Adaptive_ATR > Adaptive_ATR_SMA):
Trend_Confirmed = True
Elif (Trend_Signal == -1) AND (Close < Short_MA) AND (Adaptive_ATR > Adaptive_ATR_SMA):
Trend_Confirmed = True
Else:
Trend_Confirmed = False
Local Performance
🔶 7. Multi-Step Take-Profit Mechanism
The strategy employs a 7-step take-profit system
█ Trade Direction
The SuperATR 7-Step Profit Strategy is designed to work in both long and short market conditions. By identifying strong uptrends and downtrends, it allows traders to capitalize on price movements in either direction.
Long Trades: Initiated when the market shows strong upward momentum and the trend is confirmed.
Short Trades: Initiated when the market exhibits strong downward momentum and the trend is confirmed.
█ Usage
To implement the SuperATR 7-Step Profit Strategy:
1. Configure the Strategy Parameters:
- Adjust the short_period, long_period, and momentum_period to match the desired sensitivity.
- Set the trend_strength_threshold to control how strong a trend must be before acting.
2. Set Up the Multi-Step Take-Profit Levels:
- Define ATR multipliers and fixed percentage levels according to risk tolerance and profit goals.
- Specify the percentage of the position to close at each level.
3. Apply the Strategy to a Chart:
- Use the strategy on instruments and timeframes where it has been tested and optimized.
- Monitor the positions and adjust parameters as needed based on performance.
4. Backtest and Optimize:
- Utilize TradingView's backtesting features to evaluate historical performance.
- Adjust the default settings to optimize for different market conditions.
█ Default Settings
Understanding default settings is crucial for optimal performance.
Short Period (3): Affects the responsiveness of the short-term MA.
Effect: Lower values increase sensitivity but may produce more false signals.
Long Period (7): Determines the trend baseline.
Effect: Higher values reduce noise but may delay signals.
Momentum Period (7): Influences adaptive ATR and trend strength.
Effect: Shorter periods react quicker to price changes.
Trend Strength Threshold (0.5): Filters out weaker trends.
Effect: Higher thresholds yield fewer but stronger signals.
ATR Multipliers: Set distances for ATR-based exits.
Effect: Larger multipliers aim for bigger moves but may reduce hit rate.
Fixed TP Levels (%): Control profit-taking on smaller moves.
Effect: Adjusting these levels affects how quickly profits are realized.
Exit Percentages: Determine how much of the position is closed at each TP level.
Effect: Higher percentages reduce exposure faster, affecting risk and reward.
Adjusting these variables allows you to tailor the strategy to different market conditions and personal risk preferences.
By integrating adaptive indicators and a multi-tiered exit strategy, the SuperATR 7-Step Profit Strategy offers a versatile tool for traders seeking to navigate varying market conditions effectively. Understanding and adjusting the key parameters enables traders to harness the full potential of this strategy.
Oscillator Price Divergence & Trend Strategy (DPS) // AlgoFyreThe Oscillator Price Divergence & Trend Strategy (DPS) strategy combines price divergence and trend indicators for trend trading. It uses divergence conditions to identify entry points and a trend source for directional bias. The strategy incorporates risk management through dynamic position sizing based on a fixed risk amount. It allows for both long and short positions with customizable stop-loss and take-profit levels. The script includes visualization options for entry, stop-loss, and take-profit levels, enhancing trade analysis.
TABLE OF CONTENTS
🔶 ORIGINALITY
🔸Divergence-Trend Combination
🔸Dynamic Position Sizing
🔸Customizable Risk Management
🔶 FUNCTIONALITY
🔸Indicators
🞘 Trend Indicator
🞘 Oscillator Source
🔸Conditions
🞘 Long Entry
🞘 Short Entry
🞘 Take Profit
🞘 Stop Loss
🔶 INSTRUCTIONS
🔸Adding the Strategy to the Chart
🔸Configuring the Strategy
🔸Backtesting and Practice
🔸Market Awareness
🔸Visual Customization
🔶 CONCLUSION
▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅
🔶 ORIGINALITY The Divergence Trend Trading with Dynamic Position Sizing strategy uniquely combines price divergence indicators with trend analysis to optimize entry and exit points. Unlike static trading strategies, it employs dynamic position sizing based on a fixed risk amount, ensuring consistent risk management. This approach allows traders to adapt to varying market conditions by adjusting position sizes according to predefined risk parameters, enhancing both flexibility and control in trading decisions. The strategy's integration of customizable stop-loss and take-profit levels further refines its risk management capabilities, making it a robust tool for both trending and volatile markets.
🔸Divergence-Trend Combination By combining trend direction with divergence conditions, the strategy enhances the accuracy of entry signals, aligning trades with prevailing market trends.
🔸Dynamic Position Sizing This strategy calculates position sizes dynamically, based on a fixed risk amount, allowing traders to maintain consistent risk exposure across trades.
🔸Customizable Risk Management Traders can set flexible risk-reward ratios and adjust stop-loss and take-profit levels, tailoring the strategy to their risk tolerance and market conditions.
🔶 FUNCTIONALITY The Divergence Trend Trading with Dynamic Position Sizing strategy leverages a combination of trend indicators and price and oscillator divergences to identify optimal trading opportunities. This strategy is designed to capitalize on medium to long-term price movements and works best on h1, h4 or D1 timeframes. It allows traders to manage risk effectively while taking advantage of both long and short positions.
🔸Indicators 🞘 Trend Indicator: A long trend is used to determine market direction, ensuring trades align with prevailing trends.
Recommendation: We recommend using the Adaptive MAs (Hurst, CVaR, Fractal) // AlgoFyre indicator with the following settings for trend detection. However, you can use any trend indicator that suits your trading style, e.g. an EMA 200.
🞘 Oscillator Source: The oscillator source is used for momentum price divergence identification. Any momentum oscillator can be used, e.g. RSI, Stochastic etc. A good oscillator is the Stochastic with the following settings:
🔸Conditions 🞘 Long Entry: A long entry condition is met if price closes above the trend AND selected divergence conditions are met, e.g. regular bullish divergence with a 10 bar lookback period with the divergence being below the 50 point mean. If the info table shows all 3 columns in the same color, the entry conditions are met and a position is opened.
🞘 Short Entry: A short entry condition is met if price closes below the trend AND selected divergence conditions are met, e.g. regular bearish divergence with a 10 bar lookback period with the divergence being above the 50 point mean.
🞘 Take Profit: Take Profit is determined by the Risk to Reward Ratio settings depending on the price distance between the entry price and the stop loss price, e.g. if stop loss is 1% away from entry and Risk Reward Ratio is 3:1 then Take Profit will be set at 3% from entry.
🞘 Stop Loss: Stop loss is a fixed level away from the trend source. For long positions, stop loss is set below the trend, and for short positions, above the trend.
🔶 INSTRUCTIONS The Divergence Trend Trading with Dynamic Position Sizing strategy can be set up by adding it to your TradingView chart and configuring parameters such as the oscillator source, trend source, and risk management settings. This strategy is designed to capitalize on short-term price movements by dynamically adjusting position sizes based on predefined risk parameters. Enhance the accuracy of signals by combining this strategy with additional indicators like trend-following or momentum-based tools. Adjust settings to better manage risk and optimize entry and exit points.
🔸Adding the Strategy to the Chart:
Go to your TradingView chart.
Click on the "Indicators" button at the top.
Search for "Divergence Trend Trading with Dynamic Position Sizing // AlgoFyre" in the indicators list.
Click on the strategy to add it to your chart.
🔸Configuring the Strategy:
Open the strategy settings by clicking on the gear icon next to its name on the chart.
Oscillator Source: Select the source for the oscillator. An oscillator like Stochastic needs to be attached to the chart already in order to be used as an oscillator source to be selectable.
Trend Source: Choose the trend source to determine market direction. A trend indicator like Adaptive MAs (Hurst, CVaR, Fractal) // AlgoFyre needs to be attached to the chart already in order to be used as a trend source to be selectable.
Stop Loss Percentage: Set the stop loss distance from the trend source as a percentage.
Risk/Reward Ratio: Define the desired risk/reward ratio for trades.
🔸Backtesting and Practice:
Backtest the strategy on historical data to understand how it performs in various market environments.
Practice using the strategy on a demo account before implementing it in live trading.
🔸Market Awareness:
Keep an eye on market news and events that might cause extreme price movements. The strategy reacts to price data and might not account for news-driven events that can cause large deviations.
🔸Visual Customization Visualization Settings: Customize the display of entry price, take profit, and stop loss levels.
Color Settings: Switch to the AlgoFyre theme or set custom colors for bullish, bearish, and neutral states.
Table Settings: Enable or disable the information table and adjust its position.
🔶 CONCLUSION
The Divergence Trend Trading with Dynamic Position Sizing strategy provides a robust framework for capitalizing on short-term market trends by combining price divergence with dynamic position sizing. This strategy leverages divergence conditions to identify entry points and utilizes a trend source for directional bias, ensuring trades align with prevailing market conditions. By incorporating dynamic position sizing based on a fixed risk amount, traders can effectively manage risk and adapt to varying market conditions. The strategy's customizable stop-loss and take-profit levels further enhance its risk management capabilities, making it a versatile tool for both trending and volatile markets. With its strategic blend of technical indicators and risk management, the Divergence Trend Trading strategy offers traders a comprehensive approach to optimizing trade execution and maximizing potential returns.
NNFX RSI EMA FVMA MACD ALGOThis Pine Script introduces a cutting-edge trading strategy that seamlessly integrates multiple technical indicators—namely, the Flexible Variable Moving Average ( FVMA ), Relative Strength Index ( RSI ), Moving Average Convergence Divergence ( MACD ), and Exponential Moving Average ( EMA )—to deliver a sophisticated trading experience. This script stands out due to its comprehensive approach, robust risk management, and the inclusion of crucial data tables for various timeframes, making it an invaluable tool for traders seeking to enhance their market performance.
Originality of the Strategy:
The originality of this script lies in its unique combination of multiple powerful indicators, enabling traders to benefit from diverse perspectives on market dynamics. This mashup enhances decision-making processes, providing multiple layers of confirmation for trade entries and exits. The strategy is designed to offer an innovative solution for traders looking to improve their performance through well-defined rules and a solid framework.
Flexible Variable Moving Average (FVMA):
The FVMA adapts dynamically to market conditions, offering a more responsive trend line than traditional moving averages. This flexibility allows for quick identification of trends and reversals, crucial for fast-paced trading environments.
Exponential Moving Average (EMA):
By giving greater weight to recent price data, the EMA enhances sensitivity to price changes, allowing for more accurate entries and exits when used alongside the FVMA. This combination maximizes the effectiveness of the strategy in identifying optimal trading opportunities.
Relative Strength Index (RSI):
The RSI helps identify overbought or oversold conditions, integrating seamlessly with other indicators to enhance the strategy's ability to pinpoint potential reversal points. This aspect of the strategy ensures that traders can make informed decisions based on market momentum.
Moving Average Convergence Divergence (MACD):
The MACD serves as an essential confirmation tool, providing insights into trend strength and momentum. This enhances the accuracy of entry and exit signals, allowing traders to make more informed decisions based on robust technical analysis.
Multi-Take Profit (TP) and Stop Loss (SL) Levels:
The strategy supports multiple TPs, allowing traders to lock in profits at various levels while effectively managing risk through a robust SL system. This flexibility caters to diverse trading styles and risk profiles, ensuring that the strategy can adapt to individual trader needs.
Default Properties:
Take Profit Levels: TP1 is set to 2.0, and TP2 is set to 2.9, which is designed to enhance profit potential while maintaining a solid risk-reward ratio.
Stop Loss: A SL is set at 2% of the 5% account balance, which helps to preserve capital and manage risk effectively, adhering to the guideline of not risking more than 5-10% of the account balance per trade.
Labeling System for Exits: Automatic labeling of TP and SL exits on the chart provides clear visualization of trading outcomes. This feature supports informed decision-making and performance tracking, aligning with the guideline of providing transparent results.
Custom Alerts System:
The inclusion of customizable alerts for trade entries, exits, and SL/TP hits keeps traders informed in real-time, enabling prompt actions without constant market monitoring. This is crucial for effective trade management and helps traders respond quickly to market changes.
API Boxes for Automated Trading:
The strategy features API boxes, allowing traders to set up automated trading based on indicator signals. This functionality enables seamless integration with trading platforms, enhancing efficiency and streamlining the trading process, which is particularly valuable for traders looking to optimize their execution.
Data Tables for Enhanced Analysis:
The script includes data tables displaying critical insights across various timeframes: 2-hour, daily, weekly, and monthly. These tables provide a comprehensive overview of market conditions, allowing traders to analyze trends and make informed decisions based on a broad spectrum of data. By leveraging this information, traders can identify high-probability setups and align their strategies with prevailing market trends, significantly increasing their chances of success.
Default Properties:
Initial Capital: £1,000, ensuring a realistic starting point for traders.
Risk per Trade: 5% of the account balance, promoting sustainable trading practices.
Commission: 0.1%, reflecting realistic transaction costs that traders may encounter.
Slippage: 1%, accounting for potential market volatility during trade execution.
Take Profit Levels:
TP1: 2.0
TP2: 2.9
Stop Loss (SL): 2% of the 5% account balance, which is well within acceptable risk parameters.
Compliance with TradingView Guidelines:
This script fully complies with TradingView's guidelines, specifically:
Strategy Results:
The strategy is designed to publish backtesting results that do not mislead traders. The realistic parameters outlined in the default properties ensure that traders have a clear understanding of potential outcomes.
The dataset used for backtesting has sufficient trades to produce a reliable sample size, aligning with the guideline of ideally having more than 100 trades.
Any deviations from recommended practices are justified in the script description, ensuring transparency and adherence to best practices.
The script explains the default properties in detail, providing a thorough understanding of how these settings influence performance.
Why This Script is Worth Paying For:
This Pine Script offers an unparalleled trading experience through its unique combination of technical indicators, comprehensive trade management features, and detailed data tables for multiple timeframes. Here are compelling reasons to invest in this strategy:
Holistic Approach: The integration of multiple indicators ensures a well-rounded perspective on market conditions, increasing the likelihood of successful trades.
Advanced Risk Management: The flexibility of multiple TPs and SLs empowers traders to tailor their risk profiles according to individual strategies, enhancing overall profitability.
Automated Trading Capability: The inclusion of API boxes for automated trading streamlines execution, allowing traders to capitalize on opportunities without the need for manual intervention.
Comprehensive Data Analysis: The detailed data tables provide invaluable insights across different timeframes, enabling traders to make informed decisions based on robust market analysis.
In summary, this innovative Pine Script represents a powerful tool designed to empower traders at all levels. Its originality, synergistic functionality, and comprehensive features create a dynamic and effective trading environment, justifying its value and positioning it as a must-have for anyone serious about achieving consistent trading success.
Support Resistance Pivot EMA Scalp Strategy [Mauserrifle]A strategy that creates signals based on: pivots, EMA 9+20, RSI, ATR, VWAP, wicks and volume.
The strategy is developed as a helper for quick long option scalping. This strategy is primarily designed for intraday trading on the 2m SPY chart with extended hours. However, users can adapt it for use on different symbols and timeframes. These signals are meant as a helper rather than fully automated trading bots.
One of the key elements is its pivot-based calculation, driven by my integrated indicator "Support and Resistance Pivot Points/Lines ". It enables multi-timeframe pivot calculations which are used to generate the signals and offers customizability, allowing you to define rounding methods and cooldown periods to refine pivot levels. The pivots, in combination with EMA crossovers, VWAP trend, and additional filters (RSI, ATR, VWAP, wicks and volume), create an entry and exit strategy for scalping opportunities that is useful for 0/1 DTE options with an average trade time of six minutes with the default setup for SPY. Option trading should be done outside TradingView. At this moment of release there is no option trading support.
All parameters used in the strategy are tweaked based on deep backtests results and real-time behavior. Be mindful that past performance does not guarantee future results.
The strategy is designed for intermediate and advanced users who are familiar intraday option scalping techniques.
How It Works
The strategy identifies entries based on multiple conditions, including: recently above pivot, recent EMA crossovers, RSI range, candle patterns, and VWAP uptrend. It avoids trades below the VWAP lower band due to poor backtesting results in those conditions. It creates a great number of signals when it detects an uptrend, which entails: VWAP and its lower/upper band slopes are going up, and the number of next high pivot points is greater than the number of lower pivot points. This indicates that we hope it will keep going up. In historical testing, this showed favorable results. This uptrend criteria runs on 15m charts max (where up to the VWAP effectiveness is the greatest).
The strategy also checks for candle and volume patterns, identified in backtesting to improve entry levels on historic data. Which include:
A red candle after multiple green ones, hoping to jump on a trend during a small pullback
Zero lower wick
Percentage and volume is up after lower volume candles
Percentage is up and the first and second EMA slopes are going up
Percentage is up, the first EMA is higher than the second, the price low is below the second EMA and price close above it
The VWAP uptrend overrules the candle and volume conditions (thus lots of signals during those moments).
The above is the base for many signals. There is a strict mode that adds extra checks such as:
not trading when there is no next low or high pivot
requiring a VWAP uptrend only
minimum candle percentages
This mode is for analyzing history and seeing performance during these conditions. It is worth it to create a separate alert for strict mode so you are aware of these conditions during trading.
When no stop has been defined, exits will always happen on pivot crossunder confirmations. If a stop is defined (default config), the strategy exits a position when:
the position is negative or no trail has been set
at least 1 bar has past
OR no stop has been defined (overrules previous)
trail has not been activated
The second exit condition happens when the close is below first EMA(9 by default) and when:
the position has been above first EMA
the gap between close and last pivot isn't small
the position is negative or no trail has been set
OR no stop has been defined (overrules above)
trail has not been activated
There are some more variations on this but the above are the most common. These exit conditions are a safety net because the strategy heavily relies on and favors stops. The settings allow changing stops, profit takers and trails. You can configure it to always sell without the conditions above.
The script will paint the pivot lines, trailing activation/stops, EMAs and entry/exits; with extra information in the data panel. For a complete view add VWAP and RSI to your chart, which are available from TradingView official indicator library. The strategy will not rely on those added indicators since VWAP and RSI are programmed in. You can add them to track the behavior of the signals based on these filters you have configured and have a complete view trading this strategy.
As mentioned earlier, the default settings are built for SPY 2m charts, with extended hours and real-time data. Open the strategy on this chart to study how all input parameters are used. If you don't have real-time data you need to adjust the minimum volume settings (set it to 0 at first).
The backtest
The default backtest configuration is set up to simulate SPY option trading.
Start capital is set to 10,000 and we risk around 5% of that per trade (1 contract)
Commission is set to 0.005%. The reason: at the time of this publication the SPY index price is approximately $580. Two ITM 0/1 DTE options contracts, each priced around $280, which is approximately $560. The typical commission for such a trade is around $3. To simulate this commission in the backtest on the SPY index itself, a commission of 0.005% per trade has been applied, approximating the options trading costs.
Slippage of 3 is set reflecting liquid SPY
The bar magnifier feature is turned on to have more realistic fills
Trading
In backtesting, setting commission and slippage to 0 on the SPY 2m chart shows many trades result around breaking even. Personally, I view them as an opportunity and safety net to help manage emotional decisions for exits. The signals are designed for short option scalps, allowing traders to take small profits and potentially re-enter during the strategy’s position window. It's advisable to take small potential profits, such as 4%, whenever the opportunity arises and consider re-entering if the setup still looks favorable, for example price still above ema9. Exiting a long position below ema9 is a common strategy for 2m scalping.
The average trade duration is approximately 6 minutes (3 bars). The choice between ITM (in-the-money), ATM (at-the-money), or OTM (out-of-the-money) options will depend on your trading style. Personally, I’ve seen better results with ITM options because they tend to move more in sync with the underlying index, thanks to their higher delta.
It’s important to note that the signals are designed to be a helper for manual trading rather than to automate a bot. Users are encouraged to take small profits and re-enter positions if favorable conditions persist. Be mindful that past performance does not guarantee future results.
For the default SPY setup the losses will mostly be 4-10% for ITM options. Be mindful of extreme volatile conditions where losses may reach 30% quickly, especially when trading ATM/OTM options.
The following settings can be changed:
8 pivot timeframes with left/right bars and days rendered
Here you can configure the timeframes for the pivots, which are crucial. The strategy wants that a crossover has happened recently (so it might enter after a crossunder if the crossover was recent) or the price is still above the crossed pivot.
When you decide to use a pivot timeframe higher than your chart, make sure it aligns the same starting point as the chart timeframe. As stated in the 43000478429 docs, there is a dependency between the resolution and the alignment of a starting point:
1–14 minutes — aligns to the beginning of a week
15–29 minutes — aligns to the beginning of a month
from 30 minutes and higher — aligns to the beginning of a year
This alignment also affects the setting of rendered days. I recommend a max value of 5 days for 1-14 minutes timeframes.
Also make sure a higher pivot timeframe can be divided by the lower. For instance I had repaint issues using 3m pivots on a 2m chart. But 4m pivots work fine.
Please look up docs 43000478429 to make sure this information is still up to date.
Pivot rounding
The pivot rounding option is used to add pivots based on a rounded price and limit the number of pivots. While this feature is disabled by default it can be useful with tweaking strategy variations, because many orders are placed at rounded levels and tend to act as strong price barriers.
There are multiple rounding methods: round, ceil/floor, roundn (decimal) and rounding to the minimal tick.
The next feature is a powerful extension called "Cooldown rounding":
Pivot cooldown rounding
This rounds new pivot levels for a cooldown period to keep the previous pivot line instead of adding a new line when they match the rounded value within the cooldown period. The existing line will be extended. This feature is useful because it makes sure the initial line is added to the exact high/low pivot level but any future lines within the rounding will just extend the existing line. This limits the number of pivots while still having precise levels (which normal rounding lacks) and allows more precise pivot trading.
This feature also helps ensure that the number of rendered lines will not exceed 500 too much, which is the render limit on TradingView.
You can set a maximum minutes for the cooldown. The default is 3 years which will enable the cooldown rounding permanently on the intraday (due to the max bar limit).
Pivot always added when new higher/lower pivot
When using cooldown rounding, one may find it useful to override this behavior when a new lower or higher pivot level has been reached. When enabled the new level will be added despite the fact that they may be rounded the same in the cooldown check. This is a good balance between limiting pivots but also allowing preciser trading.
VWAP bands multiplier
This is used to tweak the inner VWAP working for the upper and lower band. The default VWAP multiplier (0.9) is set based on backtesting since it performed better on historic data (the strategy does not trade below the lowerband). When you add the VWAP indicator from the TradingView library to the chart, make sure it uses the same multiplier setting as within this strategy so you have a correct view of the conditions the strategy acts on.
ATR EMA smoothing length
Used to tweak the ATR EMA smoothing. By default it is set up to 4 based on deep backtesting historic data.
EMA lengths
Changing the EMA length allows you to fine tune the EMA crossing behavior. By default the strategy is set up to EMA 9 and 20 which are considered commonly used values on the 2-minute chart.
Trading intraday time restrictions
For intraday charts you can configure when the strategy starts trading after market open and when it stops, including a hard sell. This makes sure there are no open positions left for the day during backtesting and can also aid in your trading style. For example some scalpers will not trade in the first two hours. Having no signals during this time can be beneficial. It is possible to configure these settings based on the number of bars or minutes.
Not trading on days the market closes earlier
By default the strategy does not trade on days the market closes earlier in the US. This makes sure there are no open positions left open during backtesting. Make sure to change it when using it on such a day. The days are: day before independence day, day after thanksgiving, Christmas eve and new years eve.
Not trading below VWAP lowerband
Backtesting has shown poor performance when trading below the VWAP lowerband but you are free to allow it to trade in such conditions. Past performance does not guarantee future results.
Minimum volume
A minimum volume can be set up. The current value is based on better deep backtest results for SPY using real-time data (48000). When you do not have a data plan for SPY, please set it to 0 and tweak based on backtests.
Minimum ATRP
The strategy has shown during my trading that it is sensitive to higher ATRP values and more volatile market conditions. There is more chance the index moves and we can profit from this during option scalping (if it moves in your favor). The default is based on SPY backtesting (0.04%), as a balance to have a lot of trades but also capture minimal movement.
RSI range
A RSI range can be set using a minimum and maximum value so we can limit trading during overbought/oversold conditions. Backtesting for SPY has shown the strategy performs better on historic data within a tighter range, so a default range has been set to 40-65.
Allow orders on every tick (no effect on stop/profit/trail)
This setting is used to allow orders on every tick. The strategy has been developed without trading on every tick but you can change this, for example when you have configured a setup different than the default configuration that you know works well with this. The default setup will not work well with it due to too many constant signals.
Stop percentage + ATRP threshold
One of the most important settings for managing the risk. I recommend setting a stop percentage first and later the ATRP threshold where the stop is calculated based on the current ATRP value. The calculated value will only be in effect when it is greater than the normal stop--the normal stop acts as baseline. The default stop is low (0.03). With a default ATRP threshold stop of 1.12, the calculated value overrules the normal stop when the value is greater. 0.03 acts as a minimum value but in reality the stop will most likely be higher on average for SPY with the default ATRP threshold.
For the default SPY setup the losses will be around 4-10% for ITM options. Be mindful of extreme volatile conditions where losses may reach 30% quickly, especially when trading ATM/OTM options.
Profit taker percentage + ATRP threshold
Same principles as the stop percentage above, but for profit taking. There is a very high ATRP threshold of 4 set by default. Backtests showed that trailing stops perform better on historic data.
Trailing stop
Used to set up a trailing stop. A useful feature to secure profit after a run-up, or get out with a small loss after initial activation. It is important to not use too tight values because they will give unrealistic backtest results and trigger too fast in real-time. Both the trail activation level and trail stop itself can be configured with a percentage value and ATRP value. I recommend setting up the ATRP last. By default the values are 0.05 for activation and 0.03 for the stop based on SPY real-time behavior.
Always sell on pivot crossunder confirmation
The strategy includes pivot crossunder confirmations as sell condition. By default it will not sell on every crossunder confirmation but checks for different conditions (explained in detail earlier in this description). You can change this behavior.
Always sell below first EMA when position has been above
The strategy sells below the first EMA when the position has been above it. By default it will not always sell but checks for different conditions (mentioned earlier in this description). You can change this behavior.
Buy modes pivot
By default the strategy buys between pivots as long as there has been a pivot crossover and EMAs crossover recently or price is still above it. You can change the behavior so it only buys on pivot crossovers or pivot crossover confirmations. Backtesting on the default setup shows decreased performance but for other strategy variations and pivot setups this feature can be useful since many scalpers do not buy between pivots.
Strict mode
There is a strict mode that adds extra checks such as not trading when there is no next low or high pivot, requiring a VWAP uptrend only and minimum candle percentages. This mode is for analyzing history and seeing performance during these conditions. It is worth it to create a separate alert for strict mode so you are aware of these conditions during trading. The deep backtests improved with these setting but past performance does not guarantee future results.
In the strict mode section you can override the stop, minimum ATRP, set up a minimum percentage, only trade VWAP uptrends and to not trade candles without a wick.
A summary and some extra detail
At the time of release only long trades are supported
The strategy is meant for quick scalping but one might find other uses for it
Enable extended hours on intraday charts so it captures more pivots
It does not trade extended hours (pre and post market) since options do not trade during those times
real-time data is recommended and required if a symbol has delayed data by default
You can configure that it trades minutes after market open and hard sells minutes after market open
The entries have a specific label text, example: "833 LE1 / 569.71 / P:569.8". This means: / / . The condition number is only for development/debug purposes for me when you have an issue.
The strategy cannot be tweaked to work on multiple symbols and timeframes with a single config. So you will have to make a config for every timeframe and symbol. I recommend using the Indicator Templates feature of TradingView. This way you can save the settings per timeframe and symbol
The strategy is per default config very dependent on (trailing) stops because it trades between pivots too. It wants that a pivot and EMA crossover has happened more recently than a crossunder. But you can change this behavior to always force crossover buys and crossunder sells.
It’s recommended to set up alerts to notify you of entry and exit signals. Watching the chart alone might cause you to miss trades, especially in fast-moving markets.
Only a max of 500 lines can be rendered on the chart, but the strategy will function with more under the hood. When you exceed 500 you will notice the beginning of the chart has no pivots, but beneath everything functions for backtesting.
Changing settings
Changing the settings for a different symbol and/or timeframe can be a challenging task. Here's a how-to you could use the first time to help you get going:
Set commission and slippage to 0. I prefer to do this so it is more clear whether you are balancing on break-even trades
Enable the pivot timeframe equal or above your chart timeframe. Avoid repainting as discussed earlier by choosing timeframes that align with the same timeframe
Set all volume, ATR, stop, profit takers and trail values to 0
Make sure strict mode is disabled at the bottom of the settings
You now have a clean state and you should see the backtest results purely based on pivot and EMA conditions
Tweak the stop and profit taker, beginning with the simple values and then ATRP threshold
At the last moment tweak the trailing stops. Tight trailing stops create an unrealistic backtest so you will need to tweak them based on real-time behavior of the symbol you're using which you will have to monitor during signals while the market is open. The default values are low (2m intraday SPY). Only with the bar magnifier feature it is somewhat possible to tweak realistic with history data. The tighter they are, the more unrealistic your backtest results. As a starting point, set the trailing stop low and find the highest activation level that doesn't change the results drastically, then increase the stop to the value you think reflects real-time behavior.
Keep refining by testing it during real-time behavior. Does it exit too early according to your own judgment? You need to increase the stop and maybe the activation level.
I hope you will find this useful!
DISCLAIMER
Trading is risky & most day traders lose money. This indicator is purely for informational & educational purposes only. Past performance does not guarantee future results.
Central Pivot Point Cross & Retrace Strategy // AlgoFyreThe Central Pivot Point Cross & Retrace Strategy uses pivot points for trend identification and trade entry. It combines accumulation/distribution indicators with pivot point levels to generate signals. The strategy incorporates dynamic position sizing based on a fixed risk amount and allows for both long and short positions with customizable stop-loss levels.
TABLE OF CONTENTS
🔶 ORIGINALITY
🔸Pivot Point-Based Trading
🔸Accumulation/Distribution
🔸Dynamic Position Sizing
🔸Customizable Risk Management
🔶 FUNCTIONALITY
🔸Indicators
🞘 Pivot Points
🞘 Accumulation/Distribution
🔸Conditions
🞘 Long Entry
🞘 Short Entry
🞘 Take Profit
🞘 Stop Loss
🔶 INSTRUCTIONS
🔸Adding the Strategy to the Chart
🔸Configuring the Strategy
🔸Backtesting and Practice
🔸Market Awareness
🔸Visual Customization
🔶 CONCLUSION
▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅
🔶 ORIGINALITY The Central Pivot Point Cross & Retrace Strategy uniquely combines pivot point analysis with accumulation/distribution indicators to identify optimal entry and exit points. It employs dynamic position sizing based on a fixed risk amount, ensuring consistent risk management across trades. This approach allows traders to adapt to varying market conditions by adjusting position sizes according to predefined risk parameters, enhancing both flexibility and control in trading decisions. The strategy's integration of customizable stop-loss levels further refines its risk management capabilities.
🔸Pivot Point-Based Trading This strategy utilizes daily pivot points to identify key support and resistance levels, providing a framework for trend identification and trade entry. The central pivot point serves as the intraday point of balance between buyers and sellers, with the largest amount of trading volume assumed to take place in this area.
🔸Accumulation/Distribution The strategy incorporates the Accumulation/Distribution (A/D) line, an underrated volume-based indicator, to establish the main trend. The A/D line is used in conjunction with a trend based indicator like the 200-period Exponential Moving Average (EMA) to confirm trend direction and strength.
🔸Dynamic Position Sizing Position sizes are calculated dynamically based on a fixed risk amount, allowing traders to maintain consistent risk exposure across trades.
🔸Customizable Risk Management Traders can set flexible risk-reward ratios and adjust stop-loss and take-profit levels, tailoring the strategy to their risk tolerance and market conditions. The strategy recommends taking partial profits at S1 or R1 levels and moving the stop-loss to break-even for remaining positions.
🔶 FUNCTIONALITY The Central Pivot Point Cross & Retrace Strategy leverages pivot points and accumulation/distribution indicators to identify optimal trading opportunities. This strategy is designed to capitalize on price movements around key pivot levels by dynamically adjusting position sizes based on predefined risk parameters. It allows traders to manage risk effectively while taking advantage of both long and short positions.
🔸Indicators 🞘 Pivot Points: Calculates daily pivot points (PP, R1, R2, S1, S2) to identify key support and resistance levels. The central pivot point is crucial for determining market bias and entry points.
🞘 Accumulation/Distribution: Uses the A/D line and with a trend based indicator like the 200 EMA to determine market direction and trend strength. This combination helps eliminate noise and provides more reliable trend signals. We recommend using the Adaptive MAs (Hurst, CVaR, Fractal) // AlgoFyre , but any moving average could be used.
🔸Conditions 🞘 Long Entry: Initiates a long position when the price crosses above the central pivot point (PP), retraces back to it and the A/D line is above its 200 EMA, indicating an uptrend. A limit entry order is set at the PP for entering the long trade.
🞘 Short Entry: Initiates a short position when the price crosses below the central pivot point (PP), retraces back to it and the A/D line is below its 200 EMA, indicating a downtrend. A limit entry order is set at the PP for entering the short trade.
🞘 Take Profit: 50% of the position is closed as profit when R1 for Longs and S1 for Shorts is reached. The position is fully closed when R2 for Longs and S2 for Shorts is reached.
🞘 Stop Loss: Stop loss is set via strategy settings. When the first 50% take profit for both long and shorts is taken, stop loss for both will be moved to break-even/entry.
🔶 INSTRUCTIONS
The Central Pivot Point Cross & Retrace Strategy can be set up by adding it to your TradingView chart and configuring parameters such as the accumulation/distribution source, stop-loss percentage, and risk management settings. This strategy is designed to capitalize on price movements around key pivot levels by dynamically adjusting position sizes based on predefined risk parameters. Enhance the accuracy of signals by combining this strategy with additional indicators like trend-following or momentum-based tools. Adjust settings to better manage risk and optimize entry and exit points.
🔸Adding the Strategy to the Chart Go to your TradingView chart.
Click on the "Pine Editor" button at the bottom of the chart.
Copy and paste the strategy code into the Pine Editor.
Click "Add to Chart" to apply the strategy.
Add the technical indicator "Accumulation/Distribution" to the chart.
Add the trend indicator " Adaptive MAs (Hurst, CVaR, Fractal) // AlgoFyre " or any other MA to the chart and move it to the "Accumulation/Distribution" pane.
Set the source of your trend indicator to "Accumulation/Distribution".
🔸Configuring the Strategy Open the strategy settings by clicking on the gear icon next to its name on the chart.
Accumulation/Distribution Source: Select the source for the accumulation/distribution indicator.
Accumulation/Distribution EMA Source: Select the source for the trend indicator.
Stop Loss Percentage: Set the stop loss distance from the pivot point as a percentage.
Risk Amount: Define the fixed risk amount for position sizing.
Base Order Size: Set the base order size for position calculations.
Number of Positions: Specify the maximum number of positions allowed.
Time Frame: Adjust the time frame based on the currency pair or asset being traded (e.g., 15-minute for EUR/USD, 30-minute for GBP/USD).
🔸Backtesting and Practice Backtest the strategy on historical data to understand how it performs in various market environments.
Practice using the strategy on a demo account before implementing it in live trading.
Test different time frames and asset pairs to find the most suitable combinations.
🔸Market Awareness Keep an eye on market news and events that might cause extreme price movements. The strategy reacts to price data and might not account for news-driven events that can cause large deviations.
Remember that this strategy is not recommended for stocks due to the A/D line's inability to account for gaps in its calculation.
🔸Visual Customization Visualization Settings: Customize the display of entry price, take profit, and stop loss levels.
Color Settings: Switch to the AlgoFyre theme or set custom colors for bullish, bearish, and neutral states.
Table Settings: Enable or disable the information table and adjust its position.
🔶 CONCLUSION
The Central Pivot Point Cross & Retrace Strategy provides a robust framework for capitalizing on price movements around key pivot levels by combining pivot point analysis with accumulation/distribution indicators. This strategy leverages pivot point crossovers to identify entry points and utilizes the A/D line crossover with its 200 EMA for trend confirmation, ensuring trades align with prevailing market conditions. By incorporating dynamic position sizing based on a fixed risk amount, traders can effectively manage risk and adapt to varying market conditions. The strategy's focus on trading around the central pivot point and its customizable stop-loss and take-profit levels further enhance its risk management capabilities, making it a versatile tool for both trending and ranging markets. With its strategic blend of technical indicators and risk management, the Central Pivot Point Cross & Retrace Strategy offers traders a comprehensive approach to optimizing trade execution and maximizing potential returns across various currency pairs and commodities.
VIDYA ProTrend Multi-Tier ProfitHello! This time is about a trend-following system.
VIDYA is quite an interesting indicator that adjusts dynamically to market volatility, making it more responsive to price changes compared to traditional moving averages. Balancing adaptability and precision, especially with the more aggressive short trade settings, challenged me to fine-tune the strategy for a variety of market conditions.
█ Introduction and How it is Different
The "VIDYA ProTrend Multi-Tier Profit" strategy is a trend-following system that combines the VIDYA (Variable Index Dynamic Average) indicator with Bollinger Bands and a multi-step take-profit mechanism.
Unlike traditional trend strategies, this system allows for more adaptive profit-taking, adjusting for long and short positions through distinct ATR-based and percentage-based targets. The innovation lies in its dynamic multi-tier approach to profit-taking, especially for short trades, where more aggressive percentages are applied using a multiplier. This flexibility helps adapt to various market conditions by optimizing trade management and profit allocation based on market volatility and trend strength.
BTCUSD 6hr performance
█ Strategy, How it Works: Detailed Explanation
The core of the "VIDYA ProTrend Multi-Tier Profit" strategy lies in the dual VIDYA indicators (fast and slow) that analyze price trends while accounting for market volatility. These indicators work alongside Bollinger Bands to filter trade entries and exits.
🔶 VIDYA Calculation
The VIDYA indicator is calculated using the following formula:
Smoothing factor (𝛼):
alpha = 2 / (Length + 1)
VIDYA formula:
VIDYA(t) = alpha * k * Price(t) + (1 - alpha * k) * VIDYA(t-1)
Where:
k = |Chande Momentum Oscillator (MO)| / 100
🔶 Bollinger Bands as a Volatility Filter
Bollinger Bands are calculated using a rolling mean and standard deviation of price over a specified period:
Upper Band:
BB_upper = MA + (K * stddev)
Lower Band:
BB_lower = MA - (K * stddev)
Where:
MA is the moving average,
K is the multiplier (typically 2), and
stddev is the standard deviation of price over the Bollinger Bands length.
These bands serve as volatility filters to identify potential overbought or oversold conditions, aiding in the entry and exit logic.
🔶 Slope Calculation for VIDYA
The slopes of both fast and slow VIDYAs are computed to assess the momentum and direction of the trend. The slope for a given VIDYA over its length is:
Slope = (VIDYA(t) - VIDYA(t-n)) / n
Where:
n is the length of the lookback period. Positive slope indicates bullish momentum, while negative slope signals bearish momentum.
LOCAL picture
🔶 Entry and Exit Conditions
- Long Entry: Occurs when the price moves above the slow VIDYA and the fast VIDYA is trending upward. Bollinger Bands confirm the signal when the price crosses the upper band, indicating bullish strength.
- Short Entry: Happens when the price drops below the slow VIDYA and the fast VIDYA trends downward. The signal is confirmed when the price crosses the lower Bollinger Band, showing bearish momentum.
- Exit: Based on VIDYA slopes flattening or reversing, or when the price hits specific ATR or percentage-based profit targets.
🔶 Multi-Step Take Profit Mechanism
The strategy incorporates three levels of take profit for both long and short trades:
- ATR-based Take Profit: Each step applies a multiple of the ATR (Average True Range) to the entry price to define the exit point.
The first level of take profit (long):
TP_ATR1_long = Entry Price + (2.618 * ATR)
etc.
█ Trade Direction
The strategy offers flexibility in defining the trading direction:
- Long: Only long trades are considered based on the criteria for upward trends.
- Short: Only short trades are initiated in bearish trends.
- Both: The strategy can take both long and short trades depending on the market conditions.
█ Usage
To use the strategy effectively:
- Adjust the VIDYA lengths (fast and slow) based on your preference for trend sensitivity.
- Use Bollinger Bands as a filter for identifying potential breakout or reversal scenarios.
- Enable the multi-step take profit feature to manage positions dynamically, allowing for partial exits as the price reaches specified ATR or percentage levels.
- Leverage the short trade multiplier for more aggressive take profit levels in bearish markets.
This strategy can be applied to different asset classes, including equities, forex, and cryptocurrencies. Adjust the input parameters to suit the volatility and characteristics of the asset being traded.
█ Default Settings
The default settings for this strategy have been designed for moderate to trending markets:
- Fast VIDYA Length (10): A shorter length for quick responsiveness to price changes. Increasing this length will reduce noise but may delay signals.
- Slow VIDYA Length (30): The slow VIDYA is set longer to capture broader market trends. Shortening this value will make the system more reactive to smaller price swings.
- Minimum Slope Threshold (0.05): This threshold helps filter out weak trends. Lowering the threshold will result in more trades, while raising it will restrict trades to stronger trends.
Multi-Step Take Profit Settings
- ATR Multipliers (2.618, 5.0, 10.0): These values define how far the price should move before taking profit. Larger multipliers widen the profit-taking levels, aiming for larger trend moves. In higher volatility markets, these values might be adjusted downwards.
- Percentage Levels (3%, 8%, 17%): These percentage levels define how much the price must move before taking profit. Increasing the percentages will capture larger moves, while smaller percentages offer quicker exits.
- Short TP Multiplier (1.5): This multiplier applies more aggressive take profit levels for short trades. Adjust this value based on the aggressiveness of your short trade management.
Each of these settings directly impacts the performance and risk profile of the strategy. Shorter VIDYA lengths and lower slope thresholds will generate more trades but may result in more whipsaws. Higher ATR multipliers or percentage levels can delay profit-taking, aiming for larger trends but risking partial gains if the trend reverses too early.
MACD Trend Trading with Dynamic Position Sizing // AlgoFyreThe MACD Trend Trading with Dynamic Position Sizing strategy combines MACD and trend indicators for trend trading. It uses MACD crossovers to identify entry points and a trend source for directional bias. The strategy incorporates risk management through dynamic position sizing based on a fixed risk amount. It allows for both long and short positions with customizable stop-loss and take-profit levels. The script includes visualization options for entry, stop-loss, and take-profit levels, enhancing trade analysis.
TABLE OF CONTENTS
🔶 ORIGINALITY
🔸Dynamic Position Sizing
🔸Trend-MACD Combination
🔸Customizable Risk Management
🔶 FUNCTIONALITY
🔸Indicators
🞘 Trend Indicator
🞘 Moving Average Convergence Divergence (MACD)
🔸Conditions
🞘 Long Entry
🞘 Short Entry
🔶 INSTRUCTIONS
🔸Step-by-Step Guidelines
🞘 Setting Up the Strategy
🞘 Alerts
🔸Customize settings
🔶 CONCLUSION
▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅
🔶 ORIGINALITY The MACD Trend Trading with Dynamic Position Sizing strategy uniquely combines MACD indicators with trend analysis to optimize entry and exit points. Unlike static trading strategies, it employs dynamic position sizing based on a fixed risk amount, ensuring consistent risk management. This approach allows traders to adapt to varying market conditions by adjusting position sizes according to predefined risk parameters, enhancing both flexibility and control in trading decisions. The strategy's integration of customizable stop-loss and take-profit levels further refines its risk management capabilities, making it a robust tool for both trending and volatile markets.
🔸Dynamic Position Sizing This strategy calculates position sizes dynamically, based on a fixed risk amount, allowing traders to maintain consistent risk exposure across trades.
🔸Trend-MACD Combination By combining trend direction with MACD crossovers, the strategy enhances the accuracy of entry signals, aligning trades with prevailing market trends.
🔸Customizable Risk Management Traders can set flexible risk-reward ratios and adjust stop-loss and take-profit levels, tailoring the strategy to their risk tolerance and market conditions.
🔶 FUNCTIONALITY The MACD Trend Trading with Dynamic Position Sizing strategy leverages a combination of trend indicators and the MACD to identify optimal trading opportunities. This strategy is designed to capitalize on short-term price movements by dynamically adjusting position sizes based on predefined risk parameters. It allows traders to manage risk effectively while taking advantage of both long and short positions.
🔸Indicators 🞘 Trend Indicator: Utilizes the trend source to determine market direction, ensuring trades align with prevailing trends.
Recommendation: We recommend using the Adaptive MAs (Hurst, CVaR, Fractal) indicator with the following settings for trend detection. However, you can use any trend indicator that suits your trading style.
🞘 Moving Average Convergence Divergence (MACD): Employs MACD crossovers to generate entry signals, enhancing the accuracy of trade execution. Use the "Moving Average Convergence Divergence" Indicator with the following settings:
🔸Conditions 🞘 Long Entry: Initiates a long position when the price is above the trend source, and a MACD crossover occurs with both MACD and signal lines below zero.
🞘 Short Entry: Initiates a short position when the price is below the trend source, and a MACD crossunder occurs with both MACD and signal lines above zero.
🔶 INSTRUCTIONS
The MACD Trend Trading with Dynamic Position Sizing strategy can be set up by adding it to your TradingView chart and configuring parameters such as the MACD source, trend source, and risk management settings. This strategy is designed to capitalize on short-term price movements by dynamically adjusting position sizes based on predefined risk parameters. Enhance the accuracy of signals by combining this strategy with additional indicators like trend-following or momentum-based tools. Adjust settings to better manage risk and optimize entry and exit points.
🔸Step-by-Step Guidelines
🞘 Setting Up the Strategy
Adding the Strategy to the Chart:
Go to your TradingView chart.
Click on the "Indicators" button at the top.
Search for "MACD Trend Trading with Dynamic Position Sizing" in the indicators list.
Click on the strategy to add it to your chart.
Configuring the Strategy:
Open the strategy settings by clicking on the gear icon next to its name on the chart.
MACD: Select the MACD from the MACD Indicator.
MACD Signal: Select the MACD Signal from the MACD Indicator.
Trend Source: Choose the trend source to determine market direction. If you use the Adaptive MAs (Hurst, CVaR, Fractal) with our settings shown above, choose the MA1 Smoothing Line.
Stop Loss Percentage: Set the stop loss distance from the trend source as a percentage.
Risk/Reward Ratio: Define the desired risk/reward ratio for trades.
Backtesting and Practice:
Backtest the strategy on historical data to understand how it performs in various market environments.
Practice using the strategy on a demo account before implementing it in live trading.
Market Awareness:
Keep an eye on market news and events that might cause extreme price movements. The strategy reacts to price data and might not account for news-driven events that can cause large deviations.
🔶 CONCLUSION
The MACD Trend Trading with Dynamic Position Sizing strategy provides a robust framework for capitalizing on short-term market trends by combining the MACD indicator with dynamic position sizing. This strategy leverages MACD crossovers to identify entry points and utilizes a trend source for directional bias, ensuring trades align with prevailing market conditions. By incorporating dynamic position sizing based on a fixed risk amount, traders can effectively manage risk and adapt to varying market conditions. The strategy's customizable stop-loss and take-profit levels further enhance its risk management capabilities, making it a versatile tool for both trending and volatile markets. With its strategic blend of technical indicators and risk management, the MACD Trend Trading strategy offers traders a comprehensive approach to optimizing trade execution and maximizing potential returns.
Overnight Positioning w EMA - Strategy [presentTrading]I've recently started researching Market Timing strategies, and it’s proving to be quite an interesting area of study. The idea of predicting optimal times to enter and exit the market, based on historical data and various indicators, brings a dynamic edge to trading. Additionally, it is integrated with the 3commas bot for automated trade execution.
I'm still working on it. Welcome to share your point of view.
█ Introduction and How it is Different
The "Overnight Positioning with EMA " is designed to capitalize on market inefficiencies during the overnight trading period. This strategy takes a position shortly before the market closes and exits shortly after it opens the following day. What sets this strategy apart is the integration of an optional Exponential Moving Average (EMA) filter, which ensures that trades are aligned with the underlying trend. The strategy provides flexibility by allowing users to select between different global market sessions, such as the US, Asia, and Europe.
It is integrated with the 3commas bot for automated trade execution and has a built-in mechanism to avoid holding positions over the weekend by force-closing positions on Fridays before the market closes.
BTCUSD 20 mins Performance
█ Strategy, How it Works: Detailed Explanation
The core logic of this strategy is simple: enter trades before market close and exit them after market open, taking advantage of potential price movements during the overnight period. Here’s how it works in more detail:
🔶 Market Timing
The strategy determines the local market open and close times based on the selected market (US, Asia, Europe) and adjusts entry and exit points accordingly. The entry is triggered a specific number of minutes before market close, and the exit is triggered a specific number of minutes after market open.
🔶 EMA Filter
The strategy includes an optional EMA filter to help ensure that trades are taken in the direction of the prevailing trend. The EMA is calculated over a user-defined timeframe and length. The entry is only allowed if the closing price is above the EMA (for long positions), which helps to filter out trades that might go against the trend.
The EMA formula:
```
EMA(t) = +
```
Where:
- EMA(t) is the current EMA value
- Close(t) is the current closing price
- n is the length of the EMA
- EMA(t-1) is the previous period's EMA value
🔶 Entry Logic
The strategy monitors the market time in the selected timezone. Once the current time reaches the defined entry period (e.g., 20 minutes before market close), and the EMA condition is satisfied, a long position is entered.
- Entry time calculation:
```
entryTime = marketCloseTime - entryMinutesBeforeClose * 60 * 1000
```
🔶 Exit Logic
Exits are triggered based on a specified time after the market opens. The strategy checks if the current time is within the defined exit period (e.g., 20 minutes after market open) and closes any open long positions.
- Exit time calculation:
exitTime = marketOpenTime + exitMinutesAfterOpen * 60 * 1000
🔶 Force Close on Fridays
To avoid the risk of holding positions over the weekend, the strategy force-closes any open positions 5 minutes before the market close on Fridays.
- Force close logic:
isFriday = (dayofweek(currentTime, marketTimezone) == dayofweek.friday)
█ Trade Direction
This strategy is designed exclusively for long trades. It enters a long position before market close and exits the position after market open. There is no shorting involved in this strategy, and it focuses on capturing upward momentum during the overnight session.
█ Usage
This strategy is suitable for traders who want to take advantage of price movements that occur during the overnight period without holding positions for extended periods. It automates entry and exit times, ensuring that trades are placed at the appropriate times based on the market session selected by the user. The 3commas bot integration also allows for automated execution, making it ideal for traders who wish to set it and forget it. The strategy is flexible enough to work across various global markets, depending on the trader's preference.
█ Default Settings
1. entryMinutesBeforeClose (Default = 20 minutes):
This setting determines how many minutes before the market close the strategy will enter a long position. A shorter duration could mean missing out on potential movements, while a longer duration could expose the position to greater price fluctuations before the market closes.
2. exitMinutesAfterOpen (Default = 20 minutes):
This setting controls how many minutes after the market opens the position will be exited. A shorter exit time minimizes exposure to market volatility at the open, while a longer exit time could capture more of the overnight price movement.
3. emaLength (Default = 100):
The length of the EMA affects how the strategy filters trades. A shorter EMA (e.g., 50) reacts more quickly to price changes, allowing more frequent entries, while a longer EMA (e.g., 200) smooths out price action and only allows entries when there is a stronger underlying trend.
The effect of using a longer EMA (e.g., 200) would be:
```
EMA(t) = +
```
4. emaTimeframe (Default = 240):
This is the timeframe used for calculating the EMA. A higher timeframe (e.g., 360) would base entries on longer-term trends, while a shorter timeframe (e.g., 60) would respond more quickly to price movements, potentially allowing more frequent trades.
5. useEMA (Default = true):
This toggle enables or disables the EMA filter. When enabled, trades are only taken when the price is above the EMA. Disabling the EMA allows the strategy to enter trades without any trend validation, which could increase the number of trades but also increase risk.
6. Market Selection (Default = US):
This setting determines which global market's open and close times the strategy will use. The selection of the market affects the timing of entries and exits and should be chosen based on the user's preference or geographic focus.
Options Series - Index Analysis [MasterPiece]
Powerful Insights 🚀:
This script utilizes multiple technical indicators to provide a comprehensive view of stock trends, which increases the reliability of trading signals.
This script also designed to perform index and stock analysis by comparing price movements to moving averages (MA20) and volume-weighted average price (VWAP).
By analyzing a set of top-weighted stocks within an index, the script offers a macro-level view while also delivering stock-specific insights. This dual focus enhances its utility for traders who need to understand both individual stock movements and broader market dynamics.
⭐ Originality: The script presents a unique fusion of multiple indicators with a data-driven approach to analyzing top-weighted stocks in major indices like Nifty and BankNifty. The integration of widely-used technical analysis tools, such as exponential and simple moving averages (EMA, SMA), volume-weighted average price (VWAP), and volume-body size comparisons, offers a holistic framework for traders. By focusing on the top five stocks in the indices, it leverages weightage-based performance analysis, adding a strategic dimension to index trading. This approach not only evaluates individual stock performance but also synthesizes broader market trends.
⭐ Usefulness: This script serves traders who seek a multi-dimensional method for analyzing both index and stock performance. Its key features include:
Bullish and Bearish Signals: The relationship between price, moving averages (MA20), and VWAP identifies directional trends, generating buy/sell signals for both individual stocks and the overall index.
Volume and Candle Body Analysis: By comparing candle body size with volume, the script provides deeper insights into trend strength and market conviction. This allows traders to gauge whether price movements are supported by sufficient trading volume.
Customization: Users have the flexibility to input specific index and stock symbols, making the script adaptable for different markets and instruments beyond just Nifty and BankNifty.
Signal Overlay: The ability to overlay bar color and volume signals directly on the price chart ensures better trend visualization, offering clear and immediate visual cues for potential trading setups.
⭐ Justification for Mashup: The combination of multiple indicators is logical and complementary. Each component serves a distinct purpose that enhances the overall system:
Trend Identification: Moving averages and VWAP provide insights into short and long-term trends, giving traders a reliable baseline for price direction.
Conviction: The inclusion of volume and candle body size comparisons gives additional weight to price action, allowing traders to confirm whether a trend is backed by meaningful market activity.
⭐ Color Customization for Enhanced Visualization:
The script defines custom colors for various conditions and candles, improving clarity for bullish and bearish trends.
Green for Bullish: Dark green for regular bullish candles, and fluorescent green for stronger bullish signals.
Red for Bearish: Dark red for regular bearish candles, and fluorescent red for stronger bearish signals.
Neutral Conditions: Fluorescent yellow is used for neutral conditions.
⭐ Index and Top Stocks Analysis:
This section analyzes top-weighted stocks for indices ( NSE:NIFTY and NSE:BANKNIFTY ), with NSE:BANKNIFTY being used as the default.
Top Stocks for NSE:NIFTY : HDFCBANK, ICICIBANK, RELIANCE, INFY, ITC.
Top Stocks for NSE:BANKNIFTY : HDFCBANK, ICICIBANK, KOTAKBANK, AXISBANK, SBIN.
Customizable Input: Users can modify the index and stock symbols via input.symbol.
⭐ Signal Generation Based on MA20 and VWAP:
The conditions for bullish or bearish signals are based on the relationship between the stock's close price, MA20, and VWAP.
Bullish Signal: Close price greater than both MA20 and VWAP.
Bearish Signal: Close price less than both MA20 and VWAP.
⭐ Volume Bar Signal for Market Activity:
The script analyzes candle body size and volume to detect significant market movements.
Body Size and Volume Comparison: It checks if the current candle’s body size or volume is greater than the moving average of body size or volume over the past 74 bars.
Green Candle (GC) and Red Candle (RC): Boolean conditions to track whether the close price is higher or lower than the open price.
⭐ Average Signals for Strong Trends:
The script calculates average bullish or bearish signals based on the majority of candles being green or red and significant body size or volume.
Bullish Average Signal: At least 4 out of 6 stocks exhibit bullish conditions (green candles, large bodies, or high volume).
Bearish Average Signal: Similar logic for bearish signals with red candles.
⭐ Overlay of Volume Bar Signals:
The plotshape function overlays the bullish and bearish volume bar signals on the chart, using color and shape to indicate trend changes.
🚀 Conclusion:
This Pine Script code provides a robust framework for index analysis based on top 5 weighted stocks, using two primary indicators—MA20 (20-period Moving Average) and VWAP (Volume Weighted Average Price).
Market Bias Identification: The script identifies bullish and bearish conditions for each stock based on whether the close price is above or below MA20 and VWAP.
Volume and Body Size Comparison: It checks if the current candle’s body size or volume exceeds the average to determine significant market moves.
Visualization with Color & Signals: It overlays color signals for bullish (fluorescent green) and bearish (fluorescent red) markets and provides triangle markers for strong volume-based signals.
Top Stock Analysis: The script provides analysis of top five weighted stocks in the selected index, enhancing precision for broader index analysis.
The Adaptive Pairwise Momentum System [QuantraSystems]The Adaptive Pairwise Momentum System
QuantraSystems guarantees that the information created and published within this document and on the Tradingview platform is fully compliant with applicable regulations, does not constitute investment advice, and is not exclusively intended for qualified investors.
Important Note!
The system equity curve presented here has been generated as part of the process of testing and verifying the methodology behind this script.
Crucially, it was developed after the system was conceptualized, designed, and created, which helps to mitigate the risk of overfitting to historical data. In other words, the system was built for robustness, not for simply optimizing past performance.
This ensures that the system is less likely to degrade in performance over time, compared to hyper-optimized systems that are tailored to past data. No tweaks or optimizations were made to this system post-backtest.
Even More Important Note!!
The nature of markets is that they change quickly and unpredictably. Past performance does not guarantee future results - this is a fundamental rule in trading and investing.
While this system is designed with broad, flexible conditions to adapt quickly to a range of market environments, it is essential to understand that no assumptions should be made about future returns based on historical data. Markets are inherently uncertain, and this system - like all trading systems - cannot predict future outcomes.
Introduction
The Adaptive Pairwise Momentum System is not just an indicator but a comprehensive asset rotation and trend-following system. In short, it aims to find the highest performing asset from the provided range.
The system dynamically optimizes capital allocation across up to four high-performing assets, ensuring that the portfolio adapts swiftly to changing market conditions. The system logic consists of sophisticated quantitative methods, rapid momentum analysis, and robust trend filtering. The overarching goal is to ensure that the portfolio is always invested in the highest-performing asset based on dynamic market conditions, while at the same time managing risk through broader market filters and internal mechanisms like volatility and beta analysis.
Legend
System Equity Curve:
The equity curve displayed in the chart is dynamically colored based on the asset allocation at any given time. This color-coded approach allows traders to immediately identify transitions between assets and the corresponding impact on portfolio performance.
Highlighting of Current Highest Performer:
The current bar in the chart is highlighted based on the confirmed highest performing asset. This is designed to give traders advanced notice of potential shifts in allocation even before a formal position change occurs. The highlighting enables traders to prepare in real time, making it easier to manage positions without lag, particularly in fast-moving markets.
Highlighted Symbols in the Asset Table:
In the table displayed on the right hand side of the screen, the current top-performing symbol is highlighted. This clear signal at a glance provides immediate insight into which asset is currently being favored by the system. This feature enhances clarity and helps traders make informed decisions quickly, without needing to analyze the underlying data manually.
Performance Overview in Tables:
The left table provides insight into both daily and overall system performance from inception, offering traders a detailed view of short-term fluctuations and long-term growth. The right-hand table breaks down essential metrics such as Sharpe ratio, Sortino ratio, Omega ratio, and maximum drawdown for each asset, as well as for the overall system and HODL strategy.
Asset-Specific Signals:
The signals column in the table indicates whether an asset is currently held or being considered for holding based on the system's dynamic rankings. This is a critical visual aid for asset reallocation decisions, signaling when it may be appropriate to either maintain or change the asset of the portfolio.
Core Features and Methodologies
Flexibility in Asset Selection
One of the major advantages of this system is its flexibility. Users can easily modify the number and type of assets included for comparison. You can quickly input different assets and backtest their performance, allowing you to verify how well this system might fit different tokens or market conditions. This flexibility empowers users to adapt the system to a wide range of market environments and tailor it to their unique preferences.
Whole System Risk Mitigation - Macro Trend Filter
One of the features of this script is its integration of a Macro-level Trend Filter for the entire portfolio. The purpose of this filter is to ensure no capital is allocated to any token in the rotation system unless Bitcoin itself is in a positive trend. The logic here is that Bitcoin, as the cryptocurrency market leader, often sets the tone for the entire cryptocurrency market. By using Bitcoins trend direction as a barometer for overall market conditions, we create a system where capital is not allocated during unfavorable or bearish market conditions - significantly reducing exposure to downside risk.
Users have the ability to toggle this filter on and off in the input menu, with five customizable options for the trend filter, including the option to use no filter. These options are:
Nova QSM - a trend aggregate combining the Rolling VWAP, Wave Pendulum Trend, KRO Overlay, and the Pulse Profiler provides the market trend signal confirmation.
Kilonova QSM - a versatile aggregate combining the Rolling VWAP, KRO Overlay, the KRO Base, RSI Volatility Bands, NNTRSI, Regression Smoothed RSI and the RoC Suite.
Quasar QSM - an enhanced version of the original RSI Pulsar. The Quasar QSM refines the trend following approach by utilizing an aggregated methodology.
Pairwise Momentum and Strength Ranking
The backbone of this system is its ability to identify the strongest-performing asset in the selected pool, ensuring that the portfolio is always exposed to the asset showing the highest relative momentum. The system continually ranks these assets against each other and determines the highest performer by measure of past and coincident outperformance. This process occurs rapidly, allowing for swift responses to shifts in market momentum, which ensures capital is always working in the most efficient manner. The speed and precision of this reallocation strategy make the script particularly well-suited for active, momentum-driven portfolios.
Beta-Adjusted Asset Selection as a Tiebreaker
In the circumstance where two (or more) assets exhibit the same relative momentum score, the system introduces another layer of analysis. In the event of a strength ‘tie’ the system will preference maintaining the current position - that is, if the previously strongest asset is now tied, the system will still allocate to the same asset. If this is not the case, the asset with the higher beta is selected. Beta is a measure of an asset’s volatility relative to Bitcoin (BTC).
This ensures that in bullish conditions, the system favors assets with a higher potential for outsized gains due to their inherent volatility. Beta is calculated based on the Average Daily Return of each asset compared to BTC. By doing this, the system ensures that it is dynamically adjusting to risk and reward, allocating to assets with higher risk in favorable conditions and lower risk in less favorable conditions.
Dynamic Asset Reallocation - Opposed to Multi-Asset Fixed Intervals
One of the standout features of this system is its ability to dynamically reallocate capital. Unlike traditional portfolio allocation strategies that may rebalance between a basket of assets monthly or quarterly, this system recalculates and reallocates capital on the next bar close (if required). As soon as a new asset exhibits superior performance relative to others, the system immediately adjusts, closing the previous position and reallocating funds to the top-ranked asset.
This approach is particularly powerful in volatile markets like cryptocurrencies, where trends can shift quickly. By reallocating swiftly, the system maximizes exposure to high-performing assets while minimizing time spent in underperforming ones. Moreover, this process is entirely automated, freeing the trader from manually tracking and measuring individual token strength.
Our research has demonstrated that, from a risk-adjusted return perspective, concentration into the top-performing asset consistently outperforms broad diversification across longer time horizons. By focusing capital on the highest-performing asset, the system captures outsized returns that are not achievable through traditional diversification. However, a more risk-averse investor, or one seeking to reduce drawdowns, may prefer to move the portfolio further left along the theoretical Capital Allocation Line by incorporating a blend of cash, treasury bonds, or other yield-generating assets or even include market neutral strategies alongside the rotation system. This hybrid approach would effectively lower the overall volatility of the portfolio while still maintaining exposure to the system’s outsized returns. In theory, such an investor can reduce risk without sacrificing too much potential upside, creating a more balanced risk-return profile.
Position Changes and Fees/Slippage
Another critical and often overlooked element of this system is its ability to account for fees and slippage. Given the increased speed and frequency of allocation logic compared to the buy-and-hold strategy, it is of vital importance that the system recognises that switching between assets may incur slippage, especially in highly volatile markets. To account for this, the system integrates realistic slippage and fee estimates directly into the equity curve, simulating expected execution costs under typical market conditions and gives users a more realistic view of expected performance.
Number of Position Changes
Understanding the number of position changes in a strategy is critical to assessing its feasibility in real world trading. Frequent position changes can lead to increased costs due to slippage and fees. Monitoring the number of position changes provides insight into the system’s behavior - helping to evaluate how active the strategy is and whether it aligns with the trader's desired time input for position management.
Equity Curve and Performance Calculations
To provide a benchmark, the script also generates a Buy-and-Hold (or "HODL") equity curve that represents an equal split across the four selected assets. This allows users to easily compare the performance of the dynamic rotation system with that of a more traditional investment strategy.
The script tracks key performance metrics for both the dynamic portfolio and the HODL strategy, including:
Sharpe Ratio
The Sharpe Ratio is a key metric that evaluates a portfolio’s risk-adjusted return by comparing its ‘excess’ return to its volatility. Traditionally, the Sharpe Ratio measures returns relative to a risk-free rate. However, in our system’s calculation, we omit the risk-free rate and instead measure returns above a benchmark of 0%. This adjustment provides a more universal comparison, especially in the context of highly volatile assets like cryptocurrencies, where a traditional risk-free benchmark, such as the usual 3-month T-bills, is often irrelevant or too distant from the realities of the crypto market.
By using 0% as the baseline, we focus purely on the strategy's ability to generate raw returns in the face of market risk, which makes it easier to compare performance across different strategies or asset classes. In an environment like cryptocurrency, where volatility can be extreme, the importance of relative return against a highly volatile backdrop outweighs comparisons to a risk-free rate that bears little resemblance to the risk profile of digital assets.
Sortino Ratio
The Sortino Ratio improves upon the Sharpe Ratio by specifically targeting downside risk and leaves the upside potential untouched. In contrast to the Sharpe Ratio (which penalizes both upside and downside volatility), the Sortino Ratio focuses only on negative return deviations. This makes it a more suitable metric for evaluating strategies like the Adaptive Pairwise Momentum Strategy - that aim to minimize drawdowns without restricting upside capture. By measuring returns relative to a 0% baseline, the Sortino ratio provides a clearer assessment of how well the system generates gains while avoiding substantial losses in highly volatile markets like crypto.
Omega Ratio
The Omega Ratio is calculated as the ratio of gains to losses across all return thresholds, providing a more complete view of how the system balances upside and downside risk even compared to the Sortino Ratio. While it achieves a similar outcome to the Sortino Ratio by emphasizing the system's ability to capture gains while limiting losses, it is technically a mathematically superior method. However, we include both the Omega and Sortino ratios in our metric table, as the Sortino Ratio remains more widely recognized and commonly understood by traders and investors of all levels.
Case Study
Notes
For the sake of brevity, the Important Notes section found in the header of this text will not be rewritten. Instead, it will be highlighted that now is the perfect time to reread these notes. Reading this case study in the context of what has been mentioned above is of key importance.
As a second note, it is worth mentioning that certain market periods are referred to as either “Bull” or “Bear” markets - terms I personally find to be vague and undefinable - and therefore unfavorable. They will be used nevertheless, due to their familiarity and ease of understanding in this context. Substitute phrases could be “Macro Uptrend” or “Macro Downtrend.”
Overview
This case study provides an in-depth performance analysis of the Adaptive Pairwise Momentum System , a long-only system that dynamically allocates to outperforming assets and moves into cash during unfavorable conditions.
This backtest includes realistic assumptions for slippage and fees, applying a 0.5% cost for every position change, which includes both asset reallocation and moving to a cash position. Additionally, the system was tested using the top four cryptocurrencies by market capitalization as of the test start date of 01/01/2022 in order to minimize selection bias.
The top tokens on this date (excluding Stablecoins) were:
Bitcoin
Ethereum
Solana
BNB
This decision was made in order to avoid cherry picking assets that might have exhibited exceptional historical performance - minimizing skew in the back test. Furthermore, although this backtest focuses on these specific assets, the system is built to be flexible and adaptable, capable of being applied to a wide range of assets beyond those initially tested.
Any potential lookahead bias or repainting in the calculations has been addressed by implementing the lookback modifier for all repainting sensitive data, including asset ratios, asset scoring, and beta values. This ensures that no future information is inadvertently used in the asset allocation process.
Additionally, a fixed lookback period of one bar is used for the trend filter during allocations - meaning that the trend filter from the prior bar must be positive for an allocation to occur on the current bar. It is also important to note that all the data displayed by the indicator is based on the last confirmed (closed) bar, ensuring that the entire system is repaint-proof.
The study spans the 2022 cryptocurrency bear market through the subsequent bull market of 2023 and 2024. The stress test highlights how the system reacted to one of the most challenging market downturns in crypto history - which includes events such as:
Luna and TerraUSD crash
Three Arrows Capital liquidation
Celsius bankruptcy
Voyager Digital bankruptcy
FTX collapse
Silicon Valley + Signature + Silvergate banking collapses
Subsequent USDC deppegging
And arguably more important, 2022 was characterized by a tightening of monetary policy after the unprecedented monetary easing in response to the Covid pandemic of 2020/2021. This shift undeniably puts downward pressure on asset prices, most probably to the extent that this had a causal role to many of the above events.
By incorporating these real-world challenges, the backtest provides a more accurate and robust performance evaluation that avoids overfitting or excessive optimization for one specific market condition.
The Bear Market of 2022: Stress Test and System Resilience
During the 2022 bear market, where the overall crypto market experienced deep and consistent corrections, the Adaptive Pairwise Momentum System demonstrated its ability to mitigate downside risk effectively.
Dynamic Allocation and Cash Exposure:
The system rotated in and out of cash, as indicated by the gray period on the system equity curve. This allocation to cash during downtrending periods, specifically in late 2022, acted as the systems ‘risk-off’ exposure - the purest form of such an exposure. This prevented the system from experiencing the magnitude of drawdown suffered by the ‘Buy-and-Hold (HODL) investors.
In contrast, a passive HODL strategy would have suffered a staggering 75.32% drawdown, as it remained fully allocated to chosen assets during the market's decline. The active Pairwise Momentum system’s smaller drawdown of 54.35% demonstrates its more effective capital preservation mechanisms.
The Bull Market of 2023 and 2024: Capturing Market Upside
Following the crypto bear market, the system effectively capitalized on the recovery and subsequent bull market of 2023 and 2024.
Maximizing Market Gains:
As trends began turning bullish in early 2023, the system caught the momentum and promptly allocated capital to only the quantified highest performing asset of the time - resulting in a parabolic rise in the system's equity curve. Notably, the curve transitions from gray to purple during this period, indicating that Solana (SOL) was the top-performing asset selected by the system.
This allocation to Solana is particularly striking because, at the time, it was an asset many in the market shunned due to its association with the FTX collapse just months prior. However, this highlights a key advantage of quantitative systems like the one presented here: decisions are driven purely from objective data - free from emotional or subjective biases. Unlike human traders, who are inclined (whether consciously or subconsciously) to avoid assets that are ‘out of favor,’ this system focuses purely on price performance, often uncovering opportunities that are overlooked by discretionary based investors. This ability to make data-driven decisions ensures that the strategy is always positioned to capture the best risk-adjusted returns, even in scenarios where judgment might fail.
Minimizing Volatility and Drawdown in Uptrends
While the system captured substantial returns during the bull market it also did so with lower volatility compared to HODL. The sharpe ratio of 4.05 (versus HODL’s 3.31) reflects the system's superior risk-adjusted performance. The allocation shifts, combined with tactical periods of cash holding during minor corrections, ensured a smoother equity curve growth compared to the buy-and-hold approach.
Final Summary
The percentage returns are mentioned last for a reason - it is important to emphasize that risk-adjusted performance is paramount. In this backtest, the Pairwise Momentum system consistently outperforms due to its ability to dynamically manage risk (as seen in the superior Sharpe, Sortino and Omega ratios). With a smaller drawdown of 54.35% compared to HODL’s 75.32%, the system demonstrates its resilience during market downturns, while also capturing the highest beta on the upside during bullish phases.
The system delivered 266.26% return since the backtest start date of January 1st 2022, compared to HODL’s 10.24%, resulting in a performance delta of 256.02%
While this backtest goes some of the way to verifying the system’s feasibility, it’s important to note that past performance is not indicative of future results - especially in volatile and evolving markets like cryptocurrencies. Market behavior can shift, and in particular, if the market experiences prolonged sideways action, trend following systems such as the Adaptive Pairwise Momentum Strategy WILL face significant challenges.
Neural Momentum StrategyThis strategy combines Exponential Moving Average (EMA) analysis with a multi-timeframe approach. It uses a neural scoring system to evaluate market momentum and generate precise trading signals. The strategy is implemented in Pine Script v5 and is designed for use on TradingView.
Key Components
The strategy utilizes short-term (10-period) and long-term (25-period) EMAs. It calculates the difference between these EMAs to assess trend direction and strength. A neural scoring system evaluates EMA crossovers (weight: 12 points), trend strength (weight: 10 points), and price acceleration (weight: 4 points). The system implements a score smoothing algorithm using a 10-period EMA.
Multi-timeframe Analysis
The strategy automatically selects a higher timeframe based on the current chart timeframe. It calculates scores for both the current and higher timeframes, then combines these scores using a weighted average. The higher timeframe factor ranges from 3 to 6, depending on the current timeframe.
Trading Logic
Entry occurs when the final combined score turns positive after a change. Exit happens when the final combined score turns negative after a change. The strategy recalculates scores on each bar, ensuring responsive trading decisions.
Risk Management
An optional adaptive stop-loss system based on Average True Range (ATR) is available. The default ATR period is 10, and the stop factor is 1.2. Stop levels are dynamically adjusted on the higher timeframe.
Customization Options
Users can adjust EMA periods, signal line period, scoring weights, and enable/disable multi-timeframe analysis. The strategy allows setting specific date ranges for backtesting and deployment.
Position Sizing
The strategy uses a percentage-of-equity position sizing method, with a default of 30% of account equity per trade.
Code Structure
The strategy is built using TradingView's strategy framework. It employs efficient use of the request.security() function for multi-timeframe analysis. The main calculation function, calculate_score(), computes the neural score based on EMA differences and acceleration.
Performance Considerations
The strategy adapts to various market conditions through its multi-faceted scoring system. Multi-timeframe analysis helps filter out noise and identify stronger trends. The neural scoring approach aims to capture subtle market dynamics often missed by traditional indicators.
Limitations
Performance may vary across different markets and timeframes. The strategy's effectiveness relies on proper calibration of its numerous parameters. Users should thoroughly backtest and forward test before live implementation.
To summarize, the Neural Momentum Strategy represents a sophisticated approach to market analysis. It combines traditional technical indicators with advanced scoring techniques and multi-timeframe analysis. This strategy is designed for traders seeking a data-driven and adaptive method. It aims to identify high-probability trading opportunities across various market conditions.
This Neural Momentum Strategy is for informational and educational purposes only. It should not be considered financial advice. The strategy may exhibit slight repainting behavior due to the nature of multi-timeframe analysis and the use of the request.security() function. Historical values might change as new data becomes available.
Trading carries a high level of risk, and may not be suitable for all investors. Before deciding to trade, you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment. Therefore, you should not invest money that you cannot afford to lose.
Past performance is not indicative of future results. The author and TradingView are not responsible for any losses incurred as a result of using this strategy. Always exercise caution when using this or any trading strategy, and thoroughly test it before implementing in live trading scenarios.
Users are solely responsible for any trading decisions they make based on this strategy. It is strongly recommended that you seek advice from an independent financial advisor if you have any doubts.
Bitcoin CME-Spot Z-Spread - Strategy [presentTrading]This time is a swing trading strategy! It measures the sentiment of the Bitcoin market through the spread of CME Bitcoin Futures and Bitfinex BTCUSD Spot prices. By applying Bollinger Bands to the spread, the strategy seeks to capture mean-reversion opportunities when prices deviate significantly from their historical norms
█ Introduction and How it is Different
The Bitcoin CME-Spot Bollinger Bands Strategy is designed to capture mean-reversion opportunities by exploiting the spread between CME Bitcoin Futures and Bitfinex BTCUSD Spot prices. The strategy uses Bollinger Bands to detect when the spread between these two correlated assets has deviated significantly from its historical norm, signaling potential overbought or oversold conditions.
What sets this strategy apart is its focus on spread trading between futures and spot markets rather than price-based indicators. By applying Bollinger Bands to the spread rather than individual prices, the strategy identifies price inefficiencies across markets, allowing traders to take advantage of the natural reversion to the mean that often occurs in these correlated assets.
BTCUSD 8hr Performance
█ Strategy, How It Works: Detailed Explanation
The strategy relies on Bollinger Bands to assess the volatility and relative deviation of the spread between CME Bitcoin Futures and Bitfinex BTCUSD Spot prices. Bollinger Bands consist of a moving average and two standard deviation bands, which help measure how much the spread deviates from its historical mean.
🔶 Spread Calculation:
The spread is calculated by subtracting the Bitfinex spot price from the CME Bitcoin futures price:
Spread = CME Price - Bitfinex Price
This spread represents the difference between the futures and spot markets, which may widen or narrow based on supply and demand dynamics in each market. By analyzing the spread, the strategy can detect when prices are too far apart (potentially overbought or oversold), indicating a trading opportunity.
🔶 Bollinger Bands Calculation:
The Bollinger Bands for the spread are calculated using a simple moving average (SMA) and the standard deviation of the spread over a defined period.
1. Moving Average (SMA):
The simple moving average of the spread (mu_S) over a specified period P is calculated as:
mu_S = (1/P) * sum(S_i from i=1 to P)
Where S_i represents the spread at time i, and P is the lookback period (default is 200 bars). The moving average provides a baseline for the normal spread behavior.
2. Standard Deviation:
The standard deviation (sigma_S) of the spread is calculated to measure the volatility of the spread:
sigma_S = sqrt((1/P) * sum((S_i - mu_S)^2 from i=1 to P))
3. Upper and Lower Bollinger Bands:
The upper and lower Bollinger Bands are derived by adding and subtracting a multiple of the standard deviation from the moving average. The number of standard deviations is determined by a user-defined parameter k (default is 2.618).
- Upper Band:
Upper Band = mu_S + (k * sigma_S)
- Lower Band:
Lower Band = mu_S - (k * sigma_S)
These bands provide a dynamic range within which the spread typically fluctuates. When the spread moves outside of these bands, it is considered overbought or oversold, potentially offering trading opportunities.
Local view
🔶 Entry Conditions:
- Long Entry: A long position is triggered when the spread crosses below the lower Bollinger Band, indicating that the spread has become oversold and is likely to revert upward.
Spread < Lower Band
- Short Entry: A short position is triggered when the spread crosses above the upper Bollinger Band, indicating that the spread has become overbought and is likely to revert downward.
Spread > Upper Band
🔶 Risk Management and Profit-Taking:
The strategy incorporates multi-step take profits to lock in gains as the trade moves in favor. The position is gradually reduced at predefined profit levels, reducing risk while allowing part of the trade to continue running if the price keeps moving favorably.
Additionally, the strategy uses a hold period exit mechanism. If the trade does not hit any of the take-profit levels within a certain number of bars, the position is closed automatically to avoid excessive exposure to market risks.
█ Trade Direction
The trade direction is based on deviations of the spread from its historical norm:
- Long Trade: The strategy enters a long position when the spread crosses below the lower Bollinger Band, signaling an oversold condition where the spread is expected to narrow.
- Short Trade: The strategy enters a short position when the spread crosses above the upper Bollinger Band, signaling an overbought condition where the spread is expected to widen.
These entries rely on the assumption of mean reversion, where extreme deviations from the average spread are likely to revert over time.
█ Usage
The Bitcoin CME-Spot Bollinger Bands Strategy is ideal for traders looking to capitalize on price inefficiencies between Bitcoin futures and spot markets. It’s especially useful in volatile markets where large deviations between futures and spot prices occur.
- Market Conditions: This strategy is most effective in correlated markets, like CME futures and spot Bitcoin. Traders can adjust the Bollinger Bands period and standard deviation multiplier to suit different volatility regimes.
- Backtesting: Before deployment, backtesting the strategy across different market conditions and timeframes is recommended to ensure robustness. Adjust the take-profit steps and hold periods to reflect the trader’s risk tolerance and market behavior.
█ Default Settings
The default settings provide a balanced approach to spread trading using Bollinger Bands but can be adjusted depending on market conditions or personal trading preferences.
🔶 Bollinger Bands Period (200 bars):
This defines the number of bars used to calculate the moving average and standard deviation for the Bollinger Bands. A longer period smooths out short-term fluctuations and focuses on larger, more significant trends. Adjusting the period affects the responsiveness of the strategy:
- Shorter periods (e.g., 100 bars): Makes the strategy more reactive to short-term market fluctuations, potentially generating more signals but increasing the risk of false positives.
- Longer periods (e.g., 300 bars): Focuses on longer-term trends, reducing the frequency of trades and focusing only on significant deviations.
🔶 Standard Deviation Multiplier (2.618):
The multiplier controls how wide the Bollinger Bands are around the moving average. By default, the bands are set at 2.618 standard deviations away from the average, ensuring that only significant deviations trigger trades.
- Higher multipliers (e.g., 3.0): Require a more extreme deviation to trigger trades, reducing trade frequency but potentially increasing the accuracy of signals.
- Lower multipliers (e.g., 2.0): Make the bands narrower, increasing the number of trade signals but potentially decreasing their reliability.
🔶 Take-Profit Levels:
The strategy has four take-profit levels to gradually lock in profits:
- Level 1 (3%): 25% of the position is closed at a 3% profit.
- Level 2 (8%): 20% of the position is closed at an 8% profit.
- Level 3 (14%): 15% of the position is closed at a 14% profit.
- Level 4 (21%): 10% of the position is closed at a 21% profit.
Adjusting these take-profit levels affects how quickly profits are realized:
- Lower take-profit levels: Capture gains more quickly, reducing risk but potentially cutting off larger profits.
- Higher take-profit levels: Let trades run longer, aiming for bigger gains but increasing the risk of price reversals before profits are locked in.
🔶 Hold Days (20 bars):
The strategy automatically closes the position after 20 bars if none of the take-profit levels are hit. This feature prevents trades from being held indefinitely, especially if market conditions are stagnant. Adjusting this:
- Shorter hold periods: Reduce the duration of exposure, minimizing risks from market changes but potentially closing trades too early.
- Longer hold periods: Allow trades to stay open longer, increasing the chance for mean reversion but also increasing exposure to unfavorable market conditions.
By understanding how these default settings affect the strategy’s performance, traders can optimize the Bitcoin CME-Spot Bollinger Bands Strategy to their preferences, adapting it to different market environments and risk tolerances.
Rolling Straddle PremiumScript is Basically intended to provide insight's on the Rolling Straddle premium for the selected index based on the input settings.
Important thing to consider for the script to work seamlessly:
Specify the LTP in the input field (need not be very accurate)
Specify the Expiry Date for the Option Strike.
Ensure Profile matches to the chart script (Index Script)
Note: Zones marked in Blue, is the max level that indicator can track the option prices. beyond which it may fail to track, during such time consider reloading the indicator with Latest LTP .
Labels on the chart indicate that If i had shorted the Straddle, what would be my current position of that Straddle. however the rational behind shorting is only the pivot high points (not sure if this is right or wrong! )
Note On Labels: Labels are delayed basis the pivot point candles specified in the indicator settings.
EN: Entry Price (Straddle Premium) of the Strike Specified.
Cur: Current Price ( Current Straddle Premium ) of the Strike Specified.
SH: Max Straddle Premium ( Increase in Premium ) since position is active.
SL: Min Straddle Premium ( Premium Erosion ) since position is active.