RSI Graphique and Dashboard MTFMTF RSI Indicator - User Guide
Introduction:
The MTF RSI (Multi-Timeframe Relative Strength Index) Pine Script is designed to provide traders with a comprehensive view of the RSI (Relative Strength Index) across multiple timeframes. The script includes a primary chart displaying RSI values and a dashboard summarizing RSI trends for different time intervals.
Installation:
Copy the provided Pine Script.
Open the TradingView platform.
Create a new script.
Paste the copied code into the script editor.
Save and apply the script to your chart.
Primary Chart:
The primary chart displays RSI values for the selected timeframe (5, 15, 60, 240, 1440 minutes).
different color lines represent RSI values for different timeframes.
Overbought and Oversold Levels:
Overbought levels (70) are marked in red, while oversold levels (30) are marked in blue for different timeframes.
Dashboard:
The dashboard is a quick reference for RSI trends across multiple timeframes.
Each row represents a timeframe with corresponding RSI trend information.
Arrows (▲ for bullish, ▼ for bearish) indicate the current RSI trend.
Arrow colors represent the trend: blue for bullish, red for bearish.
Settings:
Users can customize the RSI length, background color, and other parameters.
The background color of the dashboard can be adjusted for light or dark themes.
Interpretation:
Bullish Trend: ▲ arrow and blue color.
Bearish Trend: ▼ arrow and red color.
RSI values above 70 may indicate overbought conditions, while values below 30 may indicate oversold conditions.
Practical Tips:
Timeframe Selection: Consider the trend alignment across different timeframes for comprehensive market analysis.
Confirmation: Use additional indicators or technical analysis to confirm RSI signals.
Backtesting: Before applying in live trading, conduct thorough backtesting to evaluate the script's performance.
Adjustment: Modify settings according to your trading preferences and market conditions.
Disclaimer:
This script is a tool for technical analysis and should be used in conjunction with other indicators. It is not financial advice, and users should conduct their own research before making trading decisions. Adjust settings based on personal preferences and risk tolerance. Use the script responsibly and at your own risk.
在腳本中搜尋"backtest"
MACD_RSI_trend_followingINFO:
This indicator can be used to build-up a strategy for trading of assets which are currently in trending phase.
My preference is to use it on slowly moving assets like GOLD and on higher timeframes, but practice may show that we find more usefull cases.
This script uses two indicators - MACD and RSI, as the timeframe that those are extracted for is configurable (defaults with the Chart TF, but can be any other selected by the user).
The strategy has the following simple idea - buy if any if the conditions below is true:
The selected TF MACD line crosses above the signal line and the TF RSI is above the user selected trigger value
The selected TF MACD line is above the signal line and the TF RSI crosses above the user selected trigger value
Once we're in position we wait for the selected TF MACD line to cross below the signal line, and then we set a SL at the low of that bar
DETAILS and USAGE:
In the current implementation I find two possible use cases for the indicator:
as a stand-alone indicator on the chart which can also fire alerts that can help to determine if we want to manually enter/exit trades based on them
can be used to connect to the Signal input of the TTS (TempalteTradingStrategy) by jason5480 in order to backtest it, thus effectively turning it into a strategy (instructions below in TTS CONNECTIVITY section)
In the example below we see a position opened at the bar after the buy indicator from the script has been triggered, and then later after the SL indicator from the script has been triggered a SL has been set on the lower wick of the closing candle, and the position eventually got closed once the price hit that level. Note that most of the drawing on the example snapshot below are from the TTS indicator following the buy/sell/SL conditions themseves:
Trading period can be selected from the indicator itself to limit to more interesting periods.
Arrow indications are drawn on the chart to indicate the trading conditions met in the script - green arrow for a buy signal indication and orange for LTF crossunder to indicate setting of SL.
SETTINGS:
Leaving all of the settings as in vanilla use case, as both the MACD and RSI indicator's settings follow the default ones for the stand-alone indicators themselves.
The start-end date is a time filter that can be extermely usefull when backtesting different time periods.
Pesonal preference is using the script on a D/W timeframe, while the indicator is configured to use Monthly chart.
The default value of the RSI filter is left to 50, which can be changed. I.e. if the RSI is above 50 we have a regime filter based on the MACD criteria.
EXTERNAL LIBRARIES:
The script uses a couple of external libraries:
HeWhoMustNotBeNamed/enhanced_ta/14 - collection of TA indicators
jason5480/tts_convention/3 - more details about the Template Trading Strategy below
I would like to highly appreciate and credit the work of both HeWhoMustNotBeNamed and jason5480 for providing them to the community.
TTS SETTINGS (NEEDED IF USED TO BACKTEST WITH TTS):
The TempalteTradingStrategy is a strategy script developed in Pine by jason5480, which I recommend for quick turn-around of testing different ideas on a proven and tested framework
I cannot give enough credit to the developer for the efforts put in building of the infrastructure, so I advice everyone that wants to use it first to get familiar with the concept and by checking
by checking jason5480's profile www.tradingview.com
The TTS itself is extremely functional and have a lot of properties, so its functionality is beyond the scope of the current script -
Again, I strongly recommend to be thoroughly epxlored by everyone that plans on using it.
In the nutshell it is a script that can be feed with buy/sell signals from an external indicator script and based on many configuration options it can determine how to execute the trades.
The TTS has many settings that can be applied, so below I will cover only the ones that differ from the default ones, at least according to my testing - do your own research, you may find something even better :)
The current/latest version that I've been using as of writing and testing this script is TTSv48
Settings which differ from the default ones:
from - False (time filter is from the indicator script itself)
Deal Conditions Mode - External (take enter/exit conditions from an external script)
🔌Signal 🛈➡ - MACD_RSI_trend_following: 🔌Signal to TTSv48 (this is the output from the indicator script, according to the TTS convention)
Sat/Sun - true (for crypto, in order to trade 24/7)
Order Type - STOP (perform stop order)
Distance Method - HHLL (HigherHighLowerLow - in order to set the SL according to the strategy definition from above)
The next are just personal preferenes, you can feel free to experiment according to your trading style
Take Profit Targets - 0 (either 100% in or out, no incremental stepping in or out of positions)
Dist Mul|Len Long/Short- 10 (make sure that we don't close on profitable trades by any reason)
Quantity Method - EQUITY (personal backtesting preference is to consider each backtest as a separate portfolio, so determine the position size by 100% of the allocated equity size)
Equity % - 100 (note above)
Dual_MACD_trendingINFO:
This indicator is useful for trending assets, as my preference is for low-frequency trading, thus using BTCUSD on 1D/1W chart
In the current implementation I find two possible use cases for the indicator:
- as a stand-alone indicator on the chart which can also fire alerts that can help to determine if we want to manually enter/exit trades based on the signals from it (1D/1W is good for non-automated trading)
- can be used to connect to the Signal input of the TTS (TempalteTradingStrategy) by jason5480 in order to backtest it, thus effectively turning it into a strategy (instructions below in TTS CONNECTIVITY section)
Trading period can be selected from the indicator itself to limit to more interesting periods.
Arrow indications are drawn on the chart to indicate the trading conditions met in the script - light green for HTF crossover, dark green for LTF crossover and orange for LTF crossunder.
Note that the indicator performs best in trending assets and markets, and it is advisable to use additional indicators to filter the trading conditions when market/asset is expected to move sideways.
DETAILS:
It uses a couple of MACD indicators - one from the current timeframe and one from a higher timeframe, as the crossover/crossunder cases of the MACD line and the signal line indicate the potential entry/exit points.
The strategy has the following flow:
- If the weekly MACD is positive (MACD line is over the signal line) we have a trading window.
- If we have a trading window, we buy when the daily macd line crosses AND closes above the signal line.
- If we are in a position, we await the daily MACD to cross AND close under the signal line, and only then place a stop loss under the wick of that closing candle.
The user can select both the higher (HTF) and lower (LTF) timeframes. Preferably the lower timeframe should be the one that the Chart is on for better visualization.
If one to decide to use the indicator as a strategy, it implements the following buy and sell criterias, which are feed to the TTS, but can be also manually managed via adding alerts from this indicator.
Since usually the LTF is preceeding the crossover compared to the HTF, then my interpretation of the strategy and flow that it follows is allowing two different ways to enter a trade:
- crossover (and bar close) of the macd over the signal line in the HIGH TIMEFRAME (no need to look at the LOWER TIMEFRMAE)
- crossover (and bar close) of the macd over the signal line in the LOW TIMEFRAME, as in this case we need to check also that the macd line is over the signal line for the HIGH TIMEFRAME as well (like a regime filter)
The exit of the trade is based on the lower timeframe MACD only, as we create a stop loss equal to the lower wick of the bar, once the macd line crosses below the signal line on that timeframe
SETTINGS:
All of the indicator's settings are for the vanilla/general case.
User can set all of the MACD parameters for both the higher and lower (current) timeframes, currently left to default of the MACD stand-alone indicator itself.
The start-end date is a time filter that can be extermely usefull when backtesting different time periods.
TTS SETTINGS (NEEDED IF USED TO BACKTEST WITH TTS)
The TempalteTradingStrategy is a strategy script developed in Pine by jason5480, which I recommend for quick turn-around of testing different ideas on a proven and tested framework
I cannot give enough credit to the developer for the efforts put in building of the infrastructure, so I advice everyone that wants to use it first to get familiar with the concept and by checking
by checking jason5480's profile www.tradingview.com
The TTS itself is extremely functional and have a lot of properties, so its functionality is beyond the scope of the current script -
Again, I strongly recommend to be thoroughly epxlored by everyone that plans on using it.
In the nutshell it is a script that can be feed with buy/sell signals from an external indicator script and based on many configuration options it can determine how to execute the trades.
The TTS has many settings that can be applied, so below I will cover only the ones that differ from the default ones, at least according to my testing - do your own research, you may find something even better :)
The current/latest version that I've been using as of writing and testing this script is TTSv48
Settings which differ from the default ones:
- from - False (time filter is from the indicator script itself)
- Deal Conditions Mode - External (take enter/exit conditions from an external script)
- 🔌Signal 🛈➡ - Dual_MACD: 🔌Signal to TTSv48 (this is the output from the indicator script, according to the TTS convention)
- Sat/Sun - true (for crypto, in order to trade 24/7)
- Order Type - STOP (perform stop order)
- Distance Method - HHLL (HigherHighLowerLow - in order to set the SL according to the strategy definition from above)
The next are just personal preferenes, you can feel free to experiment according to your trading style
- Take Profit Targets - 0 (either 100% in or out, no incremental stepping in or out of positions)
- Dist Mul|Len Long/Short- 10 (make sure that we don't close on profitable trades by any reason)
- Quantity Method - EQUITY (personal backtesting preference is to consider each backtest as a separate portfolio, so determine the position size by 100% of the allocated equity size)
- Equity % - 100 (note above)
EXAMPLES:
If used as a stand-alone indicator, the green arrows on the bottom will represent:
- light green - MACD line crossover signal line in the HTF
- darker green - MACD line crossover signal line in the LTF
- orange - MACD line crossunder signal line in the LTF
I recommend enabling the alerts from the script to cover those cases.
If used as an input to the TTS, we'll get more decorations on the chart from the TTS itself.
In the example below we open a trade on the next day of LTF crossover, then a few days later a crossunder in the LTF occurs, so we set a SL at the low of the wick of this day. Few days later the price doesn't recover and hits that SL, so the position is closed.
LineBreakIntroduction:
The LineBreak Indicator is a technical tool designed to assist traders in identifying potential trend reversals or continuations using a unique charting method known as Line Break charts. This indicator overlays Line Break chart patterns on the main price chart and generates Buy and Sell signals based on specific price movements. In this guide, we will explore the LineBreak Indicator's functionality and how to utilize it effectively in your trading strategy.
Indicator Components:
The LineBreak Indicator comprises several components that work together to identify potential trade signals:
Line Break Chart Creation:
The script starts with an indicator declaration, "@version=5," followed by the creation of the LineBreak chart overlay on the main price chart. Line Break charts focus solely on price movements, omitting time entirely.
Line Break Chart Data Retrieval:
The indicator requests Line Break chart data using the "ticker.linebreak" function, which generates Line Break brick patterns based on a specified brick size (in this case, 3). The script then retrieves the Line Break open, high, low, and close prices for analysis.
Buy and Sell Signal Generation:
The script generates Buy and Sell signals using plotshape functions and specific conditions based on Line Break chart patterns. These patterns involve the relationship between consecutive brick prices and their opening prices.
Alert Conditions:
The script establishes alert conditions for both Buy and Sell signals. These alerts notify traders when specific Line Break chart patterns are detected, ensuring timely awareness of potential trading opportunities.
How to Use the LineBreak Indicator:
Line Break Chart Analysis:
Begin by understanding the Line Break chart patterns displayed on the main price chart. Line Break charts focus on price movements rather than time intervals. An upward Line Break brick suggests bullish momentum, while a downward brick indicates bearish momentum.
Buy Signal Interpretation:
Pay attention to Buy signals generated by the indicator. A Buy signal is triggered when specific Line Break brick conditions are met, indicating a potential reversal from a downtrend to an uptrend. This suggests a potential opportunity to enter a long (Buy) trade.
Sell Signal Interpretation:
Likewise, be attentive to Sell signals produced by the indicator. A Sell signal occurs when predefined Line Break brick conditions are fulfilled, suggesting a potential reversal from an uptrend to a downtrend. This could signal a chance to enter a short (Sell) trade.
Alert Notifications:
To ensure you stay informed, set up alert conditions for Buy and Sell signals. Alerts can be customized to your preferences and communication channels, enabling you to promptly respond to potential trade setups.
Risk Management and Considerations:
Confirmation: While the LineBreak Indicator provides valuable insights, use it in conjunction with other technical analysis tools and indicators to confirm signals.
Backtesting: Before deploying the indicator in live trading, perform comprehensive backtesting on historical data to assess its performance and suitability for your trading strategy.
Position Sizing: Determine appropriate position sizes based on your risk tolerance and the signals provided by the LineBreak Indicator. Avoid overleveraging your trades.
Market Awareness: Stay aware of market conditions and news events that could influence price movements. The LineBreak Indicator is a tool to enhance your decision-making process, not a standalone strategy.
Conclusion:
The LineBreak Indicator introduces a different perspective on price movements through its unique charting method. By interpreting Line Break chart patterns and acting on generated Buy and Sell signals, traders can make informed trading decisions. Practice proper risk management and integrate the LineBreak Indicator into a comprehensive trading strategy to achieve consistent and successful trading outcomes.
Please remember that this guide provides a high-level overview of the LineBreak Indicator and its usage. It's essential to thoroughly test and validate any trading strategy before implementing it in a live trading environment.
RenkoIndicatorIntroduction:
The Renko Indicator is a powerful tool designed to help traders identify trends and potential trade opportunities in the financial markets. This indicator overlays a Renko chart on the main price chart and generates Buy and Sell signals based on Renko brick movements. Renko charts are unique in that they focus solely on price movements, ignoring the element of time. In this guide, we will walk you through how to use the Renko Indicator effectively in your trading strategy.
Indicator Components:
The Renko Indicator consists of several components, each serving a specific purpose in aiding your trading decisions.
Market Sentiment Calculation:
At the top of the script, the indicator calculates market sentiment by analyzing recent price action. It determines whether the market sentiment is Bullish, Bearish, or Neutral based on the highest and lowest prices within specific time periods. This information provides you with a broader context for potential trading decisions.
Renko Chart Creation:
The indicator creates a Renko chart overlay on the main price chart using the Average True Range (ATR) method. ATR is used to calculate the brick size for the Renko chart, allowing you to adjust the sensitivity of the chart to price movements.
Renko Open and Close Midpoint:
The script plots the midpoint of Renko open and close prices as a line on the main chart. This visualization helps you understand the direction of Renko bricks and identify trends.
Buy and Sell Signal Generation:
The script generates Buy and Sell signals as label shapes on the chart. A Buy signal is generated when the Renko close price crosses above the Renko open price, indicating potential upward momentum. Conversely, a Sell signal is generated when the Renko close price crosses below the Renko open price, suggesting potential downward momentum.
Alert Conditions:
To ensure you never miss a trading opportunity, the script sets up alert conditions for Buy and Sell signals. These alerts notify you when the specified conditions for potential trades are met. Alerts can be customized to your preference, allowing you to receive notifications via your chosen communication channels.
How to Use the Renko Indicator:
Market Sentiment Analysis:
Start by analyzing the calculated market sentiment. This information helps you understand the broader trend in the market. A Bullish sentiment indicates potential upward movement, a Bearish sentiment suggests potential downward movement, and a Neutral sentiment signals uncertainty.
Renko Chart Interpretation:
Observe the Renko chart overlay and its midpoint line. Upward-trending Renko bricks suggest Bullish momentum, while downward-trending bricks indicate Bearish momentum. Use the Renko chart to identify trends and confirm your trading bias.
Buy and Sell Signals:
Pay close attention to the Buy and Sell signals generated by the indicator. A Buy signal occurs when the Renko close price crosses above the Renko open price. Conversely, a Sell signal occurs when the Renko close price crosses below the Renko open price. These signals highlight potential entry points for trades.
Alert Notifications:
Make use of the alert conditions to receive real-time notifications for Buy and Sell signals. Alerts help you stay informed even when you're not actively watching the charts, allowing you to promptly take action on potential trade opportunities.
Risk Management and Considerations:
Confirmation: While the Renko Indicator provides valuable insights, it's crucial to use it in conjunction with other technical and fundamental analysis tools for confirmation.
Backtesting: Before implementing the indicator in live trading, conduct thorough backtesting on historical data to assess its performance and suitability for your trading strategy.
Position Sizing: Determine appropriate position sizes based on your risk tolerance and the signals provided by the indicator. Avoid overleveraging your trades.
Market Conditions: Be mindful of market conditions and news events that could impact price movements. Use the Renko Indicator as a tool to enhance your decision-making process, not as a standalone strategy.
Conclusion:
The Renko Indicator offers a unique perspective on price movements and can be a valuable addition to your trading toolkit. By analyzing market sentiment, interpreting Renko chart patterns, and acting on Buy and Sell signals, you can make informed trading decisions. Remember to practice proper risk management and integrate the Renko Indicator into a comprehensive trading strategy to achieve consistent and successful trading outcomes.
Optimized Zhaocaijinbao strategyIntroduction:
The Optimized Zhaocaijinbao strategy is a mid and long-term quantitative trading strategy that combines momentum and trend factors. It generates buy and sell signals by using a combination of exponential moving averages, moving averages, volume and slope indicators. It generates buy signals when the stock is above the 35-day moving average, the trading volume is higher than the 20-day moving average, and the stock is in an upward trend on a weekly timeframe."招财进宝" is a Chinese phrase that can be translated to "Attract Wealth and Bring in Treasure" in English. It is a common expression used to wish for good luck and prosperity in various contexts, such as in business or personal finances.
Highlights:
The strategy has several special optimizations that make it unique.
Firstly, the strategy is optimized for T+1 trading in the Chinese stock market and is only suitable for long positions. The optimizations are also applicable to international stock markets.
Secondly, the trend strategy is optimized to only show indicators on the right side and oscillations. This helps to prevent false signals in choppy markets.
Thirdly, the strategy uses a risk factor for dynamic position sizing to ensure position sizes are adjusted according to the current net asset value and risk preferences. This helps to lower drawdown risks.
The strategy has good resilience even without using stop loss modules in backtesting, making it suitable for trading hourly, 2-hourly, and daily K-line charts (depending on the stock being traded). We recommend experimenting with backtesting using SSE 1-hour or 2-hour or daily Kline charts.
Backtesting outcomes:
The strategy was backtested over the period from October 13th, 2005 to April 14th, 2023, using daily candlestick charts for the commodity code SSE:600763, with a currency of CNY and tick size of 0.01. The strategy used an initial capital of 1,000,000 CNY, with order sizes set to 10% equity and a pyramid of 1 order. The strategy also had a Max Position Size of 0.01 and a Risk Factor of 2.
Here is a summary of the performance of the trading strategy:
Total net profit: 288,577.32 CNY, representing a return of 128.86%
Total number of closed trades: 61
Winning trades: 37, representing a win rate of 60.66%
Profit factor: 2.415
Largest losing trade: 222,021.46 CNY, representing a loss of 14.08%
Average trade: 21,124.22 CNY, representing a return of 3.1%
Average holding period for all trades: 12 days
Conclusion:
In conclusion, the Optimized Zhaocaijinbao strategy is a mid and long-term quantitative trading strategy that combines momentum and trend factors. It is suitable for both Chinese stocks and global stocks. While the Optimized Zhaocaijinbao strategy has performed well in backtesting, it is important to note that past performance is not a guarantee of future results. Traders should conduct their own research and analysis and exercise caution when using any trading strategy.
Pivot Highs&lows: Short/Medium/Long-term + Spikeyness FilterShows Pivot Highs & Lows defined or 'Graded' on a fractal basis: Short-term, medium-term and long-term. Also applies 'Spikeyness' condition by default to filter-out weak/rounded pivots
ES1! 4hr chart (CME) shown above, with lookback = 15; clearly identifying the major highs & lows on the basis of how they are fractally 'nested' within lesser Pivots.
-- in the above chart Short term pivot highs (STH) are simply represented by green 'ʌ', and short-term pivot lows (STL) are simply represented by orange 'v'.
//Basics: (as applying to pivot highs, the following is reversed for pivot lows)
-Short term highs (STH) are simple pivot highs, albeit refined from standard with the 'spikeyness' filter.
-Medium-term highs (MTH) are defined as having a lower STH on either side of them.
-Long-term highs (LTH) are defined as having a lower MTH on either side of them.
//Purpose:
-Education: Quick and easy visualization of the strength or importance of a pivot high or low; a way of grading them based on their larger context.
-Backtesting: use in combination with other trading methods when backtesting to see the relative significance and price sensitivity of LTHs/LTLs compared to lower grade highs and lows.
//Settings:
-Choose Pivot lookback/lookforward bars: One setting, the basis from which all further pivot calculations are done.
-Toggle on/off 'Spikeyness' condition to filter-out weak/rounded/unimpressive pivot highs or lows (default is ON).
-Toggle on/off each of STH, MTH, LTH, STL, MTL, LTL; and choose label text-styles/colors/sizes independently.
-Set text Vertically, horizonally, or simply use 'ʌ' or 'v' symbols if you want to declutter your chart.
//Usage notes:
-Pivots take time to print (lookback bars must have elapsed before confirmation). Fractally nested pivots as here (i.e. a LTH), take even longer to print/confirm, so please be patient.
-Works across timeframes & Assets. Different timeframes may require slightly tweaked lookback/forward settings for optimal use; default is 15 bars.
Example usage with just symbolic labels short-term, med-term, long-term with 1x, 2x and 3x ʌ/v respectively:
Donchian Trend V1The Donchian Trend strategy is a trend-following approach that uses the Donchian Channels indicator to identify potential entry and exit points in a security. The Donchian Channels are formed by taking the highest high and the lowest low prices over a specified period and plotting them as upper and lower channels around the current price. The width of the channels indicates the level of volatility in the market.
In this strategy, the Donchian Channels are used as a trend filter to determine the direction of the market. When the price is above the upper channel, it suggests an uptrend, and when the price is below the lower channel, it indicates a downtrend. The length of the Donchian Channels is a key parameter in the strategy, as it determines the look-back period for identifying the high and low prices.
Additional Logic: To further refine the entry and exit signals, The script uses two moving averages, a fast one (MA5) and a slow one (MA45), to identify trends and generate trading signals. When the fast moving average crosses above the slow moving average, a buy signal is generated, indicating that the market is trending upwards. Conversely, when the fast moving average crosses below the slow moving average, a sell signal is generated, indicating that the market is trending downwards.
Evaluation: The script was backtested on historical price data for the pair. The backtest results showed that the script was able to generate a net profit of , with a profit factor of and a Sharpe ratio of . The script also includes metrics such as the number of winning and losing trades, the average trade, and the largest winning and losing trades.
The strategy is evaluated based on its net profit, gross profit, gross loss, max run-up, max drawdown, buy & hold return, Sharpe ratio, Sortino ratio, and profit factor. The parameters used in the backtest include a Donchian Channel length of 42, which corresponds to a weekly time with divide of 4h time frame, and a short-term MA of 5 and a long-term MA of 45 for more accurate entry and exit signals.
Disclaimer: This script is for educational and research purposes only and should not be used for trading with real money without further testing and validation. Past performance is not indicative of future results.
Multi-Confluence Swing Hunter V1# Multi-Confluence Swing Hunter V1 - Complete Description
Overview
The Multi-Confluence Swing Hunter V1 is a sophisticated low timeframe scalping strategy specifically optimized for MSTR (MicroStrategy) trading. This strategy employs a comprehensive point-based scoring system that combines optimized technical indicators, price action analysis, and reversal pattern recognition to generate precise trading signals on lower timeframes.
Performance Highlight:
In backtesting on MSTR 5-minute charts, this strategy has demonstrated over 200% profit performance, showcasing its effectiveness in capturing rapid price movements and volatility patterns unique to MicroStrategy's trading behavior.
The strategy's parameters have been fine-tuned for MSTR's unique volatility characteristics, though they can be optimized for other high-volatility instruments as well.
## Key Innovation & Originality
This strategy introduces a unique **dual scoring system** approach:
- **Entry Scoring**: Identifies swing bottoms using 13+ different technical criteria
- **Exit Scoring**: Identifies swing tops using inverse criteria for optimal exit timing
Unlike traditional strategies that rely on simple indicator crossovers, this system quantifies market conditions through a weighted scoring mechanism, providing objective, data-driven entry and exit decisions.
## Technical Foundation
### Optimized Indicator Parameters
The strategy utilizes extensively backtested parameters specifically optimized for MSTR's volatility patterns:
**MACD Configuration (3,10,3)**:
- Fast EMA: 3 periods (vs standard 12)
- Slow EMA: 10 periods (vs standard 26)
- Signal Line: 3 periods (vs standard 9)
- **Rationale**: These faster parameters provide earlier signal detection while maintaining reliability, particularly effective for MSTR's rapid price movements and high-frequency volatility
**RSI Configuration (21-period)**:
- Length: 21 periods (vs standard 14)
- Oversold: 30 level
- Extreme Oversold: 25 level
- **Rationale**: The 21-period RSI reduces false signals while still capturing oversold conditions effectively in MSTR's volatile environment
**Parameter Adaptability**: While optimized for MSTR, these parameters can be adjusted for other high-volatility instruments. Faster-moving stocks may benefit from even shorter MACD periods, while less volatile assets might require longer periods for optimal performance.
### Scoring System Methodology
**Entry Score Components (Minimum 13 points required)**:
1. **RSI Signals** (max 5 points):
- RSI < 30: +2 points
- RSI < 25: +2 points
- RSI turning up: +1 point
2. **MACD Signals** (max 8 points):
- MACD below zero: +1 point
- MACD turning up: +2 points
- MACD histogram improving: +2 points
- MACD bullish divergence: +3 points
3. **Price Action** (max 4 points):
- Long lower wick (>50%): +2 points
- Small body (<30%): +1 point
- Bullish close: +1 point
4. **Pattern Recognition** (max 8 points):
- RSI bullish divergence: +4 points
- Quick recovery pattern: +2 points
- Reversal confirmation: +4 points
**Exit Score Components (Minimum 13 points required)**:
Uses inverse criteria to identify swing tops with similar weighting system.
## Risk Management Features
### Position Sizing & Risk Control
- **Single Position Strategy**: 100% equity allocation per trade
- **No Overlapping Positions**: Ensures focused risk management
- **Configurable Risk/Reward**: Default 5:1 ratio optimized for volatile assets
### Stop Loss & Take Profit Logic
- **Dynamic Stop Loss**: Based on recent swing lows with configurable buffer
- **Risk-Based Take Profit**: Calculated using risk/reward ratio
- **Clean Exit Logic**: Prevents conflicting signals
## Default Settings Optimization
### Key Parameters (Optimized for MSTR/Bitcoin-style volatility):
- **Minimum Entry Score**: 13 (ensures high-conviction entries)
- **Minimum Exit Score**: 13 (prevents premature exits)
- **Risk/Reward Ratio**: 5.0 (accounts for volatility)
- **Lower Wick Threshold**: 50% (identifies true hammer patterns)
- **Divergence Lookback**: 8 bars (optimal for swing timeframes)
### Why These Defaults Work for MSTR:
1. **Higher Score Thresholds**: MSTR's volatility requires more confirmation
2. **5:1 Risk/Reward**: Compensates for wider stops needed in volatile markets
3. **Faster MACD**: Captures momentum shifts quickly in fast-moving stocks
4. **21-period RSI**: Reduces noise while maintaining sensitivity
## Visual Features
### Score Display System
- **Green Labels**: Entry scores ≥10 points (below bars)
- **Red Labels**: Exit scores ≥10 points (above bars)
- **Large Triangles**: Actual trade entries/exits
- **Small Triangles**: Reversal pattern confirmations
### Chart Cleanliness
- Indicators plotted in separate panes (MACD, RSI)
- TP/SL levels shown only during active positions
- Clear trade markers distinguish signals from actual trades
## Backtesting Specifications
### Realistic Trading Conditions
- **Commission**: 0.1% per trade
- **Slippage**: 3 points
- **Initial Capital**: $1,000
- **Account Type**: Cash (no margin)
### Sample Size Considerations
- Strategy designed for 100+ trade sample sizes
- Recommended timeframes: 4H, 1D for swing trading
- Optimal for trending/volatile markets
## Strategy Limitations & Considerations
### Market Conditions
- **Best Performance**: Trending markets with clear swings
- **Reduced Effectiveness**: Highly choppy, sideways markets
- **Volatility Dependency**: Optimized for moderate to high volatility assets
### Risk Warnings
- **High Allocation**: 100% position sizing increases risk
- **No Diversification**: Single position strategy
- **Backtesting Limitation**: Past performance doesn't guarantee future results
## Usage Guidelines
### Recommended Assets & Timeframes
- **Primary Target**: MSTR (MicroStrategy) - 5min to 15min timeframes
- **Secondary Targets**: High-volatility stocks (TSLA, NVDA, COIN, etc.)
- **Crypto Markets**: Bitcoin, Ethereum (with parameter adjustments)
- **Timeframe Optimization**: 1min-15min for scalping, 30min-1H for swing scalping
### Timeframe Recommendations
- **Primary Scalping**: 5-minute and 15-minute charts
- **Active Monitoring**: 1-minute for precise entries
- **Swing Scalping**: 30-minute to 1-hour timeframes
- **Avoid**: Sub-1-minute (excessive noise) and above 4-hour (reduces scalping opportunities)
## Technical Requirements
- **Pine Script Version**: v6
- **Overlay**: Yes (plots on price chart)
- **Additional Panes**: MACD and RSI indicators
- **Real-time Compatibility**: Confirmed bar signals only
## Customization Options
All parameters are fully customizable through inputs:
- Indicator lengths and levels
- Scoring thresholds
- Risk management settings
- Visual display preferences
- Date range filtering
## Conclusion
This scalping strategy represents a comprehensive approach to low timeframe trading that combines multiple technical analysis methods into a cohesive, quantified system specifically optimized for MSTR's unique volatility characteristics. The optimized parameters and scoring methodology provide a systematic way to identify high-probability scalping setups while managing risk effectively in fast-moving markets.
The strategy's strength lies in its objective, multi-criteria approach that removes emotional decision-making from scalping while maintaining the flexibility to adapt to different instruments through parameter optimization. While designed for MSTR, the underlying methodology can be fine-tuned for other high-volatility assets across various markets.
**Important Disclaimer**: This strategy is designed for experienced scalpers and is optimized for MSTR trading. The high-frequency nature of scalping involves significant risk. Past performance does not guarantee future results. Always conduct your own analysis, consider your risk tolerance, and be aware of commission/slippage costs that can significantly impact scalping profitability.
GannLSVZO Indicator [Algo Alert]The Volume Zone oscillator breaks up volume activity into positive and negative categories. It is positive when the current closing price is greater than the prior closing price and negative when it's lower than the prior closing price. The resulting curve plots through relative percentage levels that yield a series of buy and sell signals, depending on level and indicator direction.
The Gann Laplace Smoothed Volume Zone Oscillator GannLSVZO is a refined version of the Volume Zone Oscillator, enhanced by the implementation of the upgraded Discrete Fourier Transform, the Laplace Stieltjes Transform. Its primary function is to streamline price data and diminish market noise, thus offering a clearer and more precise reflection of price trends.
By combining the Laplace with Gann Swing Entries and Exits (orange X) and with Ehler's white noise histogram, users gain a comprehensive perspective on volume-related market conditions.
HOW TO USE THE INDICATOR:
The default period is 2 but can be adjusted after backtesting. (I suggest 5 VZO length and NoiceR max length 8 as-well)
The VZO points to a positive trend when it is rising above the 0% level, and a negative trend when it is falling below the 0% level. 0% level can be adjusted in setting by adjusting VzoDifference. Oscillations rising below 0% level or falling above 0% level result in a natural trend.
ORIGINALITY & USFULLNESS:
Personal combination of Gann swings and Laplace Stieltjes Transform of a price which results in less noise Volume Zone Oscillator.
The Laplace Stieltjes Transform is a mathematical technique that transforms discrete data from the time domain into its corresponding representation in the frequency domain. This process involves breaking down a signal into its individual frequency components, thereby exposing the amplitude and phase characteristics inherent in each frequency element.
This indicator utilizes the concept of Ehler's Universal Oscillator and displays a histogram, offering critical insights into the prevailing levels of market noise. The Ehler's Universal Oscillator is grounded in a statistical model that captures the erratic and unpredictable nature of market movements. Through the application of this principle, the histogram aids traders in pinpointing times when market volatility is either rising or subsiding.
The Gann swings and the Gan swing strategy is developed by meomeo105, this Gann high and low algorithm forms the basis of the EMA modification.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is oscillator?
Oscillators are chart indicators that can assist a trader in determining overbought or oversold conditions in ranging (non-trending) markets.
What is volume zone oscillator?
Price Zone Oscillator measures if the most recent closing price is above or below the preceding closing price.
Volume Zone Oscillator is Volume multiplied by the 1 or -1 depending on the difference of the preceding 2 close prices and smoothed with Exponential moving Average.
What does this mean?
If the VZO is above 0 and VZO is rising. We have a bullish trend. Most likely.
If the VZO is below 0 and VZO is falling. We have a bearish trend. Most likely.
Rising means that VZO on close is higher than the previous day.
Falling means that VZO on close is lower than the previous day.
What if VZO is falling above 0 line?
It means we have a high probability of a bearish trend.
Thus the indicator returns 0 and Strategy closes all it's positions when falling above 0 (or rising bellow 0) and we combine higher and lower timeframes to gauge the trend.
What is approximation and smoothing?
They are mathematical concepts for making a discrete set of numbers a
continuous curved line.
Laplace Stieltjes Transform approximation of a close price are taken from aprox library.
Key Features:
You can tailor the Indicator/Strategy to your preferences with adjustable parameters such as VZO length, noise reduction settings, and smoothing length.
Volume Zone Oscillator (VZO) shows market sentiment with the VZO, enhanced with Exponential Moving Average (EMA) smoothing for clearer trend identification.
Noise Reduction leverages Euler's White noise capabilities for effective noise reduction in the VZO, providing a cleaner and more accurate representation of market dynamics.
Choose between the traditional Fast Laplace Stieltjes Transform (FLT) and the innovative Double Discrete Fourier Transform (DTF32) soothed price series to suit your analytical needs.
Use dynamic calculation of Laplace coefficient or the static one. You may modify those inputs and Strategy entries with Gann swings.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame. I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
Fine-tune Inputs: Gann + Laplace Smooth Volume Zone OscillatorUse this Strategy to Fine-tune inputs for the GannLSVZ0 Indicator.
Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame.
MEANINGFUL DESCRIPTION:
The Volume Zone oscillator breaks up volume activity into positive and negative categories. It is positive when the current closing price is greater than the prior closing price and negative when it's lower than the prior closing price. The resulting curve plots through relative percentage levels that yield a series of buy and sell signals, depending on level and indicator direction.
The Gann Laplace Smoothed Volume Zone Oscillator GannLSVZO is a refined version of the Volume Zone Oscillator, enhanced by the implementation of the upgraded Discrete Fourier Transform, the Laplace Stieltjes Transform. Its primary function is to streamline price data and diminish market noise, thus offering a clearer and more precise reflection of price trends.
By combining the Laplace with Gann Swing Entries and with Ehler's white noise histogram, users gain a comprehensive perspective on volume-related market conditions.
HOW TO USE THE INDICATOR:
The default period is 2 but can be adjusted after backtesting. (I suggest 5 VZO length and NoiceR max length 8 as-well)
The VZO points to a positive trend when it is rising above the 0% level, and a negative trend when it is falling below the 0% level. 0% level can be adjusted in setting by adjusting VzoDifference. Oscillations rising below 0% level or falling above 0% level result in a natural trend.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
When Indicator/Strategy returns 0 or natural trend, Strategy Closes All it's positions.
ORIGINALITY & USFULLNESS:
Personal combination of Gann swings and Laplace Stieltjes Transform of a price which results in less noise Volume Zone Oscillator.
The Laplace Stieltjes Transform is a mathematical technique that transforms discrete data from the time domain into its corresponding representation in the frequency domain. This process involves breaking down a signal into its individual frequency components, thereby exposing the amplitude and phase characteristics inherent in each frequency element.
This indicator utilizes the concept of Ehler's Universal Oscillator and displays a histogram, offering critical insights into the prevailing levels of market noise. The Ehler's Universal Oscillator is grounded in a statistical model that captures the erratic and unpredictable nature of market movements. Through the application of this principle, the histogram aids traders in pinpointing times when market volatility is either rising or subsiding.
The Gann swing strategy is developed by meomeo105, this Gann high and low algorithm forms the basis of the EMA modification.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is oscillator?
Oscillators are chart indicators that can assist a trader in determining overbought or oversold conditions in ranging (non-trending) markets.
What is volume zone oscillator?
Price Zone Oscillator measures if the most recent closing price is above or below the preceding closing price.
Volume Zone Oscillator is Volume multiplied by the 1 or -1 depending on the difference of the preceding 2 close prices and smoothed with Exponential moving Average.
What does this mean?
If the VZO is above 0 and VZO is rising. We have a bullish trend. Most likely.
If the VZO is below 0 and VZO is falling. We have a bearish trend. Most likely.
Rising means that VZO on close is higher than the previous day.
Falling means that VZO on close is lower than the previous day.
What if VZO is falling above 0 line?
It means we have a high probability of a bearish trend.
Thus the indicator returns 0 and Strategy closes all it's positions when falling above 0 (or rising bellow 0) and we combine higher and lower timeframes to gauge the trend.
What is approximation and smoothing?
They are mathematical concepts for making a discrete set of numbers a
continuous curved line.
Laplace Stieltjes Transform approximation of a close price are taken from aprox library.
Key Features:
You can tailor the Indicator/Strategy to your preferences with adjustable parameters such as VZO length, noise reduction settings, and smoothing length.
Volume Zone Oscillator (VZO) shows market sentiment with the VZO, enhanced with Exponential Moving Average (EMA) smoothing for clearer trend identification.
Noise Reduction leverages Euler's White noise capabilities for effective noise reduction in the VZO, providing a cleaner and more accurate representation of market dynamics.
Choose between the traditional Fast Laplace Stieltjes Transform (FLT) and the innovative Double Discrete Fourier Transform (DTF32) soothed price series to suit your analytical needs.
Use dynamic calculation of Laplace coefficient or the static one. You may modify those inputs and Strategy entries with Gann swings.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame. I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
Retest Confirm Point TibbuCreating a "Retest Confirm Point" indicator that generates buy and sell signals involves defining criteria to confirm that a price retest is valid before issuing a trade signal. This generally requires identifying a key level (such as support, resistance, or a trendline), detecting a retest of this level, and then confirming the validity of the retest.
Here’s a Pine Script example to help you create such an indicator. This script identifies and confirms retests of previous highs and lows, and generates buy and sell signals based on those retests: Explanation:
Recent High and Low:
The script identifies the highest and lowest prices over a specified lookback period.
These levels are plotted on the chart as reference points.
Retest Conditions:
Retest High: The closing price is within a buffer range around the recent high.
Retest Low: The closing price is within a buffer range around the recent low.
Confirmation:
Confirm High: The closing price reaches a new high over a set number of bars after the retest condition.
Confirm Low: The closing price reaches a new low over a set number of bars after the retest condition.
Signals:
Buy Signal: Issued when a confirmed retest of the recent high occurs.
Sell Signal: Issued when a confirmed retest of the recent low occurs.
Customization:
Lookback Period: Adjust to determine the historical range for finding recent highs and lows.
Confirmation Bars: Change the number of bars used to confirm the retest.
Retest Buffer: Adjust the percentage buffer to fine-tune the retest conditions.
Testing and Optimization:
Backtest: Always backtest the strategy on historical data to ensure it behaves as expected.
Adjust Parameters: Modify parameters based on the asset, timeframe, and market conditions.
Feel free to modify this script further based on your specific trading strategy and needs. If you need help with any additional features or further customization, let me know!
ChatGPT can make mistakes. Check important info.
Fine-tune Inputs: Fourier Smoothed Volume zone oscillator WFSVZ0Use this Strategy to Fine-tune inputs for the (W&)FSVZ0 Indicator.
Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame.
MEANINGFUL DESCRIPTION:
The Volume Zone oscillator breaks up volume activity into positive and negative categories. It is positive when the current closing price is greater than the prior closing price and negative when it's lower than the prior closing price. The resulting curve plots through relative percentage levels that yield a series of buy and sell signals, depending on level and indicator direction.
The Wavelet & Fourier Smoothed Volume Zone Oscillator (W&)FSVZO is a refined version of the Volume Zone Oscillator, enhanced by the implementation of the Discrete Fourier Transform . Its primary function is to streamline price data and diminish market noise, thus offering a clearer and more precise reflection of price trends.
By combining the Wavalet and Fourier aproximation with Ehler's white noise histogram, users gain a comprehensive perspective on volume-related market conditions.
HOW TO USE THE INDICATOR:
The default period is 2 but can be adjusted after backtesting. (I suggest 5 VZO length and NoiceR max length 8 as-well)
The VZO points to a positive trend when it is rising above the 0% level, and a negative trend when it is falling below the 0% level. 0% level can be adjusted in setting by adjusting VzoDifference. Oscillations rising below 0% level or falling above 0% level result in a natural trend.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
When I ndicator/Strategy returns 0 or natural trend , Strategy Closes All it's positions.
ORIGINALITY & USFULLNESS:
Personal combination of Fourier and Wavalet aproximation of a price which results in less noise Volume Zone Oscillator.
The Wavelet Transform is a powerful mathematical tool for signal analysis, particularly effective in analyzing signals with varying frequency or non-stationary characteristics. It dissects a signal into wavelets, small waves with varying frequency and limited duration, providing a multi-resolution analysis. This approach captures both frequency and location information, making it especially useful for detecting changes or anomalies in complex signals.
The Discrete Fourier Transform (DFT) is a mathematical technique that transforms discrete data from the time domain into its corresponding representation in the frequency domain. This process involves breaking down a signal into its individual frequency components, thereby exposing the amplitude and phase characteristics inherent in each frequency element.
This indicator utilizes the concept of Ehler's Universal Oscillator and displays a histogram, offering critical insights into the prevailing levels of market noise. The Ehler's Universal Oscillator is grounded in a statistical model that captures the erratic and unpredictable nature of market movements. Through the application of this principle, the histogram aids traders in pinpointing times when market volatility is either rising or subsiding.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is oscillator?
Oscillators are chart indicators that can assist a trader in determining overbought or oversold conditions in ranging (non-trending) markets.
What is volume zone oscillator?
Price Zone Oscillator measures if the most recent closing price is above or below the preceding closing price.
Volume Zone Oscillator is Volume multiplied by the 1 or -1 depending on the difference of the preceding 2 close prices and smoothed with Exponential moving Average.
What does this mean?
If the VZO is above 0 and VZO is rising. We have a bullish trend. Most likely.
If the VZO is below 0 and VZO is falling. We have a bearish trend. Most likely.
Rising means that VZO on close is higher than the previous day.
Falling means that VZO on close is lower than the previous day.
What if VZO is falling above 0 line?
It means we have a high probability of a bearish trend.
Thus the indicator returns 0 and Strategy closes all it's positions when falling above 0 (or rising bellow 0) and we combine higher and lower timeframes to gauge the trend.
In the next Image you can see that trend is negative on 4h, negative on 12h and positive on 1D. That means trend is negative.
I am sorry, the chart is a bit messy. The idea is to use the indicator over more than 1 Timeframe.
What is approximation and smoothing?
They are mathematical concepts for making a discrete set of numbers a
continuous curved line.
Fourier and Wavelet approximation of a close price are taken from aprox library.
Key Features:
You can tailor the Indicator/Strategy to your preferences with adjustable parameters such as VZO length, noise reduction settings, and smoothing length.
Volume Zone Oscillator (VZO) shows market sentiment with the VZO, enhanced with Exponential Moving Average (EMA) smoothing for clearer trend identification.
Noise Reduction leverages Euler's White noise capabilities for effective noise reduction in the VZO, providing a cleaner and more accurate representation of market dynamics.
Choose between the traditional Fast Fourier Transform (FFT) , the innovative Double Discrete Fourier Transform (DTF32) and Wavelet soothed Fourier soothed price series to suit your analytical needs.
Image of Wavelet transform with FAST settings, Double Fourier transform with FAST settings. Improved noice reduction with SLOW settings, and standard FSVZO with SLOW settings:
Fast setting are setting by default:
VZO length = 2
NoiceR max Length = 2
Slow settings are:
VZO length = 5 or 7
NoiceR max Length = 8
As you can see fast setting are more volatile. I suggest averaging fast setting on 4h 12h 1d 2d 3d 4d W and M Timeframe to get a clear view on market trend.
What if I want long only when VZO is rising and above 15 not 0?
You have set Setting VzoDifference to 15. That reduces the number of trend changes.
Example of W&FSVZO with VzoDifference 15 than 0:
VZO crossed 0 line but not 15 line and that's why Indicator returns 0 in one case an 1 in another.
What is Smooth length setting?
A way of calculating Bullish or Bearish (W&)FSVZO .
If smooth length is 2 the trend is rising if:
rising = VZO > ta.ema(VZO, 2)
Meaning that we check if VZO is higher that exponential average of the last 2 elements.
If smooth length is 1 the trend is rising if:
rising = VZO_ > VZO_
Use this Strategy to fine-tune inputs for the (W&)FSVZO Indicator.
(Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data)
I suggest using " Close all " input False when fine-tuning Inputs for 1 TimeFrame . When you export data to Excel/Numbers/GSheets I suggest using " Close all " input as True , except for the lowest TimeFrame . I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
Booz StrategyBooz Backtesting : Booz Backtesting is a method for analyzing the performance of your current trading strategy . Booz Backtesting aims to help you generate results and evaluate risk and return without risking real capital.
The Booz Backtesting is the Booz Super Swing Indicator equivalent but gives you the ability to backtest data on different charts.
This is an Indicator created for the purpose of identifying trends in Multiple Markets, it is based on Moving Average Crossover and extra features.
Swing Trading: This function allows you to navigate the entire trend until it is not strong enough, so you can compare it with fixed parameters such as Take Profit and Stop Loss.
Take Profit and Stop Loss function: With this function you will be able to choose the most optimal parameters and see in real time the results in order to choose the best combination of parameters.
Leverage : We have this function for the futures markets where you can check which is the most appropriate leverage for your operation.
Trend Filter: allows you to take multiple entries in the same direction of the market.
If the market crosses below the 200 moving average, it will take only short entries.
If the market crosses above the 200 moving average, it will take only long entries.
Timeframes
Charting from 1 Hour, 4 Hour, Daily, Weekly, Weekly
Markets :Booz Backtesting can be tested in Cryptocurrency, Stocks and Futures markets.
Background Color : at a glance, you can see what cycle the market is in.
Green background : Shows that the market is in a bullish cycle.
Red background: Shows that the market is in a bearish cycle.
Bozz Strategy
Booz Backtesting : Booz Backtesting is a method for analyzing the performance of your current trading strategy . Booz Backtesting aims to help you generate results and evaluate risk and return without risking real capital.
The Booz Backtesting is the Booz Super Swing Indicator equivalent but gives you the ability to backtest data on different charts.
This is an Indicator created for the purpose of identifying trends in Multiple Markets, it is based on Moving Average Crossover and extra features.
Swing Trading: This function allows you to navigate the entire trend until it is not strong enough, so you can compare it with fixed parameters such as Take Profit and Stop Loss.
Take Profit and Stop Loss function: With this function you will be able to choose the most optimal parameters and see in real time the results in order to choose the best combination of parameters.
Leverage : We have this function for the futures markets where you can check which is the most appropriate leverage for your operation.
Trend Filter: allows you to take multiple entries in the same direction of the market.
If the market crosses below the 200 moving average, it will take only short entries.
If the market crosses above the 200 moving average, it will take only long entries.
Timeframes
Charting from 1 Hour, 4 Hour, Daily, Weekly, Weekly
Markets :Booz Backtesting can be tested in Cryptocurrency, Stocks and Futures markets.
Background Color : at a glance, you can see what cycle the market is in.
Green background : Shows that the market is in a bullish cycle.
Red background: Shows that the market is in a bearish cycle.
Twitter
Website
Buy and Hold entry finder StrategyHello everyone!
I proudly present the backtest Strategy Script for my "Buy and Hold entry finder" Script.
It basically shows you the outcome, if you would use my indicator in the past.
The buy signals are limited to 1 order per month.
Order Size: Allows you to choose, how much money you want to invest per month. (Please consider, it will only invest an x amount per Order, but it will not stack the amount you did not invest in an previous month ) (Example in my indicator)
Pyramiding: Just regulates, how often you can open an position.
Commission: Here you can set how much it will cost to open an position at your broker.
I coded a feature that allows you to set a Start Date and an End Date for your backtest. In the end of the backtest the script closes all positions.
If you got any question, feel free to ask in the comments or send me a message.
Sincerely, RS Titan.
SimpleCrossOver_BotThis is a simple example of how you can compile your own strategy
This script contains the code for alerts and for backtesting.
In order to use the backtester, comment out the sections to be used for signals, and comment in the sections to be used on the back tester, and visa versa for using the script for alerts in order to automate your own bot.
Updated TurtlesThis script has been updated to prevent double orders (short/long) from occurring and modifying backtests results.
This is an update to the script that was written a few years ago to prevent double longs/shorts from occurring and skewin backtesting results. Check out the updated indicator here and let me know what you think.
I also added:
- date range inputs if you want to do some backtesting on a particular set of dates.
- the ability to toggle shorting
Line Break StrategyLine Break Strategy
Entry rule:
Long on a bullish line and short on a bearish line.
Backtest:
Profit factors are shown below for three-line break.
Daily time frame, FXCM broker.
EURUSD: 1.267, USDJPY: 1.039, GBPUSD: -0.816, AUDUSD: -0.959
S&P500: -0.783, Nikkei225: 1.099
CrudeOil: 1.03, Gold: 1.196
BTCUSD: -0.883
Reference:
Steve Nison, Beyond Candlesticks - New Japanese Charting Techniques Revealed
Note:
This strategy doesn't work properly on the linebreak chart.
A good example is shown below. The entry prices are not always correct.
If you have signal, but the next candle moves in the opposite direction, the entry price is drawn at the Open of the new candle instead of the Close of the previous candle.
The results of backtest are unreliable due to this reason.
Outsidebar vs Insidebar, Illusion Strategy (by ChartArt)WARNING: This strategy does not work! Please don't trade with this strategy
I'm sharing this strategy for the following three educational reasons:
1. You can easily find 100% strategies, but if they only seem to work 100% on one asset, they actually don't work at all. Therefore never backtest your strategy only on one asset, especially forward testing is useless, because it tends to repeat the old patterns. Your strategy has to work on as many different assets as possible.
2. The pyramiding of orders can have an impact on the strategy. In this case if you manually change the strategy settings by increasing it from 1 to 100 pyramiding orders changes the percent profitable on "UKOIL" monthly from 100% to 90% profitable. On other assets you can see very different results. Allowing much more pyramiding orders in this case results in opening orders where the background color highlights appear.
3. The Tradingview backtest beta version currently does not close the last open trade during the backtest. In this case going long on "UKOIL" near the top in 2011 as this strategy did would result in a big loss in 2015. But since the trade is still open and not canceled out by a new short order it still appears as if this strategy works 100% profitable. Which it doesn't.
CLMM Vault策略回测 (专业版) v5Explanation of the CLMM (Concentrated Liquidity - Market Maker) Strategy Backtesting Model Developed for the Sui Chain Vaults Protocol
Why Are We Doing This?
Conducting strategy backtesting is a crucial step for us to make data-driven decisions, validate the feasibility of strategies, and manage potential risks before committing real funds and significant development resources. A strategy that appears to have a high APY may perform entirely differently once real-world frictional costs (such as rebalancing fees and slippage) are deducted. The goal of this backtesting model is to quickly and cost-effectively identify which strategy parameter combinations have the potential to be profitable and which ones pose risks before formal development, thereby avoiding significant losses and providing data support for the project's direction.
Core Features of the Backtesting Model
We have built a "pro version" (v5) strategy simulator using TradingView's Pine Script. It can quickly simulate the core performance of our auto-compounding and rebalancing Vaults on historical price data, with the following main features:
Auto-Compounding: Continuously adds the generated fee income to the principal based on the set profit range (e.g., 0.01%).
Auto-Rebalancing: Simulates automatic rebalancing actions when the price exceeds the preset profit range and deducts the corresponding costs.
Smart Filtering Mechanism: To make the simulation closer to our ideal "smart" decision-making, it integrates three freely combinable filtering mechanisms:
Buffer Zone: Tolerates minor and temporary breaches of the profit range to avoid unnecessary rebalancing.
Breakout Confirmation: Requires the price to be in the trigger zone for N consecutive candles to confirm a breakout, filtering out market noise from "false breakouts."
Time Cooldown: Enforces a minimum time interval between two rebalances to prevent value-destroying high-frequency trading in extreme market conditions.
Important: Simplifications and Assumptions of the Model
To quickly prototype and iterate on the TradingView platform, we have made some key simplifications to the model.
A fully accurate backtest would require a deep simulation of on-chain liquidity pools (Pool Pair), calculating the price impact (Slippage) and impermanent loss (IL) caused by each rebalance on the pool. Since TradingView cannot access real-time on-chain liquidity data, we have made the following simplifications:
Simplified Rebalancing Costs: Instead of simulating real transaction slippage, we use a unified input parameter of single rebalance cost (%) to "bundle" and approximate the total of Gas fees, slippage, and realized impermanent loss.
Simplified Fee Income: Instead of calculating fees based on real-time trading volume, we directly input an average fee annualized return (%) as the core income assumption for our strategy.
How to Use and Test
Team members can load this script and test different strategies by adjusting the input parameters on the panel. The most critical parameters include: position profit range, average fee annualized return, single rebalance cost, and the switches and corresponding values of the above three smart filters.
OBV ATR Strategy (OBV Breakout Channel) bas20230503ผมแก้ไขจาก OBV+SMA อันเดิม ของเดิม ดูที่เส้น SMA สองเส้นตัดกันมั่นห่วยแตกสำหรับที่ผมลองเทรดจริง และหลักการเบรค ได้แรงบันดาลใจ ATR จาก เทพคอย ที่ใช้กับราคา แต่นี้ใช้กับ OBV แทน
และผมใช้เจมินี้ เพื่อแก้ ให้ เป็น strategy เพื่อเช็คย้อนหลังได้ง่ายกว่าเดิม
หลักการง่ายคือถ้ามันขึ้น มันจะขึ้นเรื่อยๆ
เขียน แบบสุภาพ (น่าจะอ่านได้ง่ายกว่าผมเขียน)
สคริปต์นี้ได้รับการพัฒนาต่อยอดจากแนวคิด OBV+SMA Crossover แบบดั้งเดิม ซึ่งจากการทดสอบส่วนตัวพบว่าประสิทธิภาพยังไม่น่าพอใจ กลยุทธ์ใหม่นี้จึงเปลี่ยนมาใช้หลักการ "Breakout" ซึ่งได้รับแรงบันดาลใจมาจากการใช้ ATR สร้างกรอบของราคา แต่เราได้นำมาประยุกต์ใช้กับ On-Balance Volume (OBV) แทน นอกจากนี้ สคริปต์ได้ถูกแปลงเป็น Strategy เต็มรูปแบบ (โดยความช่วยเหลือจาก Gemini AI) เพื่อให้สามารถทดสอบย้อนหลัง (Backtest) และประเมินประสิทธิภาพได้อย่างแม่นยำ
หลักการของกลยุทธ์: กลยุทธ์นี้ทำงานบนแนวคิดโมเมนตัมที่ว่า "เมื่อแนวโน้มได้เกิดขึ้นแล้ว มีโอกาสที่มันจะดำเนินต่อไป" โดยจะมองหาการทะลุของพลังซื้อ-ขาย (OBV) ที่แข็งแกร่งเป็นพิเศษเป็นสัญญาณเข้าเทร
----
สคริปต์นี้เป็นกลยุทธ์ (Strategy) ที่ใช้ On-Balance Volume (OBV) ซึ่งเป็นอินดิเคเตอร์ที่วัดแรงซื้อและแรงขายสะสม แทนที่จะใช้การตัดกันของเส้นค่าเฉลี่ย (SMA Crossover) ที่เป็นแบบพื้นฐาน กลยุทธ์นี้จะมองหาการ "ทะลุ" (Breakout) ของพลัง OBV ออกจากกรอบสูงสุด-ต่ำสุดของตัวเองในรอบที่ผ่านมา
สัญญาณกระทิง (Bull Signal): เกิดขึ้นเมื่อพลังการซื้อ (OBV) แข็งแกร่งจนสามารถทะลุจุดสูงสุดของตัวเองในอดีตได้ บ่งบอกถึงโอกาสที่แนวโน้มจะเปลี่ยนเป็นขาขึ้น
สัญญาณหมี (Bear Signal): เกิดขึ้นเมื่อพลังการขาย (OBV) รุนแรงจนสามารถกดดันให้ OBV ทะลุจุดต่ำสุดของตัวเองในอดีตได้ บ่งบอกถึงโอกาสที่แนวโน้มจะเปลี่ยนเป็นขาลง
ส่วนประกอบบนกราฟ (Indicator Components)
เส้น OBV
เส้นหลัก ที่เปลี่ยนเขียวเป็นแดง เป็นทั้งแนวรับและแนวต้าน และ จุด stop loss
เส้นนี้คือหัวใจของอินดิเคเตอร์ ที่แสดงถึงพลังสะสมของ Volume
เมื่อเส้นเป็นสีเขียว (แนวรับ): จะปรากฏขึ้นเมื่อกลยุทธ์เข้าสู่ "โหมดกระทิง" เส้นนี้คือระดับต่ำสุดของ OBV ในอดีต และทำหน้าที่เป็นแนวรับไดนามิก
เมื่อเส้นกลายเป็นสีแดงสีแดง (แนวต้าน): จะปรากฏขึ้นเมื่อกลยุทธ์เข้าสู่ "โหมดหมี" เส้นนี้คือระดับสูงสุดของ OBV ในอดีต และทำหน้าที่เป็นแนวต้านไดนามิก
สัญลักษณ์สัญญาณ (Signal Markers):
Bull 🔼 (สามเหลี่ยมขึ้นสีเขียว): คือสัญญาณ "เข้าซื้อ" (Long) จะปรากฏขึ้น ณ จุดที่ OBV ทะลุขึ้นไปเหนือกรอบด้านบนเป็นครั้งแรก
Bear 🔽 (สามเหลี่ยมลงสีแดง): คือสัญญาณ "เข้าขาย" (Short) จะปรากฏขึ้น ณ จุดที่ OBV ทะลุลงไปต่ำกว่ากรอบด้านล่างเป็นครั้งแรก
วิธีการใช้งาน (How to Use)
เพิ่มสคริปต์นี้ลงบนกราฟราคาที่คุณสนใจ
ไปที่แท็บ "Strategy Tester" ด้านล่างของ TradingView เพื่อดูผลการทดสอบย้อนหลัง (Backtest) ของกลยุทธ์บนสินทรัพย์และไทม์เฟรมต่างๆ
ใช้สัญลักษณ์ "Bull" และ "Bear" เป็นตัวช่วยในการตัดสินใจเข้าเทรด
ข้อควรจำ: ไม่มีกลยุทธ์ใดที่สมบูรณ์แบบ 100% ควรใช้สคริปต์นี้ร่วมกับการวิเคราะห์ปัจจัยอื่นๆ เช่น โครงสร้างราคา, แนวรับ-แนวต้านของราคา และการบริหารความเสี่ยง (Risk Management) ของตัวคุณเองเสมอ
การตั้งค่า (Inputs)
SMA Length 1 / SMA Length 2: ใช้สำหรับพล็อตเส้นค่าเฉลี่ยของ OBV เพื่อดูเป็นภาพอ้างอิง ไม่มีผลต่อตรรกะการเข้า-ออกของ Strategy อันใหม่ แต่มันเป็นของเก่า ถ้าชอบ ก็ใช้ได้ เมื่อ SMA สองเส้นตัดกัน หรือตัดกับเส้น OBV
High/Low Lookback Length: (ค่าพื้นฐาน30/แก้ตรงนี้ให้เหมาะสมกับ coin หรือหุ้น ตามความผันผวน ) คือระยะเวลาที่ใช้ในการคำนวณกรอบสูงสุด-ต่ำสุดของ OBV
ค่าน้อย: ทำให้กรอบแคบลง สัญญาณจะเกิดไวและบ่อยขึ้น แต่อาจมีสัญญาณหลอก (False Signal) เยอะขึ้น
ค่ามาก: ทำให้กรอบกว้างขึ้น สัญญาณจะเกิดช้าลงและน้อยลง แต่มีแนวโน้มที่จะเป็นสัญญาณที่แข็งแกร่งกว่า
แน่นอนครับ นี่คือคำแปลฉบับภาษาอังกฤษที่สรุปใจความสำคัญ กระชับ และสุภาพ เหมาะสำหรับนำไปใช้ในคำอธิบายสคริปต์ (Description) ของ TradingView ครับ
---Translate to English---
OBV Breakout Channel Strategy
This script is an evolution of a traditional OBV+SMA Crossover concept. Through personal testing, the original crossover method was found to have unsatisfactory performance. This new strategy, therefore, uses a "Breakout" principle. The inspiration comes from using ATR to create price channels, but this concept has been adapted and applied to On-Balance Volume (OBV) instead.
Furthermore, the script has been converted into a full Strategy (with assistance from Gemini AI) to enable precise backtesting and performance evaluation.
The strategy's core principle is momentum-based: "once a trend is established, it is likely to continue." It seeks to enter trades on exceptionally strong breakouts of buying or selling pressure as measured by OBV.
Core Concept
This is a Strategy that uses On-Balance Volume (OBV), an indicator that measures cumulative buying and selling pressure. Instead of relying on a basic Simple Moving Average (SMA) Crossover, this strategy identifies a "Breakout" of the OBV from its own highest-high and lowest-low channel over a recent period.
Bull Signal: Occurs when the buying pressure (OBV) is strong enough to break above its own recent highest high, indicating a potential shift to an upward trend.
Bear Signal: Occurs when the selling pressure (OBV) is intense enough to push the OBV below its own recent lowest low, indicating a potential shift to a downward trend.
On-Screen Components
1. OBV Line
This is the main indicator line, representing the cumulative volume. Its color changes to green when OBV is rising and red when it is falling.
2. Dynamic Support & Resistance Line
This is the thick Green or Red line that appears based on the strategy's current "mode." This line serves as a dynamic support/resistance level and can be used as a reference for stop-loss placement.
Green Line (Support): Appears when the strategy enters "Bull Mode." This line represents the lowest low of the OBV in the recent past and acts as dynamic support.
Red Line (Resistance): Appears when the strategy enters "Bear Mode." This line represents the highest high of the OBV in the recent past and acts as dynamic resistance.
3. Signal Markers
Bull 🔼 (Green Up Triangle): This is the "Long Entry" signal. It appears at the moment the OBV first breaks out above its high-low channel.
Bear 🔽 (Red Down Triangle): This is the "Short Entry" signal. It appears at the moment the OBV first breaks down below its high-low channel.
How to Use
Add this script to the price chart of your choice.
Navigate to the "Strategy Tester" panel at the bottom of TradingView to view the backtesting results for the strategy on different assets and timeframes.
Use the "Bull" and "Bear" signals as aids in your trading decisions.
Disclaimer: No strategy is 100% perfect. This script should always be used in conjunction with other forms of analysis, such as price structure, key price-based support/resistance levels, and your own personal risk management rules.
Inputs
SMA Length 1 / SMA Length 2: These are used to plot moving averages on the OBV for visual reference. They are part of the legacy logic and do not affect the new breakout strategy. However, they are kept for traders who may wish to observe their crossovers for additional confirmation.
High/Low Lookback Length: (Most Important Setting) This determines the period used to calculate the highest-high and lowest-low OBV channel. (Default is 30; adjust this to suit the asset's volatility).
A smaller value: Creates a narrower channel, leading to more frequent and faster signals, but potentially more false signals.
A larger value: Creates a wider channel, leading to fewer and slower signals, which are likely to be more significant.
EMD Trend [InvestorUnknown]EMD Trend is a dynamic trend-following indicator that utilizes Exponential Moving Deviation (EMD) to build adaptive channels around a selected moving average. Designed for traders who value responsive trend signals with built-in volatility sensitivity, this tool highlights directional bias, market regime shifts, and potential breakout opportunities.
How It Works
Instead of using standard deviation, EMD Trend employs the exponential moving average of the absolute deviation from a moving average—producing smoother, faster-reacting upper and lower bounds:
Bullish (Risk-ON Long): Price crosses above the upper EMD band
Bearish (Risk-ON Short): Price crosses below the lower EMD band
Neutral: Price stays within the channel, indicating potential mean reversion or low momentum
Trend direction is defined by price interaction with these bands, and visual cues (color-coded bars and fills) help quickly identify market conditions.
Features
7 Moving Average Types: SMA, EMA, HMA, DEMA, TEMA, RMA, FRAMA
Custom Price Source: Choose close, hl2, ohlc4, or others
EMD Multiplier: Controls the width of the deviation envelope
Bar Coloring: Candles change color based on current trend
Intra-bar Signal Option: Enables faster updates (with optional repainting)
Speculative Zones: Fills highlight aggressive momentum moves beyond EMD bounds
Backtest Mode
Switch to Backtest Mode for performance evaluation over historical data:
Equity Curve Plot: Compare EMD Trend strategy vs. Buy & Hold
Trade Metrics Table: View number of trades, win/loss stats, profits
Performance Metrics Table: Includes CAGR, Sharpe, max drawdown, and more
Custom Start Date: Select from which date the backtest should begin
Trade Sizing: Configure capital and trade percentage per entry
Signal Filters: Choose from Long Only, Short Only, or Both
Alerts
Built-in alerts let you automate entries, exits, and trend transitions:
LONG (EMD Trend) - Trend flips to Long
SHORT (EMD Trend) - Trend flips to Short
RISK-ON LONG - Price crosses above upper EMD band
RISK-OFF LONG - Price crosses back below upper EMD band
RISK-ON SHORT - Price crosses below lower EMD band
RISK-OFF SHORT - Price crosses back above lower EMD band
Use Cases
Trend Confirmation with volatility-sensitive boundaries
Momentum Entry Filtering via breakout zones
Mean Reversion Avoidance in sideways markets
Backtesting & Strategy Building with real-time metrics
Disclaimer
This indicator is intended for informational and educational purposes only. It does not constitute investment advice. Historical performance does not guarantee future results. Always backtest and use in simulation before live trading.