Flunki TWAP MTF Trend v.2Further experiments with multi-timeframe weighted averages...
Herewith a duel timeframe TWAP (time weighted average price)
TWAP differs from VWAP as so..
TWAP is weighted based on time, VWAP is weighted based on time and volume . Small volume trades do not impact TWAP but impact VWAP
Anyways, as you can see, it does a pretty good job of showing trend..
Enjoy.
Recherche dans les scripts pour "vwap"
Non Parametric Adaptive Moving AverageIntroduction
Not be confused with non-parametric statistics, i define a "non-parametric" indicator as an indicator who does not have any parameter input. Such indicators can be useful since they don't need to go through parameter optimization. I present here a non parametric adaptive moving average based on exponential averaging using a modified ratio of open-close to high-low range indicator as smoothing variable.
The Indicator
The ratio of open-close to high-low range is a measurement involving calculating the ratio between the absolute close/open price difference and the range (high - low) , now the relationship between high/low and open/close price has been studied in econometrics for some time but there are no reason that the ohlc range ratio may be an indicator of volatility, however we can make the hypothesis that trending markets contain less indecision than ranging market and that indecision is measured by the high/low movements, this is an idea that i've heard various time.
Since the range is always greater than the absolute close/open difference we have a scaled smoothing variable in a range of 0/1, this allow to perform exponential averaging. The ratio of open-close to high-low range is calculated using the vwap of the close/high/low/open price in order to increase the smoothing effect. The vwap tend to smooth more with low time frames than higher ones, since the indicator use vwap for the calculation of its smoothing variable, smoothing may differ depending on the time frame you are in.
1 minute tf
1 hour tf
Conclusion
Making non parametric indicators is quite efficient, but they wont necessarily outperform classical parametric indicators. I also presented a modified version of the ratio of open-close to high-low range who can provide a smoothing variable for exponential averaging. I hope the indicator can help you in any way.
Thanks for reading !
CPR by NKDCentral Pivot Range (CPR) Trading Strategy:
The Central Pivot Range (CPR) is a widely-used tool in technical analysis, helping traders pinpoint potential support and resistance levels in the market. By using the CPR effectively, traders can better gauge market trends and determine favorable entry and exit points. This guide explores how the CPR works, outlines its calculation, and describes how traders can enhance their strategies using an extended 10-line version of CPR.
What Really Central Pivot Range (CPR) is?
At its core, the CPR consists of three key lines:
Pivot Point (PP) – The central line, calculated as the average of the previous day’s high, low, and closing prices.
Upper Range (R1) – Positioned above the Pivot Point, acting as a potential ceiling where price may face resistance.
Lower Range (S1) – Found below the Pivot Point, serving as a potential floor where price might find support.
Advanced traders often expand on the traditional three-line CPR by adding extra levels above and below the pivot, creating up to a 10-line system. This extended CPR allows for a more nuanced understanding of the market and helps identify more detailed trading opportunities.
Applying CPR for Trading Success
1. How CPR is Calculation
The CPR relies on the previous day's high (H), low (L), and close (C) prices to create its structure:
Pivot Point (PP) = (H + L + C) / 3
First Resistance (R1) = (2 * PP) - L
First Support (S1) = (2 * PP) - H
Additional resistance levels (R2, R3) and support levels (S2, S3) are calculated by adding or subtracting multiples of the previous day’s price range (H - L) from the Pivot Point.
2. Recognizing the Market Trend
To effectively trade using CPR, it’s essential to first determine whether the market is trending up (bullish) or down (bearish). In an upward-trending market, traders focus on buying at support levels, while in a downward market, they look to sell near resistance.
3. Finding Ideal Entry Points
Traders often look to enter trades when price approaches key levels within the CPR range. Support levels (S1, S2) offer buying opportunities, while resistance levels (R1, R2) provide selling opportunities. These points are considered potential reversal zones, where price may bounce or reverse direction.
4. Managing Risk with Stop-Loss Orders
Proper risk management is crucial in any trading strategy. A stop-loss should be set slightly beyond the support level for buy positions and above the resistance level for sell positions, ensuring that losses are contained if the market moves against the trader’s position.
5. Determining Profit Targets
Profit targets are typically set based on the distance between entry points and the next support or resistance level. Many traders apply a risk-reward ratio, aiming for larger potential profits compared to the potential losses. However, if the next resistance and support level is far then middle levels are used for targets (i.e. 50% of R1 and R2)
6. Confirmation Through Other Indicators
While CPR provides strong support and resistance levels, traders often use additional indicators to confirm potential trade setups. Indicators such as moving averages can
help validate the signals provided by the CPR.
7. Monitoring Price Action At CPR Levels
Constantly monitoring price movement near CPR levels is essential. If the price fails to break through a resistance level (R1) or holds firm at support (S1), it can offer cues on when to exit or adjust a trade. However, a strong price break past these levels often signals a continued trend.
8. Trading Breakouts with CPR
When the price breaks above resistance or below support with strong momentum, it may signal a potential breakout. Traders can capitalize on these movements by entering positions in the direction of the breakout, ideally confirmed by volume or other technical indicators.
9. Adapting to Changing Market Conditions
CPR should be used in the context of broader market influences, such as economic reports, news events, or geopolitical shifts. These factors can dramatically affect market direction and how price reacts to CPR levels, making it important to stay informed about external market conditions.
10. Practice and Backtesting for Improvements
Like any trading tool, the CPR requires practice. Traders are encouraged to backtest their strategies on historical price data to get a better sense of how CPR works in different market environments. Continuous analysis and practice help improve decision-making and strategy refinement.
The Advantages of Using a 10-Line CPR System
An extended 10-line CPR system—comprising up to five resistance and five support levels—provides more granular control and insight into market movements. This expanded view helps traders better gauge trends and identify more opportunities for entry and exit. Key benefits include:
R2, S2 Levels: These act as secondary resistance or support zones, giving traders additional opportunities to refine their trade entries and exits.
R3, S3 Levels: Provide an even wider range for identifying reversals or trend continuations in more volatile markets.
Flexibility: The broader range of levels allows traders to adapt to changing market conditions and make more precise decisions based on market momentum.
So in Essential:
The Central Pivot Range is a valuable tool for traders looking to identify critical price levels in the market. By providing a clear framework for identifying potential support and resistance zones, it helps traders make informed decisions about entering and exiting trades. However, it’s important to combine CPR with sound risk management and additional confirmation through other technical indicators for the best results.
Although no trading tool guarantees success, the CPR, when used effectively and combined with practice, can significantly enhance a trader’s ability to navigate market fluctuations.
Points Per Share Traded1. This is a simple measurement of what is basically Price-Change/Volume
2. The actual "price per share metric" (PPST) is shown
3. There are a few different kinds of moving averages to test
4. There is an option to show or hide the current bar data
5. There is a multiplier - if on your market it displays a number of 0.00 or a very high number you can multiply by powers of 10 if you'd like to make a detailed measurement (this doesn't change the relationship of the measurement vs 0)
This indicator makes a very simple metric to understand - how many dollars is the price moving per share traded?
... at highs the price usually moves the fastest vs amount of shares traded
... at lows it's the usually the opposite
There are many ways to use this indicator - but I am leaving it up to the user to test their own market and find a use for it
example: Sometimes price makes an new high or low yet this indicator has not yet done so, can be a sign that continuance of the trend is possible - even if at price resistance
A great compliment to AVWAPS or VWAPs or Volume/Price indicators
The chart you are analyzing MUST have volume accessible or the indicator will not work
Hopefully we can build up a good library the best settings for certain markets
Cheers!
Joe
PivotBoss Tool (PART 1)Hello Everyone,
This indicator is being published on TradingView to help traders solve their multiframe analysis issue and at the same time get additional information of different timeframe like - Strength, Momentum and Central Pivot Range relationships all under one single frame.
This indicator is based on the concepts of Secrets of Pivot Boss by Mr.Frank Ochoa and strives to provide more insightful information of pivot points and other general indicators being used by traders on day-to-day basis in the simplest format possible so that traders of all kinds can relate to the same.
Below is the brief information of the indicator table you see in the layout of the above chart -
-This is the most interesting part of the indicator where the user gets to the Pivot Trend, RSI strength and Central Pivot Range (CPR) relationship all under one table which comes to be very handy during Intraday trading and Swing/Positional Trading.
#Pivot Trend
This column gives the user the information regarding price movement near to pivot points across multiple timeframes in a single frame which gives the user the accessibility to track the trend in different time frames, to make the information readily available colour code are included in the table which is customisable in the hands of the user and below is the explanation for the same -
- GREEN (Above H3)
- GREY (Between H3-L3)
- RED (Below L3)
#RSI
This column gives the user the information regarding price movement near to RSI values across multiple timeframes in a single frame which gives the user the accessibility to track the momentum in different time frames, to make the information readily available colour code are included in the table which is customisable in the hands of the user and below is the explanation for the same -
- GREEN (Above 70)
- GREY (Between 30 to 70)
- RED (Below 30)
#Central Pivot Range (CPR) Relationship
This column gives an idea of the trend direction and intensity which is exactly formulated according the concepts of PivotBoss Book and it also states the relationship of CPR's with customisable colour codes in the indicator settings, to make the information readily available colour code are included in the table which is customisable in the hands of the user and below is the explanation for the same -
There are generally six possible relationships for CPR compared to previous CPR where the timeframe can be variable but the relationship identification stays constant which is depicted as below -
- GREEN
1) Dark Green denotes "Higher Value CPR Relationship"
2) Light Green denotes "Overlapping Higher Value CPR Relationship"
- RED
3) Dark Red denotes "Lower Value CPR Relationship"
4) Light Red denotes "Overlapping Lower Value CPR Relationship"
- GREY
5) Denotes "Outside Value CPR Relationship"
- YELLOW
6) Denotes "Inside Value CPR Relationship"
This is a very basic tool created to identify Strength, Momentum and Central Pivot Relationship (CPR) across different timeframes so that the user is able to identify the broader aspect of the stock in a single frame and thus can execute his trading skills with optimum efficiency.
This indicator will be updated with time and depending on community's feedback and requirements.
Credits -
- Mr. Frank Ochoa (Concepts and ideas from the book 'Secrets of PivotBoss' )
- TradingView (Providing a platform to traders to simply their trading through 'PineScript')
Regards,
Mukkull
Balance Zone ExtensionBalance zones are an aspect of trading that many traders notice. Balance Zones are formed when a market is in equilibrium and respects a certain high and low multiple times. These zones could also be called accumulation or distribution areas depending on the price action. If the term "choppy" is used to describe a given markets price action, it is probably a fair statement to say that the market is currently in a Balance Zone.
This script is a take on vwaptrader1's teachings where you take a balance zone and "double it" to get a target if/when it does break out of balance. It provides an automated way of extending levels based on a given balance range.
The lines plotted by the script are calculated based off of the balance high/low inputs, how many sections are desired per zone, and how many boxes to plot based on the other user inputs.
Warning: Due to a current limitation of the Pine, this script is only allowed to plot up to 500 lines total. If you start to notice lines starting to disappear or you begin getting a script error, double check the input settings as the script may have crossed the 500 line threshold.
This can be used in conjunction with Fixed Range Volume Profile . Select the balance range with the Fixed Volume Profile . Note the Value Area High and Value Area Low prices and input those into the balance range High/Low inputs.
Use to create price targets from Balance Zone Breakouts
A recent example of this idea in action on ticker ES1! 2 hour chart where the balance range was found and the target (double the box size of the balance range) was hit.
Another example of this same concept but on a normal security like AAPL but on a 30 minute chart:
Extending the usefulness even further to crypto on BTCUSD with a 5 minute chart:
Use to create reference levels for future price action
The other way to utilize this is to provide future reference levels from a key balance range from the past.
Here is another example utilizing the AMD daily chart . First, a balance zone was noted for all of 2017:
Moving forward to the most recent price action in 2023, notice that the box extension levels are still fairly well respected almost 6 years later!
Musashi_Katana=== Musashi-Katana ===
This tool was designed to fit my particular trading style and personal theories about the "Alchemy of the markets" and ''Harmonic Structure'.
Context
When following a Technical approach to to surf the markets, there are teachings that must be understood before reaching a confort-zone, this usually happen the possible worst way by constant experimentation, it hurts.
Here few technical hints:
- Align High timeframes with lower timeframes:
This simple concept relax a lot complexity of finding of a trend bias. Musashi-Katana allows you to use technical indicator corresponding to specific timeframes, like daily weekly or yearly. They wont change when you change the chart's timeframe, its very useful as you know where you're standing in the long term, Its quite relaxing.
- Use volume:
The constant usage of volume will allow you to sync with the market's breathing. This shows you the mass of money flowing into and out of the market, is key if you want to understand momentum. This tool can help here, as it have multi-period vwaps. You can use yearly, monthly for swing trading, and even weekly if you enjoy scalping.
Useful stuff:
- You have access to baselines, AMA and Kijun-sen with the possibility of adding ATR bands.
- AMAs come as two lines strategies for different approaches, fast medium or slow.
- You can experiment with normal and multi timeframe moving averages and other trend tools.
Final Note
If used correctly Musashi-Katana is a very powerful tool, which makes no sense as there is no correct usage. Don't add everything at the same time, experiment, combine stuff, every market is different.
Backtest every possible strategy before using it, see what works and doesn't. This gives you a lot of peace, specially while you're at the tip of the spear surfing the markets
--> I personally use this in combination with 'Musashi_Slasher (Mometum+Volatility)', as it gives me volatility and momentum in a very precise way.
MA ClustersBackground :
This study allows to define ranges for contraction and expansion of a defined set of MA to analyse the the momentum at those specific situations.
In general all functions used are very basic but allows the user to set alerts when a cluster of MA enters a defined range within or outside the MAX and MIN of a selected MA cluster. The predefined length of the EMAs were put together by HurstHorns within a trading learning discord group and are designed for 1M timeframe to read the momentum for scalping entries - Thanks again for sharing.
Functions :
currently the following MA are available:
- ema
- sma
- smma
- wma
- vwma
- vma
the variable moving average is based on the calculation from lazybear.
- RSI Stoch Filter
- Wavetrend OB/OS filter
Currently only alerts for contraction are enabled to not overload the study but in case expansion would be from interest this can be added quickly.
Outlook:
Additional filters were added to see if they can add value in. the decision making or by simply filtering out noise. This is still quite experimental. Please share any useful observation I should add as additional filter option to find good setups. in relation to contractions or expansions.
Next version will get Bollinger bands for 1 selectable MA from the list for additional study options.
In case you are interested in more options such as more MA types or vwap.. just let me know. for VMA I need to do more research to add useful function for laddering or things like that.
In general The script itself can be easily extended by additional functions. As this is one of my first scripts the code itself might not be optimal or there are more elegant ways to come to the same goal. However please use for study purposes only and report bugs or enhancement requests.
good luck and happy trading!
1337 MoonStar H4 RVI Exit Backtest- H4 BTC/USD
simple Trendfollowing Strategy :
- based on Vwaps and Hull
- early Exit on RVI Signals
it try to catch the Trend, thats why in Consolidation it switches very often between long/short
you can switch between longonly/shortonly or both
you can define a Backtestperiod to check different marketbehaviour
RSI MA9 MA45This indicator leverages RSI, price, and volume to provide early signals for buying or selling. It is applicable to various markets.
Long Short Lien Tuc System
For intraday trades, enter with a 10-minute chart.
For positional trades, enter with a 1-hour chart.
For investments, this system can be used with daily, weekly, or monthly charts.
The RED line represents volume.
The Green line represents price.
The Black line indicates the RSI (9).
SELL Trade
When volume (RED line) is above or crosses above price (Green line) and strength (Black line), the stock price is likely to decrease, indicating a SELL signal.
When there’s a gap between the RED line and the Green line, the price will continue to drop.
Exit Criteria:
Exit when the RED line leaves the oversold shaded area or crosses over both the Green and Black lines.
For a SELL trade, monitor the trade on a 5-minute chart after entry. If a candle closes above the VWAP, exit the trade.
Exit the trade if the price crosses above the 50 SMA.
BUY Trade
When volume (RED line) is below or crosses below price (Green line) and strength (Black line), the stock price is likely to increase, indicating a BUY signal.
When there’s a gap between the RED line and the Green line, the price will continue to drop.
Exit Criteria:
Exit when the RED line leaves the overbought shaded area or crosses over both the Green and Black lines.
For a BUY trade, monitor the trade after entry. If a candle closes below the VWAP, exit the trade.
Exit the trade if the price crosses below the 50 SMA.
Long Short Lien Tuc System
Volume Based Price Prediction [EdgeTerminal]This indicator combines price action, volume analysis, and trend prediction to forecast potential future price movements. The indicator creates a dynamic prediction zone with confidence bands, helping you visualize possible price trajectories based on current market conditions.
Key Features
Dynamic price prediction based on volume-weighted trend analysis
Confidence bands showing potential price ranges
Volume-based candle coloring for enhanced market insight
VWAP and Moving Average overlay
Customizable prediction parameters
Real-time updates with each new bar
Technical Components:
Volume-Price Correlation: The indicator analyzes the relationship between price movements and volume, Identifies stronger trends through volume confirmation and uses Volume-Weighted Average Price (VWAP) for price equilibrium
Trend Strength Analysis: Calculates trend direction using exponential moving averages, weights trend strength by relative volume and incorporates momentum for improved accuracy
Prediction Algorithm: combines current price, trend, and volume metrics, projects future price levels using weighted factors and generates confidence bands based on price volatility
Customizable Parameters:
Moving Average Length: Controls the smoothing period for calculations
Volume Weight Factor: Adjusts how much volume influences predictions
Prediction Periods: Number of bars to project into the future
Confidence Band Width: Controls the width of prediction bands
How to use it:
Look for strong volume confirmation with green candles, watch for prediction line slope changes, use confidence bands to gauge potential volatility and compare predictions with key support/resistance levels
Some useful tips:
Start with default settings and adjust gradually
Use wider confidence bands in volatile markets
Consider prediction lines as zones rather than exact levels
Best applications of this indicator:
Trend continuation probability assessment
Potential reversal point identification
Risk management through confidence bands
Volume-based trend confirmation
Gabriel's Witcher Strategy [65 Minute Trading Bot]Strategy Description: Gabriel's Witcher Strategy
Author: Gabriel
Platform: TradingView Pine Script (Version 5)
Backtested Asset: Avalanche (Coinbase Brokage for Volume adjustment)
Timeframe: 65 Minutes
Strategy Type: Comprehensive Trend-Following and Momentum Strategy with Scalping and Risk Management Features
Overview
Gabriel's Witcher Strategy is an advanced trading bot designed for the Avalanche pair on a 65-minute timeframe. This strategy integrates a multitude of technical indicators to identify and execute high-probability trading opportunities. By combining trend-following, momentum, volume analysis, and range filtering, the strategy aims to capitalize on both long and short market movements. Additionally, it incorporates scalping mechanisms and robust risk management features, including take-profit (TP) levels and commission considerations, to optimize trade performance and profitability.
====Key Components====
Source Selection:
Custom Source Flexibility: Allows traders to select from a wide range of price and volume sources (e.g., Close, Open, High, Low, HL2, HLC3, OHLC4, VWAP, On-Balance Volume, etc.) for indicator calculations, enhancing adaptability to various trading styles.
Various curves of Volume Analysis are employed:
Tick Volume Calculation: Utilizes tick volume as a fallback when actual volume data is unavailable, ensuring consistency across different data feeds.
Volume Indicators: Incorporates multiple volume-based indicators such as On-Balance Volume (OBV), Accumulation/Distribution (AccDist), Negative Volume Index (NVI), Positive Volume Index (PVI), and Price Volume Trend (PVT) for comprehensive market analysis.
Trend Indicators:
ADX (Average Directional Index): Measures trend strength using either the Classic or Masanakamura method, with customizable length and threshold settings. It's used to open positions when the mesured trend is strong, or exit when its weak.
Jurik Moving Average (JMA): A smooth moving average that reduces lag, configurable with various parameters including source, resolution, and repainting options.
Parabolic SAR: Identifies potential reversals in market trends with adjustable start, increment, and maximum settings.
Custom Trend Indicator: Utilizes highest and lowest price points over a specified timeframe to determine current and previous trend bases, visually represented with color-filled areas.
Momentum Indicators:
Relative Strength Index (RSI): Evaluates the speed and change of price movements, smoothed with a custom length and source. It's used to not enter the market for shorts in oversold or longs for overbought conditions, and to enter for long in oversold or shorts for overboughts.
Momentum-Based Calculations: Employs both Double Exponential Moving Averages (DEMA) on a MACD-based RSI to enhance momentum signal accuracy which is then further accelerated by a Hull MA. This is the technical analysis tool that determines bearish or bullish momentum.
OBV-Based Momentum Conditions: Uses two exponential moving averages of OBV to determine bullish or bearish momentum shifts, anomalities, breakouts where banks flow their funds in or Smart Money Concepts trade.
Moving Averages (MA):
Multiple MA Types: Includes Simple Moving Average (SMA), Exponential Moving Average (EMA), Weighted Moving Average (WMA), Hull Moving Average (HMA), and Volume-Weighted Moving Average (VWMA), selectable via input parameters.
MA Speed Calculation: Measures the percentage change in MA values to determine the direction and speed of the trend.
Range Filtering:
Variance-Based Filter: Utilizes variance and moving averages to filter out trades during low-volatility periods, enhancing trade quality.
Color-Coded Range Indicators: Visualizes range filtering with color changes on the chart for quick assessment.
Scalping Mechanism:
Heikin-Ashi Candles: Optionally uses Heikin-Ashi candles for smoother price action analysis.
EMA-Based Trend Detection: Employs fast, medium, and slow EMAs to determine trend direction and potential entry points.
Fractal-Based Filtering: Detects regular or BW (Black & White) fractals to confirm trade signals.
Take Profit (TP) Management:
Dynamic TP Levels: Calculates TP levels based on the number of consecutive long or short entries, adjusting targets to maximize profits.
TP Signals and Re-Entry: Plots TP signals on the chart and allows for automatic re-entry upon TP hit, maintaining continuous trade flow.
Risk Management:
Commission Integration: Accounts for trading commissions to ensure net profitability.
Position Sizing: Configured to use a percentage of equity for each trade, adjustable via input parameters.
Pyramiding: Allows up to one additional position per direction to enhance gains during strong trends.
Alerts and Visual Indicators:
Buy/Sell Signals: Plots visual indicators (triangles and flags) on the chart to signify entry and TP points.
Bar Coloring: Changes bar colors based on ADX and trend conditions for immediate visual cues.
Price Levels: Marks significant price levels related to TP and position entries with cross styles.
Input Parameters
Source Settings:
Custom Sources (srcinput): Choose from various price and volume sources to tailor indicator calculations.
ADX Settings:
ADX Type (ADX_options): Select between 'CLASSIC' and 'MASANAKAMURA' methods.
ADX Length (ADX_len): Defines the period for ADX calculation.
ADX Threshold (th): Sets the minimum ADX value to consider a strong trend.
RSI Settings:
RSI Length (len_3): Period for RSI calculation.
RSI Source (src_3): Source data for RSI.
Trend Strength Settings:
Channel Length (n1): Period for trend channel calculation.
Average Length (n2): Period for smoothing trend strength.
Jurik Moving Average (JMA) Settings:
JMA Source (inp): Source data for JMA.
JMA Resolution (reso): Timeframe for JMA calculation.
JMA Repainting (rep): Option to allow JMA to repaint.
JMA Length (lengths): Period for JMA.
Parabolic SAR Settings:
SAR Start (start): Initial acceleration factor.
SAR Increment (increment): Acceleration factor increment.
SAR Maximum (maximum): Maximum acceleration factor.
SAR Point Width (width): Visual width of SAR points.
Trend Indicator Settings:
Trend Timeframe (timeframe): Period for trend indicator calculations.
Momentum Settings:
Source Type (srcType): Select between 'Price' and 'VWAP'.
Momentum Source (srcPrice): Source data for momentum calculations.
RSI Length (rsiLen): Period for momentum RSI.
Smooth Length (sLen): Smoothing period for momentum RSI.
OBV Settings:
OBV Line 1 (e1): EMA period for OBV line 1.
OBV Line 2 (e2): EMA period for OBV line 2.
Moving Average (MA) Settings:
MA Length (length): Period for MA calculations.
MA Type (matype): Select MA type (1: SMA, 2: EMA, 3: HMA, 4: WMA, 5: VWMA).
Range Filter Settings:
Range Filter Length (length0): Period for range filtering.
Range Filter Multiplier (mult): Multiplier for range variance.
Take Profit (TP) Settings:
TP Long (tp_long0): Percentage for long TP.
TP Short (tp_short0): Percentage for short TP.
Scalping Settings:
Scalping Activation (ACT_SCLP): Enable or disable scalping.
Scalping Length (HiLoLen): Period for scalping indicators.
Fast EMA Length (fastEMAlength): Period for fast EMA in scalping.
Medium EMA Length (mediumEMAlength): Period for medium EMA in scalping.
Slow EMA Length (slowEMAlength): Period for slow EMA in scalping.
Filter (filterBW): Enable or disable additional fractal filtering.
Pullback Lookback (Lookback): Number of bars for pullback consideration.
Use Heikin-Ashi Candles (UseHAcandles): Option to use Heikin-Ashi candles for smoother trend analysis.
Strategy Logic
Indicator Calculations:
Volume and Source Selection: Determines the primary data source based on user input, ensuring flexibility and adaptability.
ADX Calculation: Computes ADX using either the Classic or Masanakamura method to assess trend strength.
RSI Calculation: Evaluates market momentum using RSI, further smoothed with custom periods.
Trend Strength Assessment: Utilizes trend channel and average lengths to gauge the robustness of current trends.
Jurik Moving Average (JMA): Smooths price data to reduce lag and enhance trend detection.
Parabolic SAR: Identifies potential trend reversals with adjustable parameters for sensitivity.
Momentum Analysis: Combines RSI with DEMA and OBV-based conditions to confirm bullish or bearish momentum.
Moving Averages: Employs multiple MA types to determine trend direction and speed.
Range Filtering: Filters out low-volatility periods to focus on high-probability trades.
Trade Conditions:
Long Entry Conditions:
ADX Confirmation: ADX must be above the threshold, indicating a strong uptrend.
RSI and Momentum: RSI below 70 and positive momentum signals.
JMA and SAR: JMA indicates an uptrend, and Parabolic SAR is below the price.
Trend Indicator: Confirms the current trend direction.
Range Filter: Ensures market is in an upward range.
Scalping Option: If enabled, additional scalping conditions must be met.
Short Entry Conditions:
ADX Confirmation: ADX must be above the threshold, indicating a strong downtrend.
RSI and Momentum: RSI above 30 and negative momentum signals.
JMA and SAR: JMA indicates a downtrend, and Parabolic SAR is above the price.
Trend Indicator: Confirms the current trend direction.
Range Filter: Ensures market is in a downward range.
Scalping Option: If enabled, additional scalping conditions must be met.
Position Management:
Entry Execution: Places long or short orders based on the identified conditions and user-selected position types (Longs, Shorts, or Both).
Take Profit (TP): Automatically sets TP levels based on predefined percentages, adjusting dynamically with consecutive trades.
Re-Entry Mechanism: Allows for automatic re-entry upon TP hit, maintaining active trading positions.
Exit Conditions: Closes positions when TP levels are reached or when opposing trend signals are detected.
Visual Indicators:
Bar Coloring: Highlights bars in green for bullish conditions, red for bearish, and orange for neutral.
Plotting Price Levels: Marks significant price levels related to TP and trade entries with cross symbols.
Signal Shapes: Displays triangle and flag shapes on the chart to indicate trade entries and TP hits.
Alerts:
Custom Alerts: Configured to notify traders of long entries, short entries, and TP hits, enabling timely trade management and execution.
Usage Instructions
Setup:
Apply the Strategy: Add the script to your TradingView chart set to BTCUSDT with a 65-minute timeframe.
Configure Inputs: Adjust the input parameters under their respective groups (e.g., Source Settings, ADX, RSI, Trend Strength, etc.) to match your trading preferences and risk tolerance.
Position Selection:
Choose Position Type: Use the Position input to select Longs, Shorts, or Both based on your market outlook.
Execution: The strategy will automatically execute and manage positions according to the selected type, ensuring targeted trading actions.
Signal Interpretation:
Buy Signals: Blue triangles below the bars indicate potential long entry points.
Sell Signals: Red triangles above the bars indicate potential short entry points.
Take Profit Signals: Flags above or below the bars signify TP hits for long and short positions, respectively.
Bar Colors: Green bars suggest bullish conditions, red bars indicate bearish conditions, and orange bars represent neutral or consolidating markets.
Risk Management:
Default Position Size: Set to 100% of equity. Adjust the default_qty_value as needed for your risk management strategy.
Commission: Accounts for a 0.1% commission per trade. Adjust the commission_value to match your broker's fees.
Pyramiding: Allows up to one additional position per direction to enhance gains during strong trends.
Backtesting and Optimization:
Historical Testing: Utilize TradingView's backtesting features to evaluate the strategy's performance over historical data.
Parameter Tuning: Optimize input parameters to align the strategy with current market dynamics and personal trading objectives.
Alerts Configuration:
Set Up Alerts: Enable and configure alerts based on the predefined alertcondition statements to receive real-time notifications of trade signals and TP hits.
Additional Features
Comprehensive Indicator Integration: Combines multiple technical indicators to provide a holistic view of market conditions, enhancing trade signal accuracy.
Scalping Options: Offers an optional scalping mechanism to capitalize on short-term price movements, increasing trading flexibility.
Dynamic Take Profit Levels: Adjusts TP targets based on the number of consecutive trades, maximizing profit potential during favorable trends.
Advanced Volume Analysis: Utilizes various volume indicators to confirm trend strength and validate trade signals.
Customizable Range Filtering: Filters trades based on market volatility, ensuring trades are taken during optimal conditions.
Heikin-Ashi Candle Support: Optionally uses Heikin-Ashi candles for smoother price action analysis and reduced noise.
====Recommendations====
Thorough Backtesting:
Historical Performance: Before deploying the strategy in a live trading environment, perform comprehensive backtesting to understand its performance under various market conditions. These are the premium settings for Avalanche Coinbase.
Optimization: Regularly review and adjust input parameters to ensure the strategy remains effective amidst changing market volatility and trends. Backtest the strategy for each crypto and make sure you are in the right brokage when using the volume sources as it will affect the overall outcome of the trading strategy.
Risk Management:
Position Sizing: Adjust the default_qty_value to align with your risk tolerance and account size.
Stop-Loss Implementation: Although the strategy includes TP levels, they're also consided to be a stop-loss mechanisms to protect against adverse market movements.
Commission Adjustment: Ensure the commission_value accurately reflects your broker's fees to maintain realistic backtesting results. Generally, 0.1~0.3% are most of the average broker's comission fees.
Slipage: The slip comssion is 1 Tick, since the strategy is adjusted to only enter/exit on bar close where most positions are available.
Continuous Monitoring:
Strategy Performance: Regularly monitor the strategy's performance to ensure it operates as expected and make adjustments as needed. A max-drawndown hit has been added to operate in case the premium Avalanche settings go wrong, but you can turn it off an adjust the equity percentage to 50% if you are confortable with the high volatile max-drown or even 100% if your account allows you to borrow cash.
Customization:
Indicator Parameters: Tailor indicator settings (e.g., ADX length, RSI period, MA types) to better fit your specific trading style and market conditions.
Scalping Options: Enable or disable scalping based on your trading preferences and risk appetite.
Conclusion
Gabriel's Witcher Strategy is a robust and versatile trading solution designed to navigate the complexities of the Crypto market. By integrating a wide array of technical indicators and providing extensive customization options, this strategy empowers traders to execute informed and strategic trades. Its comprehensive approach, combining trend analysis, momentum detection, volume evaluation, and range filtering, ensures that trades are taken during optimal market conditions. Additionally, the inclusion of scalping features and dynamic take-profit management enhances the strategy's adaptability and profitability potential. Unlike any trading strategy, with both diligent testing and continuous monitoring under the strategy tester, it's possible to achieve sustained success by adjusting the settings to the individual Crypto that need it, for example this one is preset for Avalanche Coinbase 65 Miinutes but it can be adjust for BTCUSD or Etherium if you backtest and search for the right settings.
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.
Trend, Momentum and Price value analysis Extended [deepakks444]Trend, Momentum, and Price Value Analysis Extended
This Pine Script™ indicator is designed to offer traders a comprehensive overview of price trends, momentum, and market strength through the use of several widely-recognized technical analysis tools. The indicator integrates multiple signals and plots directly on the chart, as well as a customizable table to help visually organize and interpret the data. Here’s an overview of the key features included:
Key Features:
VWAP (Volume-Weighted Average Price): Calculates the average price weighted by volume to give insight into whether the price is above or below the market's fair value.
Alligator Indicator: Uses a combination of three moving averages (jaw, teeth, and lips) to help identify trending conditions.
Supertrend: A trend-following indicator that signals potential buy or sell opportunities based on price movements relative to a dynamically calculated support/resistance line.
20-period Moving Average (MA): A basic moving average to smooth out price data and highlight the underlying trend.
MACD (Moving Average Convergence Divergence): Helps identify changes in the strength, direction, and momentum of a trend.
Volume with Moving Average: Compares current volume against its moving average to identify potential volume spikes.
RSI (Relative Strength Index): Measures the speed and change of price movements, signaling overbought or oversold conditions.
ADX (Average Directional Index): An indicator used to quantify trend strength, helping traders determine whether the market is trending or in a range.
Pivot Points: Calculates daily pivot points and identifies support and resistance levels based on price movements.
Bollinger Bands: A volatility indicator that uses standard deviation to highlight potential overbought or oversold conditions.
Customization Options:
Modify the length of the price and volume moving averages.
Adjust RSI thresholds for buy and sell signals.
Set the thresholds for ADX to differentiate between weak, average, and strong trends.
Toggle the visibility of the 20-period MA and Supertrend on the chart.
Choose to display the percentage difference between the current price and indicator values in the table.
Table Display:
The indicator includes a table that summarizes the status of all signals, showing:
Signal (Buy/Sell/Neutral): Based on each indicator's interpretation of price action.
Percentage Difference: Optional display of how far the price is from the reference level (e.g., the difference between the price and VWAP, Supertrend line, or Moving Average).
The table allows traders to quickly assess the current market conditions across several indicators in one place, making it easier to gauge overall market sentiment.
Signal Logic:
This indicator uses a scoring system to calculate the percentage of indicators signaling a buy or sell. If the buy or sell score reaches 70% or higher, the indicator will plot buy or sell signals on the chart. The combined signal logic is displayed in the table as "Buy," "Sell," or "No Signal," based on the majority of the contributing indicators.
Intended Use:
This tool is designed to assist traders in their technical analysis by consolidating multiple popular indicators into one script. It provides a clear visual representation of various market signals, helping traders to make informed decisions about potential trade entries and exits. However, this indicator is for educational purposes and should not be used as financial advice. Traders should always use proper risk management and conduct their own research before making any trading decisions.
Disclaimer: This script is for educational purposes only and does not constitute financial advice. Trading involves risk, and past performance of an indicator does not guarantee future results. Please use it alongside proper risk management practices.
CSVParser█ OVERVIEW
The library contains functions for parsing and importing complex CSV configurations (with a special simple syntax) into a special hierarchical object (of type objProps ) as follows:
Functions:
parseConfig() - reads CSV text into an objProps object.
toT() - displays the contents of an objProps object in a table form, which allows to check the CSV text for syntax errors.
getPropAr() - returns objProps.arS array for child object with `prop` key in mpObj map (or na if not found)
This library is handy in allowing users to store presets for the scripts and switch between them (see, e.g., my HTF moving averages script where users can switch between several preset configuations of 24 MA's across 5 timeframes).
█ HOW THE SCRIPT WORKS.
The script works as follows:
all values read from config text are stored as strings
Nested brackets in config text create a named nested objects of objProps0, ... , objProps9 types.
objProps objects of each level have the following fields:
- array arS for storing values without names (e.g. "12, 23" will be imported into a string array arS as )
- map mpS for storing items with names (e.g. "tf = 60, length = 21" will be imported as <"tf", "60"> and <"length", "21"> pairs into mpS )
- map mpObj for storing nested objects (e.g. "TF1(tf=60, length(21,50,100))" creates a <"TF1, objProps0 object> pair in mpObj map property of the top level object (objProps) , "tf=60" is stored as <"tf", "60"> key-value pair in mpS map property of a next level object (objProps0) and "length (...)" creates a <"length", objProps1> pair in objProps0.mpObj map while length values are stored in objProps1.arS array as strings. Every opening bracket creates a next level objProps object.
If objects or properties with duplicate names are encountered only the latest is imported
(e.g. for "TF1(length(12,22)), TF1(tf=240)" only "TF1(tf=240)" will be imported
Line breaks are not regarded as part of syntax (i.e. values are imported with line breaks, you can supply
symbols "(" , ")" , "," and "=" are special characters and cannot be used within property values (with the exception of a quoted text as a value of a property as explained below)
named properties can have quoted text as their value. In that case special characters within quotation marks are regarded as normal characters. Text between "=" and opening quotation mark as well as text following the closing quotation mark and until next property value is ignored. E.g. "quote = ignored "The quote" also ignored" will be imported as <"quote", "The quote">. Quotation marks within quotes must be excaped with "\" .
if a key names happens to be a multi-line then only first line containing non-space characters (trimmed from spaces) is taken as a key.
")," or ") ," and similar do not create an empty ("") array item while ",," does. (",)" creates an "" array item)
█ CSV CONFIGURATION SYNTAX
Unnamed values: just list them comma separated and they will be imported into arS of the object of the current level.
Named values: use "=" sign as follows: "property1=value1, property2 = value2"
Value of several objects: Use brackets after the name of the object ant list all object properties within the brackets (including its child objects if necessary). E.g. "TF1(tf =60, length(21,200), TF2(tf=240, length(50,200)"
Named and unnamed values as well as objects can go in any order. E.g. "12, tf=60, 21" will be imported as follows: "12", "21" will go to arS array and <"tf", "60"> will go to mpS maP of objProps (the top level object).
You can play around and test your config text using demo in this library, just edit your text in script settings and see how it is parsed into objProps objects.
█ USAGE RECOMMENDATIONS AND SAMPLE USE
I suggest the following approach:
- create functions for your UDT which can set properties by name.
- create enumerator functions which iterates through all the property names (supplied as a const string array) and imports their values into the object
█ SAMPLE USE
A sample use of this library can be seen in my Multi-timeframe 24 moving averages + BB+SAR+Supertrend+VWAP script where settings for the MAs across many timeframes are imported from CSV configurations (presets).
█ FULL LIST OF FUNCTIONS AND PROPERTIES
nzs(_s, nz)
Like nz() but for strings. Returns `nz` arg (default = "") if _s is na.
Parameters:
_s (string)
nz (string)
method init(this)
Initializes objProps obj (creates child maps and arrays)
Namespace types: objProps
Parameters:
this (objProps)
method toT(this, nz)
Outputs objProps to string matrices for further display using autotable().
Namespace types: objProps, objProps1, ..., objProps9
Parameters:
this (objProps/objProps1/..../objProps9)
nz (string)
Returns: A tuple - value, merge and color matrix (autotable() parameters)
method parseConfig(this, s)
Reads config text into objProps (unnamed values into arS, named into mpS, sub-levels into mpObj)
Namespace types: objProps
Parameters:
this (objProps)
s (string)
method getPropArS(this, prop)
Returns a string array of values for a given property name `prop`. Looks for a key `prop` in objProps.mpObj
if finds pair returns obj.arS, otherwise returns na. Returns a reference to the original, not a copy.
Namespace types: objProps, objProps1, ..., objProps8
Parameters:
this (objProps/objProps1/..../objProps8)
prop (string)
method getPropVal(this, prop, id)
Checks if there is an array of values for property `prop` and returns its `id`'s element or na if not found
Namespace types: objProps, objProps1, ..., objProps8
Parameters:
this (objProps/objProps1/..../objProps8) : objProps object containing array of property values in a child objProp object corresponding to propertty name.
prop (string) : (string) Name of the property
id (int) : (int) Id of the element to be returned from the array pf property values
objProps9 type
Object for storing values read from CSV relating to a particular object or property name.
Fields:
mpS (map) : (map() Stores property values as pairs
arS (array) : (string ) Array of values
objProps, objProps0, ... objProps8 types
Object for storing values read from CSV relating to a particular object or property name.
Fields:
mpS (map) : (map() Stores property values as pairs
arS (array) : (string ) Array of values
mpObj (map) : (map() Stores objProps objects containing properties's data as pairs
OmniSoftwareIntroduction:
The OmniSoftware Indicator is an exclusive, invite-only tool meticulously designed for traders seeking to enhance their market insights and improve their trading strategies. This premium indicator combines multiple advanced techniques to offer users not only clear trend signals and market zones but also cutting-edge features like adaptive oscillators and customizable alerts. By integrating features typically found in various standalone indicators, OmniSoftware becomes a multi-purpose, all-in-one trading tool.
This invite-only script adheres strictly to TradingView's guidelines for invite-only indicators and is designed to provide superior functionality without revealing its underlying code or proprietary logic. If you’re looking for a powerful edge in volatile markets, OmniSoftware is the tool you need in your arsenal.
Key Features:
1. Dual Display Modes: SuperTrend Zones & Deviation Bands
OmniSoftware provides traders with the ability to switch between two key modes:
SuperTrend Zones: This mode dynamically adjusts to market conditions, highlighting areas where the trend is either strengthening or weakening. These zones are ideal for capturing trend continuations and potential reversals with a high degree of confidence. Unlike traditional trend indicators, OmniSoftware's SuperTrend Zones are enhanced with adaptive algorithms that respond to market volatility, ensuring that false signals are minimized.
Deviation Bands: In this mode, the indicator uses custom deviation bands based on statistical deviations from a moving average. These bands help identify extreme price levels, providing insight into potential mean-reversion opportunities. The Deviation Bands mode is particularly useful for identifying overbought and oversold conditions, capturing reversal points that standard deviation-based tools often miss.
2. Adaptive Z-Score Oscillator
At the heart of OmniSoftware is its unique Z-Score Oscillator, which is far more advanced than traditional Z-Score implementations. This oscillator:
Tracks volatility extremes by analyzing price movements relative to their historical averages.
Adapts dynamically to market conditions, automatically adjusting its sensitivity based on recent volatility. This ensures that the oscillator remains accurate even in rapidly changing markets.
Highlights overbought and oversold conditions, signaling potential reversal areas with unprecedented precision.
Unlike typical oscillators, which remain static and fail to adapt to changing market volatility, OmniSoftware's Z-Score Oscillator adjusts itself using advanced mathematical models to ensure relevance and accuracy in both high- and low-volatility environments. This provides users with a real-time gauge of potential turning points in the market, making it an invaluable tool for timing entries and exits.
3. Enhanced Trend Detection
The OmniSoftware Indicator uses a dual VWAP (Volume Weighted Average Price) calculation to gauge market trends. By analyzing volume data alongside price, it effectively filters out noise and delivers a reliable trend assessment. The result is a system that provides:
Clear visual representation of uptrends (blue candles) and downtrends (red candles).
Neutral zones (purple candles) when the market is consolidating or lacks clear direction.
This combination of price and volume ensures that the trends identified by OmniSoftware are robust and meaningful, giving traders the confidence to follow or fade the trend as appropriate.
4. Proprietary Signal Detection System
OmniSoftware’s advanced signal detection system is designed to generate high-confidence buy and sell signals:
Long signals are shown as diamonds below the price when market conditions suggest an optimal buying opportunity.
Short signals appear as diamonds above the price when a short trade may be more favorable.
These signals are backed by a unique blend of volume analysis, trend strength, and the indicator’s proprietary algorithms. The indicator differentiates between "full" and "partial" signals based on whether all conditions align for a high-probability trade. Additionally, the signals are further validated by volume trends, ensuring traders are only notified when significant market movements are expected.
5. Custom Alerts and Conditions
To help traders stay ahead of the market, OmniSoftware includes an extensive range of customizable alerts:
Price In Zone: Alerts are triggered when the price enters key SuperTrend or Deviation Band zones, providing traders with real-time information about critical market levels.
New Trigger Alerts: Automatically alert users when a new buy or sell signal is generated, allowing traders to act immediately on emerging opportunities.
Full Long/Short Signal Alerts: When all criteria are met for a high-probability long or short signal, the indicator triggers an alert, ensuring you’re never out of sync with the market’s most important moves.
These alerts are fully customizable, allowing traders to tailor them according to their specific strategies. Whether you're trading breakouts, reversals, or trend continuations, OmniSoftware’s alert system ensures you won’t miss an opportunity.
Customization & Flexibility
OmniSoftware is designed with the flexibility to suit a wide range of trading styles and preferences. Key customization features include:
Color Schemes: Traders can customize the color schemes for uptrend, downtrend, and neutral zones, allowing for a personalized trading experience.
Transparency Control: Adjust the transparency of plotted zones and bands to enhance chart readability while maintaining focus on essential areas.
Precision and Aesthetic Adjustments: Fine-tune the precision of price levels and zone representations to match your specific requirements.
Use Cases:
Trend Traders:
OmniSoftware is perfect for trend-following strategies, providing clear, reliable signals that help traders identify entry points within established trends. The combination of SuperTrend Zones and VWAP trend analysis ensures that traders can catch both early-stage and continuation trends.
Reversal Traders:
The Deviation Bands and Z-Score Oscillator are invaluable tools for reversal traders. By identifying overbought and oversold conditions with high accuracy, OmniSoftware enables traders to anticipate reversals at extreme price levels, offering prime opportunities for countertrend trades.
Breakout Traders:
With its ability to detect and highlight key price zones, OmniSoftware helps breakout traders identify areas where the price is likely to break out of a consolidation pattern or key level. The inclusion of volume-based confirmations ensures that breakouts are backed by significant market participation.
Compliance with TradingView’s Guidelines:
As per TradingView's rules and guidelines for invite-only scripts:
No Source Code Disclosure: OmniSoftware is an invite-only script, meaning the underlying code and logic are proprietary and are not shared with users.
Detailed Description: The description provided here gives a comprehensive overview of the indicator’s functionality and its unique features without revealing any proprietary formulas or exact coding details.
No Unauthorized Use: Access to this script is restricted to users with permission, maintaining compliance with TradingView's guidelines on intellectual property and the responsible sharing of scripts.
Proper Attribution: OmniSoftware is the intellectual property of OmegaTools, and all usage rights are governed by the terms provided upon invitation. Unauthorized sharing or distribution of this script is prohibited.
Conclusion:
The OmniSoftware Indicator offers an advanced suite of tools that not only track price and volume trends but also provide a comprehensive market view by analyzing volatility extremes, identifying key price zones, and delivering high-accuracy signals for both trend and reversal strategies. This is not your average trading indicator; OmniSoftware combines the best aspects of multiple indicators into a single, cohesive tool designed to give you a competitive edge in any market.
Traders who use OmniSoftware benefit from its robust, adaptive algorithms that adjust to market volatility, ensuring that signals remain relevant and reliable. Whether you are a novice or an experienced trader, the OmniSoftware Indicator is engineered to elevate your trading experience to the next level.
Disclaimer: This script is available on an invite-only basis and is for educational purposes only. Trading carries risk, and users should perform their own due diligence before making any trading decisions. OmegaTools does not guarantee profit and is not responsible for any trading losses that may occur from using this script.