Bilateral Stochastic Oscillator - For The Sake Of EfficiencyIntroduction
The stochastic oscillator is a feature scaling method commonly used in technical analysis, this method is the same as the running min-max normalization method except that the stochastic oscillator is in a range of (0,100) while min-max normalization is in a range of (0,1). The stochastic oscillator in itself is efficient since it tell's us when the price reached its highest/lowest or crossed this average, however there could be ways to further develop the stochastic oscillator, this is why i propose this new indicator that aim to show all the information a classical stochastic oscillator would give with some additional features.
Min-Max Derivation
The min-max normalization of the price is calculated as follow : (price - min)/(max - min) , this calculation is efficient but there is alternates forms such as :
price - (max - min) - min/(max - min)
This alternate form is the one i chosen to make the indicator except that both range (max - min) are smoothed with a simple moving average, there are also additional modifications that you can see on the code.
The Indicator
The indicator return two main lines, in blue the bull line who show the buying force and in red the bear line who show the selling force.
An orange line show the signal line who represent the moving average of the max(bull,bear), this line aim to show possible exit/reversals points for the current trend.
Length control the highest/lowest period as well as the smoothing amount, signal length control the moving average period of the signal line, the pre-filtering setting indicate which smoothing method will be used to smooth the input source before applying normalization.
The default pre-filtering method is the sma.
The ema method is slightly faster as you can see above.
The triangular moving average is the moving average of another moving average, the impulse response of this filter is a triangular function hence its name. This moving average is really smooth.
The lsma or least squares moving average is the fastest moving average used in this indicator, this filter try to best fit a linear function to the data in a certain window by using the least squares method.
No filtering will use the source price without prior smoothing for the indicator calculation.
Relationship With The Stochastic Oscillator
The crosses between the bull and bear line mean that the stochastic oscillator crossed the 50 level. When the Bull line is equal to 0 this mean that the stochastic oscillator is equal to 0 while a bear line equal to 0 mean a stochastic oscillator equal to 100.
The indicator and below a stochastic oscillator of both period 100
Using Levels
Unlike a stochastic oscillator who would clip at the 0 and 100 level the proposed indicator is not heavily constrained in a range like the stochastic oscillator, this mean that you can apply levels to trigger signals
Possible levels could be 1,2,3... even if the indicator rarely go over 3.
Its then possible to create strategies using such levels as support or resistance one.
Conclusion
I've showed a modified stochastic oscillator who aim to show additional information to the user while keeping all the information a classical stochastic oscillator would give. The proposed indicator is no longer constrained in an hard range and posses more liberty to exploit its scale which in return allow to create strategies based on levels.
For pinescript users what you can learn from this is that alternates forms of specific formulas can be extremely interesting to modify, changes can be really surprising so if you are feeling stuck, modifying alternates forms of know indicators can give great results, use tools such as sympy gamma to get alternates forms of formulas.
Thanks for reading !
If you are looking for something or just want to say thanks try to pm me :)
Komut dosyalarını "摩根纳斯达克100基金风险大吗" için ara
High/Low bandsGives good idea about trend.
In last 100 days the lowest price was this.
In last 100 days the highest price was this.
Price makes new 100 days high! (uptrend)
Chaikin MF% (CMFP) w. Alerts, Bells & Whistles [LucF]This is Chaikin’s Money Flow indicator on a 0-100 scale with buy/sell signals, alerts and other bells & whistles.
It includes:
- a fast EMA (16 periods by default),
- a slow MA (64 periods by default),
- histograms,
- 3 different sorts of crosses,
- big swings identification,
- buy/sell signals on CMFP crossing back from outside user-defined levels,
- buy/sell signals on the slow MA pivots above/below user-defined levels,
- alerts on big swings and buy/sells.
This indicator started with @LazyBear code (VAPI) at:
@cI8DH then changed the scale to 0-100, which I find very useful:
I then added the rest.
The chart above shows both clean and busy versions of the indicator.
Note that the default length is 10 rather than the commonly used 20. I use CMFP in conjunction with VFI and like the fact that it is faster than VFI. The default inputs show the way I normally use this indicator, with the slow MA shown in histogram mode. I find it gives good context to the signal line. Crosses between the two are often useful.
The buy/sell signals aren’t the main attraction of this indicator, and nothing to write home about. Like the big swing markers, I think it’s more realistic to view them as pointers to potentially interesting areas on charts. Their nature makes them more suited to identifying reversals. They certainly aren’t reliable enough to turn this study into a strategy and I normally don’t use them. The levels pre-defined for the buy/sell signals on CMFP are most useful on short intervals. The buy/sell signals on the slow MA pivots work on a more complete range of intervals. Optimization for your specific instruments and intervals will improve their reliability.
As usual when defining alerts, be sure you already have defined proper inputs and that you are on the intended interval, as they will be used when triggering alerts.
3 of SlowStochastics
스토캐스틱 3개를 한번에 볼수 있습니다. 천장과 바닥은 각 100의 위치마다 존재합니다
You can see three slow stochastics at once. The ceiling and floor are located at each 100 (0 - 100 - 200- 300)
Percentage Price Oscillator (PPO)The Percentage Price Oscillator (PPO) is a momentum oscillator that measures the difference between two moving averages as a percentage of the larger moving average. As with its cousin, MACD, the Percentage Price Oscillator is shown with a signal line, a histogram and a centerline. Signals are generated with signal line crossovers, centerline crossovers, and divergences. First, PPO readings are not subject to the price level of the security. Second, PPO readings for different securities can be compared, even when there are large differences in the price.
Calculations
PPO: {(12-day EMA - 26-day EMA)/26-day EMA} x 100
Signal Line: 9-day EMA of PPO
PPO Histogram: PPO - Signal Line
While MACD measures the absolute difference between two moving averages, PPO makes this a relative value by dividing the difference by the slower moving average (26-day EMA). PPO is simply the MACD value divided by the longer moving average. The result is multiplied by 100 to move the decimal place two spots.
Interpretation
As with MACD, the PPO reflects the convergence and divergence of two moving averages. PPO is positive when the shorter moving average is above the longer moving average. The indicator moves further into positive territory as the shorter moving average distances itself from the longer moving average. This reflects strong upside momentum. The PPO is negative when the shorter moving average is below the longer moving average. Negative readings grow when the shorter moving average distances itself from the longer moving average (goes further negative). This reflects strong downside momentum. The histogram represents the difference between PPO and its 9-day EMA, the signal line. The histogram is positive when PPO is above its 9-day EMA and negative when PPO is below its 9-day EMA. The PPO-Histogram can be used to anticipate signal line crossovers in the PPO.
MACD, PPO and Price
MACD levels are affected by the price of a security. A high-priced security will have higher or lower MACD values than a low-priced security, even if volatility is basically equal. This is because MACD is based on the absolute difference in the two moving averages. Because MACD is based on absolute levels, large price changes can affect MACD levels over an extended period of time. If a stock advances from 20 to 100, its MACD levels will be considerably smaller around 20 than around 100. The PPO solves this problem by showing MACD values in percentage terms.
Conclusions
The Percentage Price Oscillator (PPO) generates the same signals as the MACD, but provides an added dimension as a percentage version of MACD. The PPO levels of the Dow Industrials (price > 20K) can be compared against the PPO levels of IBM (price < 200) because the PPO “levels” the playing field. In addition, PPO levels in one security can be compared over extended periods of time, even if the price has doubled or tripled. This is not the case for the MACD.
Limitations
Despite its advantages, the PPO is still not the best oscillator to identify overbought or oversold conditions because movements are unlimited (in theory). Levels for RSI and the Stochastic Oscillator are limited and this makes them better suited to identify overbought and oversold levels.
Source: Stockcharts
Multiple Moving AveragesThis is really simple. But useful for me as I don't have a paid account. No-pro users can only use 3 indicators at once and because I rely heavily on simple moving averages it can be a real pain.
This one indicator features:
20 MA
50 MA
100 MA
200 MA
which I find are the most useful overall. The 20 and 50 over all time frame but in particular < 1 day, the 100 and 200 at > 4 hr time frames. In general I don't use the 100 MA that much. The daily 200 MA is a critical support for many assets like stocks and cryptos. I'm by no means a pro and if you are learning I recommend becoming familiar with moving averages right at the beginning.
If you want to deactivate some of the lines, you can do it via the indicator's settings icon.
Exponential Moving Average (Set of 3) [Krypt] + 13/34 EMAsI took Krypt's script and essentially added on to it.
the 20/50/100/200 EMAs should be used together as support and resistance as normal.
Wait for price to break 200 EMA
Wait for 50 EMA to cross 200 EMA
Wait for pullback to 50 EMA to open position
20 and 100 EMAs are for extra information about moving support and resistance
and 13/34 EMAs should be used in conjunction
When 13 EMA crosses 34 EMA, open position
When price gets far from 13/34, close position (because price will attempt to revert back to mean)
This is better for scalping and swing trades than the 20/50/100/200 setup.
Twitter: @AzorAhai06
Ichimoku Cloud Score v1.0This script calculates a simple Ichimoku Score based on the signals documented here , with a few additions. Each of the score components can be individually weighted via the script inputs . The output is a plot of the normalized Ichimoku score, in the range of -100 to 100.
This script has been heavily modified from 'Ichimoku Cloud Signal Score v2.0.0 '. Credit to user 'dashed' for the initial implementation.
This has been modified with several refinements:
Clean/Organized Code
Simplified Inputs
Improved Style
Scores normalized to a range (-100, 100)
Bugfixes and Improvements
Script Inputs: i.imgur.com
Volume RatioDefinition:
Volume ratio can be obtained in a similar way to RSI.
Volume Ratio (%) = 100 - 100/(1+vr)
The parameter "vr" is defined as
vr=(A+U/2)/(D+U/2)
A=Total volume of the periods when the price advanced
D=Total volume of the periods when the price declined
U=Total volume of the periods when the price unchanged
After substitution, following expression can be derived and the denominator represents total volume of all periods.
Volume Ratio (%) = 100 x (A+U/2)/(A+D+U)
Notes:
A similar method to interpret RSI can be employed.
1) Overbought level over 70% and oversold level under 30%. These levels need to be adjusted according to the periods, time frames and issues.
2) Bullish picture over 50% line and bearish picture under 50% line.
3) Crossing oversold level to the upside can be taken as a confirmation of bullish reversal. - and vice versa for a bearish reversal.
4) After a long-term bearish market, the increase of volume can happen in the early stage of a bullish market.
5) Buying opportunity can be suggested when the volume ratio is declining and the price is either advancing or leveling off.
CCI with Volume Weighted EMA Here is an attempt to improve on the CCI using a volume weighted ema which is then plugged into the CCI formula.
Use:
The CCI with VW EMA is an oscillator that gives readings between -100 and +100. The usual use is to 'go long' with values over +100 and short on values less than -100.
Another use of this oscillator is a countertrend indicator where one sells at crosses under +100 and buys on crosses over -100.
Multi-Functional Fisher Transform MTF with MACDL TRIGGERWhat this indicator gives you is a true signal when price is exhausted and ready for a fast turnaround. Fisher Transform is set for multi-time frame and also allows the user to change the length. This way a user can compare two or more time spans and lengths to look for these MACDL divergent triggers after a Fisher exhaustion. With so many indicators, it's probably best to merge these indicators and change the Fisher and Trigger colors so you can still have a look at price action (remember to scale right after merger). I've noticed from time to time when you have Fisher 34 100 and 300 up and running on two different time frames such as 5 and 15 min charts, with MACDL triggers on the 100/300 or 34/100 you get a high probability trade trigger. However, there are rare exceptions such as when price moves in a parabolic state up or down for a long period where this indication does not work. Ideally this indicator works best in a sideways market or slow rising/descending moving market.
This indicator was worked on by Glaz, nmike and myself
LazyBear also introduced the MACDL indicator
CCI Crossover AlertThis very simple indicator will give you a blue background where the CCI crossed from below -100 to above -100, and a red background where it crossed from above 100 to below 100.
Multi-Timeframe EMAs & WMAsMulti-Timeframe EMAs & WMAs (MTF EMAWMA)
The Multi-Timeframe EMAs & WMAs (MTF EMAWMA) indicator is a comprehensive tool designed to provide a multi-dimensional view of market trends by plotting various Exponential Moving Averages (EMAs) and Weighted Moving Averages (WMAs) from different timeframes onto your current chart. This allows traders to quickly assess confluent support and resistance levels, identify trend strength, and gain a broader market perspective without switching timeframes.
Key Features:
Multiple EMAs and WMAs:
This indicator includes:
- EMA 200: Plotted from H1 and M15 timeframes.
- EMA 100: Plotted from H1, M30, and M15 timeframes.
- EMA 50: Plotted from H4, H1, M30, and M15 timeframes.
- WMA 720: Plotted from H4, H1, M30, M15, and M1 timeframes.
Multi-Timeframe Analysis: By displaying moving averages from various timeframes, the indicator helps in understanding the interplay of different trends and their potential impact on price action.
Visual Distinction : Each moving average type and its timeframe representation are color-coded and styled (solid vs. dashed lines) for easy identification and clarity on the chart.
EMA 200: Dark Red
EMA 100: Cyan/Teal
EMA 50: SaddleBrown
WMA 720: Orange
Recommended Usage:
This indicator is specifically tailored for XAU/USD (Gold). It is intended to be used as a confluence tool to complement your existing trading strategies and indicators. It is not designed to be used solely as an entry or exit signal. Instead, leverage the information provided by these multi-timeframe moving averages to:
- Identify major trend directions: Observe the alignment and slope of longer-term moving averages.
- Spot potential support and resistance zones: Price often reacts to these key moving average levels from higher timeframes.
- Confirm trade bias: Use the higher timeframe moving averages to confirm the direction of your trades on lower timeframes.
- Enhance risk management: Understand where strong levels might exist to place stop-losses or take-profits.
Always combine this indicator with other forms of analysis, such as price action, chart patterns, volume analysis, or other technical indicators, to make informed trading decisions.
Remark: The script and description were created by AI.
NY Open ATR System - Tick Range Filter### **New York Open ATR System - Brief Overview**
#### **🎯 Core Purpose**
Identifies **high-potential breakout setups** at the New York open (13:30 UTC) by combining:
1. **Volatility filters** (dual ATR periods)
2. **Tick-based range analysis**
3. **Time-specific triggers**
---
### **⚙️ Key Components**
| **Feature** | **Function** |
|---------------------------|-----------------------------------------------------------------------------|
| **ATR Filters** | Dual volatility checks (short + long periods) at 13:25 UTC |
| **Tick Range Limit** | Highlights candles with range < user-defined ticks (default: 150) |
| **Time Precision** | Focuses exclusively on 13:30 UTC weekday candles |
| **Visual Markers** | Yellow highlight + tick count label (e.g., "147/150 ticks") |
| **Info Panel** | Real-time display of settings and current tick count |
---
### **📊 How It Works**
1. **Pre-Open Check (13:25 UTC)**
- Verifies market volatility using 2 ATR values
- Requires both to exceed user-defined thresholds
2. **Open Analysis (13:30 UTC)**
- Measures exact tick count: `(high - low) / instrument_mintick`
- Compares against your max tick limit (adjustable 1-5000)
3. **Visual Trigger**
- Highlights candle yellow if:
```tick_count < your_set_limit```
- Labels show exact performance vs limit (e.g., "142/150 ticks")
---
### **⚡ Trading Signals**
| **Condition** | **Visual Feedback** |
|----------------------------|---------------------------------------------|
| High volatility + tight range | Yellow candle + tick count label |
| All other scenarios | No marking |
---
### **🛠️ Customization**
```pine
// Key Adjustable Parameters:
maxTicks = input.int(150) // Set 1-5000 ticks
atrPeriod1 = input.int(14) // Short ATR (2-5000)
atrPeriod2 = input.int(161) // Long ATR (2-5000)
candleColor = input.color(color.yellow) // Highlight color
```
---
### **💡 Practical Use Cases**
1. **Breakout Anticipation**
- Tight ranges after volatility spikes often precede strong moves
2. **Session Scalping**
- Identify low-range opens for mean-reversion plays
3. **Volatility Filtering**
- Avoid trading when ATR thresholds aren't met
---
### **📈 Suggested Settings**
| **Market** | **Max Ticks** | **ATR Periods** |
|------------------|--------------|----------------|
| Forex (EUR/USD) | 100-200 | 14/161 |
| Stocks (SPY) | 50-120 | 10/200 |
| Crypto (BTC) | 300-500 | 20/100 |
---
### **✅ Benefits**
- **Precision Timing**: Focused on NY open liquidity surge
- **Quantitative Filtering**: Exact tick measurement + volatility thresholds
- **Clean Visuals**: No chart clutter - only marks qualifying candles
- **Adaptable**: Works across all markets and timeframes
This system helps traders spot high-probability breakout setups by combining volatility anticipation with precise range measurement at the market's most liquid opening window.
Digit Sum Mark (3/6/9 + Price ~33 ±15)This indicator highlights the price bars where the digit sum of high or low equals 3, 6, or 9, and the closing price is within a specific range (around ₹33 ±15, i.e., mod 100 ∈ ).
✨ Key Features:
Calculates digit sum of high and low values.
Adds +1 if the decimal portion > 0.50 (smart rounding logic).
Only activates when close price mod 100 is between 18 to 48, a zone inspired by the resonance around 33.
Marks the chart with green downward arrows (for high) and red upward arrows (for low) when digit sum = 3, 6, or 9.
📌 Inspired by Gann numerology and price vibration logic – especially the powerful influence of 3, 6, and 9 as noted by Nikola Tesla.
🚨 Best used on intraday or positional charts where price oscillates frequently around round figures.
🧠 Try pairing this with support/resistance tools for better accuracy!
Contrarian Market Structure BreakMarket Structure Break application was inspired and adapted from Market Structure Oscillator indicator developed by Lux Algo. So much credit to their work.
This indicator pairs nicely with the Contrarian 100 MA and can be located here:
Indicator Description: Contrarian Market Structure BreakOverview
The "Contrarian Market Structure Break" indicator is a versatile tool tailored for traders seeking to identify potential reversal opportunities by analyzing market structure across multiple timeframes. Built on Institutional Concepts of Structure (ICT), this indicator detects Break of Structure (BOS) and Change of Character (CHoCH) patterns across short-term, intermediate-term, and long-term swings, plotting them with customizable lines and labels. It generates contrarian buy and sell signals when price breaks key swing levels, with a unique "Blue Dot Tracker" to monitor consecutive buy signals for trend confirmation. Optimized for the daily timeframe, this indicator is adaptable to other timeframes with proper testing, making it ideal for traders of forex, stocks, or cryptocurrencies.
How It Works
The indicator combines three key components to provide a comprehensive view of market dynamics: Multi-Timeframe Market Structure Analysis: It identifies swing highs and lows across short-term, intermediate-term, and long-term periods, plotting BOS (continuation) and CHoCH (reversal) events with customizable line styles and labels.
Contrarian Signal Generation: Buy and sell signals are triggered when the price crosses below swing lows (buy) or above swing highs (sell), indicating potential reversals in overextended markets.
Blue Dot Tracker: A unique feature that counts consecutive buy signals ("blue dots") and highlights a "Hold Investment" state with a yellow background when three or more buy signals occur, suggesting a potential trend continuation.
Signals are visualized as small circles below (buy) or above (sell) price bars, and a table in the bottom-right corner displays the blue dot count and recommended action (Hold or Flip Investment), enhancing decision-making clarity.
Mathematical Concepts Swing Detection: The indicator identifies swing highs and lows by comparing price patterns over three bars, ensuring robust detection of pivot points. A swing high occurs when the middle bar’s high is higher than the surrounding bars, and a swing low occurs when the middle bar’s low is lower.
Market Structure Logic: BOS is detected when the price breaks a prior swing high (bullish) or low (bearish) in the direction of the current trend, while CHoCH signals a potential reversal when the price breaks a swing level against the trend. These are calculated across three timeframes for a multi-dimensional perspective.
Blue Dot Tracker: This feature counts consecutive buy signals and tracks the entry price. If three or more buy signals occur without a sell signal, the indicator enters a "Hold Investment" state, marked by a yellow background, until the price exceeds the entry price or a sell signal occurs.
Entry and Exit Rules Buy Signal (Blue Dot Below Bar): Triggered when the closing price crosses below a swing low on either the intermediate-term or long-term timeframe, suggesting an oversold condition and potential reversal upward. Short-term signals can be enabled but are disabled by default to reduce noise.
Sell Signal (White Dot Above Bar): Triggered when the closing price crosses above a swing high on either the intermediate-term or long-term timeframe, indicating an overbought condition and potential reversal downward.
Blue Dot Tracker Logic: After a buy signal, the indicator increments a blue dot counter and records the entry price. If three or more consecutive buy signals occur (blueDotCount ≥ 3), the indicator enters a "Hold Investment" state, highlighted with a yellow background, suggesting a potential trend continuation. The "Hold Investment" state ends when the price exceeds the entry price or a sell signal occurs, resetting the counter.
Exit Rules: Traders can exit buy positions when a sell signal appears, the price exceeds the entry price during a "Hold Investment" state, or based on additional confirmation from BOS/CHoCH patterns or other technical analysis tools. Always use proper risk management.
Recommended Usage
The indicator is optimized for the daily timeframe, where it effectively captures significant reversal and continuation patterns in trending or ranging markets. It can be adapted to other timeframes (e.g., 1H, 4H, 15M) with careful testing of settings, particularly enabling/disabling short-term structure analysis to suit market conditions. Backtesting is recommended to optimize performance for your chosen asset and timeframe.
Customization Options Market Structure Display: Toggle short-term, intermediate-term, and long-term structures on or off, with customizable line styles (solid, dashed, dotted) and colors for bullish and bearish breaks.
Labels: Enable or disable BOS/CHoCH labels for each timeframe to reduce chart clutter.
Signal Visibility: Hide buy/sell signals if desired for a cleaner chart.
Blue Dot Tracker: Monitor the blue dot count and action (Hold or Flip Investment) via the table display, which is fully customizable in terms of position and appearance.
Why Use This Indicator?
The "Contrarian Market Structure Break" indicator offers a robust framework for identifying high-probability reversal and continuation setups using ICT principles. Its multi-timeframe analysis, clear signal visualization, and innovative Blue Dot Tracker provide traders with actionable insights into market dynamics. Whether you're a swing trader or a day trader, this indicator’s flexibility and intuitive design make it a valuable addition to your trading arsenal.
Note for TradingView Moderators
This script complies with TradingView's House Rules by providing an educational and transparent description without performance claims or guarantees. It is designed to assist traders in technical analysis and should be used alongside proper risk management and personal research. The code is original, well-documented, and includes customizable inputs and clear visual outputs to enhance the user experience.
Tips for Users:
Backtest thoroughly on your chosen asset and timeframe to validate signal reliability. Combine with other indicators or price action analysis for confirmation of entries and exits. Adjust timeframe settings and enable/disable short-term structures to match market volatility and your trading style.
Hope the "Contrarian Market Structure Break" indicator enhances your trading strategy and helps you navigate the markets with confidence! Happy trading!
Normalized Fibonacci Retracement (MTF/LOG)A question: Instead of creating indicators that constantly plot Fibonacci Retracement levels in a visually overwhelming way, why don't we redefine them on a different scale? 🤨
Overview
The Normalized Fibonacci Retracement indicator converts price data to a 0-100 scale based on the selected timeframe's high-low range, displaying normalized candlesticks alongside standard Fibonacci levels (23.6%, 38.2%, 50%, 61.8%, 78.6%). This normalization reveals patterns that may be hidden in absolute price charts and allows consistent analysis across different instruments.
Originality
By normalizing prices to percentages, this indicator enables pattern recognition independent of absolute price levels. The same formation at $10-$20 and $1000-$2000 appears identical on the normalized scale, helping traders identify recurring structures across various assets and timeframes.
Concepts
The indicator uses a simple formula to transform price data into percentages. This creates a bounded scale where patterns become comparable regardless of the underlying asset's price range. The normalized view often reveals symmetries and relationships not visible in traditional price charts.
Mechanics
The system tracks highs and lows within the selected timeframe as anchor points. When a new period begins, fresh boundaries are established and prices recalculated. Trend direction is determined by timing of extremes. Linear scaling uses direct percentage calculation, while logarithmic scaling applies exponential interpolation for assets with large percentage moves.
Functions
Timeframe Selection: Higher timeframe analysis on any chart resolution
Normalized Display: OHLC data converted to 0-100 percentage scale
Fibonacci Levels: Standard retracement levels plotted automatically
Scaling Options: Linear or logarithmic calculation methods
Pattern Recognition: Reveals formations hidden in absolute price charts
Moving Average: Optional 20-period SMA overlay
Notes
Ensure chart data covers the full selected timeframe for accurate calculations. Use logarithmic scaling for volatile assets with large percentage moves. The normalized scale is effective at revealing patterns and structures that remain consistent across different price ranges, making it particularly useful for comparative analysis and pattern-based trading strategies.
I hope it helps everyone. Do not forget to manage your risk. And trade as safely as possible. Best of luck!
VoVix DEVMA🌌 VoVix DEVMA: A Deep Dive into Second-Order Volatility Dynamics
Welcome to VoVix+, a sophisticated trading framework that transcends traditional price analysis. This is not merely another indicator; it is a complete system designed to dissect and interpret the very fabric of market volatility. VoVix+ operates on the principle that the most powerful signals are not found in price alone, but in the behavior of volatility itself. It analyzes the rate of change, the momentum, and the structure of market volatility to identify periods of expansion and contraction, providing a unique edge in anticipating major market moves.
This document will serve as your comprehensive guide, breaking down every mathematical component, every user input, and every visual element to empower you with a profound understanding of how to harness its capabilities.
🔬 THEORETICAL FOUNDATION: THE MATHEMATICS OF MARKET DYNAMICS
VoVix+ is built upon a multi-layered mathematical engine designed to measure what we call "second-order volatility." While standard indicators analyze price, and first-order volatility indicators (like ATR) analyze the range of price, VoVix+ analyzes the dynamics of the volatility itself. This provides insight into the market's underlying state of stability or chaos.
1. The VoVix Score: Measuring Volatility Thrust
The core of the system begins with the VoVix Score. This is a normalized measure of volatility acceleration or deceleration.
Mathematical Formula:
VoVix Score = (ATR(fast) - ATR(slow)) / (StDev(ATR(fast)) + ε)
Where:
ATR(fast) is the Average True Range over a short period, representing current, immediate volatility.
ATR(slow) is the Average True Range over a longer period, representing the baseline or established volatility.
StDev(ATR(fast)) is the Standard Deviation of the fast ATR, which measures the "noisiness" or consistency of recent volatility.
ε (epsilon) is a very small number to prevent division by zero.
Market Implementation:
Positive Score (Expansion): When the fast ATR is significantly higher than the slow ATR, it indicates a rapid increase in volatility. The market is "stretching" or expanding.
Negative Score (Contraction): When the fast ATR falls below the slow ATR, it indicates a decrease in volatility. The market is "coiling" or contracting.
Normalization: By dividing by the standard deviation, we normalize the score. This turns it into a standardized measure, allowing us to compare volatility thrust across different market conditions and timeframes. A score of 2.0 in a quiet market means the same, relatively, as a score of 2.0 in a volatile market.
2. Deviation Analysis (DEV): Gauging Volatility's Own Volatility
The script then takes the analysis a step further. It calculates the standard deviation of the VoVix Score itself.
Mathematical Formula:
DEV = StDev(VoVix Score, lookback_period)
Market Implementation:
This DEV value represents the magnitude of chaos or stability in the market's volatility dynamics. A high DEV value means the volatility thrust is erratic and unpredictable. A low DEV value suggests the change in volatility is smooth and directional.
3. The DEVMA Crossover: Identifying Regime Shifts
This is the primary signal generator. We take two moving averages of the DEV value.
Mathematical Formula:
fastDEVMA = SMA(DEV, fast_period)
slowDEVMA = SMA(DEV, slow_period)
The Core Signal:
The strategy triggers on the crossover and crossunder of these two DEVMA lines. This is a profound concept: we are not looking at a moving average of price or even of volatility, but a moving average of the standard deviation of the normalized rate of change of volatility.
Bullish Crossover (fastDEVMA > slowDEVMA): This signals that the short-term measure of volatility's chaos is increasing relative to the long-term measure. This often precedes a significant market expansion and is interpreted as a bullish volatility regime.
Bearish Crossunder (fastDEVMA < slowDEVMA): This signals that the short-term measure of volatility's chaos is decreasing. The market is settling down or contracting, often leading to trending moves or range consolidation.
⚙️ INPUTS MENU: CONFIGURING YOUR ANALYSIS ENGINE
Every input has been meticulously designed to give you full control over the strategy's behavior. Understanding these settings is key to adapting VoVix+ to your specific instrument, timeframe, and trading style.
🌀 VoVix DEVMA Configuration
🧬 Deviation Lookback: This sets the lookback period for calculating the DEV value. It defines the window for measuring the stability of the VoVix Score. A shorter value makes the system highly reactive to recent changes in volatility's character, ideal for scalping. A longer value provides a smoother, more stable reading, better for identifying major, long-term regime shifts.
⚡ Fast VoVix Length: This is the lookback period for the fastDEVMA. It represents the short-term trend of volatility's chaos. A smaller number will result in a faster, more sensitive signal line that reacts quickly to market shifts.
🐌 Slow VoVix Length: This is the lookback period for the slowDEVMA. It represents the long-term, baseline trend of volatility's chaos. A larger number creates a more stable, slower-moving anchor against which the fast line is compared.
How to Optimize: The relationship between the Fast and Slow lengths is crucial. A wider gap (e.g., 20 and 60) will result in fewer, but potentially more significant, signals. A narrower gap (e.g., 25 and 40) will generate more frequent signals, suitable for more active trading styles.
🧠 Adaptive Intelligence
🧠 Enable Adaptive Features: When enabled, this activates the strategy's performance tracking module. The script will analyze the outcome of its last 50 trades to calculate a dynamic win rate.
⏰ Adaptive Time-Based Exit: If Enable Adaptive Features is on, this allows the strategy to adjust its Maximum Bars in Trade setting based on performance. It learns from the average duration of winning trades. If winning trades tend to be short, it may shorten the time exit to lock in profits. If winners tend to run, it will extend the time exit, allowing trades more room to develop. This helps prevent the strategy from cutting winning trades short or holding losing trades for too long.
⚡ Intelligent Execution
📊 Trade Quantity: A straightforward input that defines the number of contracts or shares for each trade. This is a fixed value for consistent position sizing.
🛡️ Smart Stop Loss: Enables the dynamic stop-loss mechanism.
🎯 Stop Loss ATR Multiplier: Determines the distance of the stop loss from the entry price, calculated as a multiple of the current 14-period ATR. A higher multiplier gives the trade more room to breathe but increases risk per trade. A lower multiplier creates a tighter stop, reducing risk but increasing the chance of being stopped out by normal market noise.
💰 Take Profit ATR Multiplier: Sets the take profit target, also as a multiple of the ATR. A common practice is to set this higher than the Stop Loss multiplier (e.g., a 2:1 or 3:1 reward-to-risk ratio).
🏃 Use Trailing Stop: This is a powerful feature for trend-following. When enabled, instead of a fixed stop loss, the stop will trail behind the price as the trade moves into profit, helping to lock in gains while letting winners run.
🎯 Trail Points & 📏 Trail Offset ATR Multipliers: These control the trailing stop's behavior. Trail Points defines how much profit is needed before the trail activates. Trail Offset defines how far the stop will trail behind the current price. Both are based on ATR, making them fully adaptive to market volatility.
⏰ Maximum Bars in Trade: This is a time-based stop. It forces an exit if a trade has been open for a specified number of bars, preventing positions from being held indefinitely in stagnant markets.
⏰ Session Management
These inputs allow you to confine the strategy's trading activity to specific market hours, which is crucial for day trading instruments that have defined high-volume sessions (e.g., stock market open).
🎨 Visual Effects & Dashboard
These toggles give you complete control over the on-chart visuals and the dashboard. You can disable any element to declutter your chart or focus only on the information that matters most to you.
📊 THE DASHBOARD: YOUR AT-A-GLANCE COMMAND CENTER
The dashboard centralizes all critical information into one compact, easy-to-read panel. It provides a real-time summary of the market state and strategy performance.
🎯 VOVIX ANALYSIS
Fast & Slow: Displays the current numerical values of the fastDEVMA and slowDEVMA. The color indicates their direction: green for rising, red for falling. This lets you see the underlying momentum of each line.
Regime: This is your most important environmental cue. It tells you the market's current state based on the DEVMA relationship. 🚀 EXPANSION (Green) signifies a bullish volatility regime where explosive moves are more likely. ⚛️ CONTRACTION (Purple) signifies a bearish volatility regime, where the market may be consolidating or entering a smoother trend.
Quality: Measures the strength of the last signal based on the magnitude of the DEVMA difference. An ELITE or STRONG signal indicates a high-conviction setup where the crossover had significant force.
PERFORMANCE
Win Rate & Trades: Displays the historical win rate of the strategy from the backtest, along with the total number of closed trades. This provides immediate feedback on the strategy's historical effectiveness on the current chart.
EXECUTION
Trade Qty: Shows your configured position size per trade.
Session: Indicates whether trading is currently OPEN (allowed) or CLOSED based on your session management settings.
POSITION
Position & PnL: Displays your current position (LONG, SHORT, or FLAT) and the real-time Profit or Loss of the open trade.
🧠 ADAPTIVE STATUS
Stop/Profit Mult: In this simplified version, these are placeholders. The primary adaptive feature currently modifies the time-based exit, which is reflected in how long trades are held on the chart.
🎨 THE VISUAL UNIVERSE: DECIPHERING MARKET GEOMETRY
The visuals are not mere decorations; they are geometric representations of the underlying mathematical concepts, designed to give you an intuitive feel for the market's state.
The Core Lines:
FastDEVMA (Green/Maroon Line): The primary signal line. Green when rising, indicating an increase in short-term volatility chaos. Maroon when falling.
SlowDEVMA (Aqua/Orange Line): The baseline. Aqua when rising, indicating a long-term increase in volatility chaos. Orange when falling.
🌊 Morphism Flow (Flowing Lines with Circles):
What it represents: This visualizes the momentum and strength of the fastDEVMA. The width and intensity of the "beam" are proportional to the signal strength.
Interpretation: A thick, steep, and vibrant flow indicates powerful, committed momentum in the current volatility regime. The floating '●' particles represent kinetic energy; more particles suggest stronger underlying force.
📐 Homotopy Paths (Layered Transparent Boxes):
What it represents: These layered boxes are centered between the two DEVMA lines. Their height is determined by the DEV value.
Interpretation: This visualizes the overall "volatility of volatility." Wider boxes indicate a chaotic, unpredictable market. Narrower boxes suggest a more stable, predictable environment.
🧠 Consciousness Field (The Grid):
What it represents: This grid provides a historical lookback at the DEV range.
Interpretation: It maps the recent "consciousness" or character of the market's volatility. A consistently wide grid suggests a prolonged period of chaos, while a narrowing grid can signal a transition to a more stable state.
📏 Functorial Levels (Projected Horizontal Lines):
What it represents: These lines extend from the current fastDEVMA and slowDEVMA values into the future.
Interpretation: Think of these as dynamic support and resistance levels for the volatility structure itself. A crossover becomes more significant if it breaks cleanly through a prior established level.
🌊 Flow Boxes (Spaced Out Boxes):
What it represents: These are compact visual footprints of the current regime, colored green for Expansion and red for Contraction.
Interpretation: They provide a quick, at-a-glance confirmation of the dominant volatility flow, reinforcing the background color.
Background Color:
This provides an immediate, unmistakable indication of the current volatility regime. Light Green for Expansion and Light Aqua/Blue for Contraction, allowing you to assess the market environment in a split second.
📊 BACKTESTING PERFORMANCE REVIEW & ANALYSIS
The following is a factual, transparent review of a backtest conducted using the strategy's default settings on a specific instrument and timeframe. This information is presented for educational purposes to demonstrate how the strategy's mechanics performed over a historical period. It is crucial to understand that these results are historical, apply only to the specific conditions of this test, and are not a guarantee or promise of future performance. Market conditions are dynamic and constantly change.
Test Parameters & Conditions
To ensure the backtest reflects a degree of real-world conditions, the following parameters were used. The goal is to provide a transparent baseline, not an over-optimized or unrealistic scenario.
Instrument: CME E-mini Nasdaq 100 Futures (NQ1!)
Timeframe: 5-Minute Chart
Backtesting Range: March 24, 2024, to July 09, 2024
Initial Capital: $100,000
Commission: $0.62 per contract (A realistic cost for futures trading).
Slippage: 3 ticks per trade (A conservative setting to account for potential price discrepancies between order placement and execution).
Trade Size: 1 contract per trade.
Performance Overview (Historical Data)
The test period generated 465 total trades , providing a statistically significant sample size for analysis, which is well above the recommended minimum of 100 trades for a strategy evaluation.
Profit Factor: The historical Profit Factor was 2.663 . This metric represents the gross profit divided by the gross loss. In this test, it indicates that for every dollar lost, $2.663 was gained.
Percent Profitable: Across all 465 trades, the strategy had a historical win rate of 84.09% . While a high figure, this is a historical artifact of this specific data set and settings, and should not be the sole basis for future expectations.
Risk & Trade Characteristics
Beyond the headline numbers, the following metrics provide deeper insight into the strategy's historical behavior.
Sortino Ratio (Downside Risk): The Sortino Ratio was 6.828 . Unlike the Sharpe Ratio, this metric only measures the volatility of negative returns. A higher value, such as this one, suggests that during this test period, the strategy was highly efficient at managing downside volatility and large losing trades relative to the profits it generated.
Average Trade Duration: A critical characteristic to understand is the strategy's holding period. With an average of only 2 bars per trade , this configuration operates as a very short-term, or scalping-style, system. Winning trades averaged 2 bars, while losing trades averaged 4 bars. This indicates the strategy's logic is designed to capture quick, high-probability moves and exit rapidly, either at a profit target or a stop loss.
Conclusion and Final Disclaimer
This backtest demonstrates one specific application of the VoVix+ framework. It highlights the strategy's behavior as a short-term system that, in this historical test on NQ1!, exhibited a high win rate and effective management of downside risk. Users are strongly encouraged to conduct their own backtests on different instruments, timeframes, and date ranges to understand how the strategy adapts to varying market structures. Past performance is not indicative of future results, and all trading involves significant risk.
🔧 THE DEVELOPMENT PHILOSOPHY: FROM VOLATILITY TO CLARITY
The journey to create VoVix+ began with a simple question: "What drives major market moves?" The answer is often not a change in price direction, but a fundamental shift in market volatility. Standard indicators are reactive to price. We wanted to create a system that was predictive of market state. VoVix+ was designed to go one level deeper—to analyze the behavior, character, and momentum of volatility itself.
The challenge was twofold. First, to create a robust mathematical model to quantify these abstract concepts. This led to the multi-layered analysis of ATR differentials and standard deviations. Second, to make this complex data intuitive and actionable. This drove the creation of the "Visual Universe," where abstract mathematical values are translated into geometric shapes, flows, and fields. The adaptive system was intentionally kept simple and transparent, focusing on a single, impactful parameter (time-based exits) to provide performance feedback without becoming an inscrutable "black box." The result is a tool that is both profoundly deep in its analysis and remarkably clear in its presentation.
⚠️ RISK DISCLAIMER AND BEST PRACTICES
VoVix+ is an advanced analytical tool, not a guarantee of future profits. All financial markets carry inherent risk. The backtesting results shown by the strategy are historical and do not guarantee future performance. This strategy incorporates realistic commission and slippage settings by default, but market conditions can vary. Always practice sound risk management, use position sizes appropriate for your account equity, and never risk more than you can afford to lose. It is recommended to use this strategy as part of a comprehensive trading plan. This was developed specifically for Futures
"The prevailing wisdom is that markets are always right. I take the opposite view. I assume that markets are always wrong. Even if my assumption is occasionally wrong, I use it as a working hypothesis."
— George Soros
— Dskyz, Trade with insight. Trade with anticipation.
EdgeXplorer - Momentum EngineMomentum Engine by EdgeXplorer
Momentum Engine is a precision-driven oscillator and trend framework engineered to track market momentum with adaptive clarity. Unlike traditional momentum indicators, this engine blends ATR-based envelope logic, multi-mode oscillator scaling, and real-time directional overlays—all in one responsive system.
Designed for intraday traders and swing strategists alike, Momentum Engine offers a streamlined way to visualize momentum direction, impulse strength, and volatility-adaptive trend zones—with minimal noise and maximum context.
⸻
🔍 What Does Momentum Engine Do?
Momentum Engine visualizes market energy through a volatility-aware oscillator and accompanying trend overlays. It adapts dynamically to price behavior and enables traders to:
• Detect momentum waves with real-time visual cues
• Confirm directional bias using trend overlays and impulse zones
• Switch between Regular and Normalized oscillator modes
• See heatmap-based signal confirmation for crossovers
• View optional info panels, labels, and trend bar colors for clarity
It’s a compact yet powerful system built for discretionary and systematic use.
⸻
⚙️ How It Works – Technical Breakdown
1. Trend Envelope Logic
At its core, Momentum Engine constructs a price envelope using:
• The average of the highest closes and highs (Baseline Length)
• The average of the lowest closes and lows
• A multiplied ATR to scale the distance between upper and lower bounds
These bounds determine trend bias:
• Price above the short side of the channel → Bullish
• Price below the long side → Bearish
• In-between → Neutral
A dynamic midline tracks the central channel axis.
2. Oscillator Wave Calculation
The momentum oscillator reacts to price positioning relative to the envelope:
• In Regular Mode, it shows raw price deviation from the trend channel
• In Normalized Mode, it maps price movement into a 0–100 scale with historical scaling logic
Both modes use smoothing (Smoothing) to reduce noise.
3. Overlay Channel (Optional)
• Displays trend floors (bull) and ceilings (bear) on the price chart
• Color-coded trend shifts appear as pulse circles
• Optionally, bars themselves can be recolored for instant trend recognition
4. Heatmap Signal Zones
The background dynamically changes based on oscillator crossovers:
• Bullish signal → Yellow heatmap
• Bearish signal → Blue heatmap
These zones signal momentum ignition, especially helpful for early entries.
⸻
📈 What You See on the Chart
Element Meaning
Green Momentum Wave Bullish pressure (oscillator > midline or >50)
Red Momentum Wave Bearish pressure (oscillator < midline or <50)
Zero Line Base reference in Regular mode
Gray Guide Lines (Normalized) Bands for Overbought (85), Oversold (15), and Neutral (33–50)
Channel Lines Trend bias boundaries (bull/bear zones)
Pulse Marker (Circle) Trend direction change
Bar Colors (Optional) Bull or bear bar overlays for added clarity
Background Heatmap Bullish or bearish impulse confirmation
Info Table (Optional) Real-time trend and oscillator data panel
Debug Labels (Optional) Inline oscillator readings per bar
⸻
📊 Inputs & Settings
Engine Settings
Input Description
Timeframe Optional custom timeframe override
Baseline Length Determines envelope size (larger = smoother trend)
Multiplier Factor Controls ATR-based range expansion
Momentum Wave Settings
Input Description
Mode Regular = raw wave, Normalized = 0–100 scaling
Bull/Bear Colors Wave color customization
Line Width & Smoothing Visual clarity adjustments
Overlay Channel
Input Description
Show Overlay Toggle trend ceilings/floors on chart
Channel Colors Separate bull/bear lines
Trend Bar Color Recolors candle bodies based on trend bias
Signal Heatmap
Input Description
Enable Heatmap Background impulse shading toggle
Bull / Bear Colors Adjust visual tone of crossover zones
Add-ons
Input Description
Show Debug Labels View oscillator values at each bar
Show Info Panel Display current trend, oscillator value, and mode
⸻
🧠 How to Use Momentum Engine
Regular Mode
• Oscillator above 0 = Bullish bias
• Oscillator below 0 = Bearish bias
• Use zero line as your confirmation threshold
Normalized Mode
• 85 → Overbought / exhaustion
• <15 → Oversold / reversal watch
• Crossing 50 → Momentum ignition
• 33–50 → Neutral zone / ranging phase
Visual Interpretation Tips
• Green wave + yellow heatmap = Bull momentum confirmation
• Red wave + blue heatmap = Bear momentum confirmation
• Pulse marker = New trend — evaluate strength with wave slope
• Trend bar coloring = Scan trend alignment at a glance
⸻
🧪 Use Cases & Strategy Ideas
• ⚡ Scalping Impulse Moves
Use oscillator + heatmap crossover to catch directional bursts
• 🔁 Pullback Continuation
Wait for momentum to reset near neutral zone, then re-enter trend
• 📉 Reversal Triggers
Look for divergence or Normalized wave flipping at extremes
• 🎯 Multi-timeframe Confirmation
Set custom timeframe and layer on top of a higher or lower TF structure
Multy Dynamic POCThis script displays up to 4 independent Point of Control (POC) levels based on volume profile logic.
📌 Each POC can be configured individually:
Period options: Daily (D), Weekly (W), Monthly (M), or BARS (rolling bar window).
Dynamic recalculation when the period changes (e.g., new day/week/month or custom bar count).
Price-anchored lines for each POC level that scale correctly with the chart.
Customizable line color and thickness.
🔍 How it works:
For each active POC line, the script builds a simple volume distribution based on the candle’s average price (hl2) and volume.
The price range is split into 100 buckets. The one with the highest accumulated volume is selected as the Point of Control (POC).
In BARS mode, POC is recalculated every N bars. In D/W/M modes, it resets exactly at the beginning of a new period (according to TradingView’s time() function).
✅ Useful for:
Traders applying volume profile analysis without needing the full built-in volume profile tool.
Spotting dynamic high-volume zones in trends or ranges.
Strategy development or confirmation around high-interest price levels.
_______________________________________________________________________________
Данный индикатор отображает до 4 независимых уровней Point of Control (POC), рассчитанных по объёмам.
📌 Каждый POC можно настраивать отдельно:
Периоды: День (D), Неделя (W), Месяц (M) или BARS (скользящее окно по количеству баров).
Автоматический пересчёт при смене периода (например, новый день, неделя или месяц).
Линии POC привязаны к цене и масштабируются вместе с графиком.
Настраиваемый цвет и толщина линий.
🔍 Как работает:
Для каждой активной линии POC создаётся объёмное распределение: берется средняя цена свечи (hl2) и объем.
Диапазон цен делится на 100 уровней. Тот, где накоплено больше всего объёма, и есть POC.
В режиме BARS уровень пересчитывается каждые N баров. В режимах D/W/M — строго в начале нового периода.
✅ Подходит для:
Трейдеров, использующих объёмный анализ, но не имеющих платной подписки на Volume Profile.
Поиска уровней интереса и подтверждения сигналов.
Разработки стратегий с опорой на объём.
Position Size Calculator with Fees# Position Size Calculator with Portfolio Management - Manual
## Overview
The Position Size Calculator with Portfolio Management is an advanced Pine Script indicator designed to help traders calculate optimal position sizes based on their total portfolio value and risk management strategy. This tool automatically calculates your risk amount based on portfolio allocation percentages and determines the exact position size needed while accounting for trading fees.
## Key Features
- **Portfolio-Based Risk Management**: Calculates risk based on total portfolio value
- **Tiered Risk Allocation**: Separates trading allocation from total portfolio
- **Automatic Trade Direction Detection**: Determines long/short based on entry vs stop loss
- **Fee Integration**: Accounts for trading fees in position size calculations
- **Risk Factor Adjustment**: Allows scaling of position size up or down
- **Visual Display**: Shows all calculations in a clear, color-coded table
- **Automatic Risk Calculation**: No need to manually input risk amount
## Input Parameters
### Total Portfolio ($)
- **Purpose**: The total value of your investment portfolio
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
- **Example**: If your total portfolio is worth $100,000, enter 100000
### Trading Portfolio Allocation (%)
- **Purpose**: The percentage of your total portfolio allocated to active trading
- **Default**: 20.0%
- **Range**: 0.0% to 100.0%
- **Step**: 0.01
- **Example**: If you allocate 20% of your portfolio to trading, enter 20
### Risk from Trading (%)
- **Purpose**: The percentage of your trading allocation you're willing to risk per trade
- **Default**: 0.1%
- **Range**: Any positive value
- **Step**: 0.01
- **Example**: If you risk 0.1% of your trading allocation per trade, enter 0.1
### Entry Price ($)
- **Purpose**: The price at which you plan to enter the trade
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Stop Loss ($)
- **Purpose**: The price at which you will exit if the trade goes against you
- **Default**: 0.0
- **Range**: Any positive value
- **Step**: 0.01
### Risk Factor
- **Purpose**: A multiplier to scale your position size up or down
- **Default**: 1.0 (no scaling)
- **Range**: 0.0 to 10.0
- **Step**: 0.1
- **Examples**:
- 1.0 = Normal position size
- 2.0 = Double the position size
- 0.5 = Half the position size
### Fee (%)
- **Purpose**: The percentage fee charged per transaction
- **Default**: 0.01% (0.01)
- **Range**: 0.0% to 1.0%
- **Step**: 0.001
## How Risk Amount is Calculated
The script automatically calculates your risk amount using this formula:
```
Risk Amount = Total Portfolio × Trading Allocation (%) × Risk % ÷ 10,000
```
### Example Calculation:
- Total Portfolio: $100,000
- Trading Allocation: 20%
- Risk per Trade: 0.1%
**Risk Amount = $100,000 × 20 × 0.1 ÷ 10,000 = $20**
This means you would risk $20 per trade, which is 0.1% of your $20,000 trading allocation.
## Portfolio Structure Example
Let's say you have a $100,000 portfolio:
### Allocation Structure:
- **Total Portfolio**: $100,000
- **Trading Allocation (20%)**: $20,000
- **Long-term Investments (80%)**: $80,000
### Risk Management:
- **Risk per Trade (0.1% of trading)**: $20
- **Maximum trades at risk**: Could theoretically have 1,000 trades before risking entire trading allocation
## How Position Size is Calculated
### Trade Direction Detection
- **Long Trade**: Entry price > Stop loss price
- **Short Trade**: Entry price < Stop loss price
### Position Size Formulas
#### For Long Trades:
```
Position Size = -Risk Factor × Risk Amount / (Stop Loss × (1 - Fee) - Entry Price × (1 + Fee))
```
#### For Short Trades:
```
Position Size = -Risk Factor × Risk Amount / (Entry Price × (1 - Fee) - Stop Loss × (1 + Fee))
```
## Output Display
The indicator displays a comprehensive table with color-coded sections:
### Portfolio Information (Light Blue Background)
- **Portfolio (USD)**: Your total portfolio value
- **Trading Portfolio Allocation (%)**: Percentage allocated to trading
- **Risk as % of Trading**: Risk percentage per trade
### Trade Setup (Gray Background)
- **Entry Price**: Your specified entry price
- **Stop Loss**: Your specified stop loss price
- **Fee (%)**: Trading fee percentage
- **Risk Factor**: Position size multiplier
### Risk Analysis (Red Background)
- **Risk Amount**: Automatically calculated dollar risk
- **Effective Entry**: Actual entry cost including fees
- **Effective Exit**: Actual exit value including fees
- **Expected Loss**: Calculated loss if stop loss is hit
- **Deviation from Risk %**: Accuracy of risk calculation
### Final Result (Blue Background)
- **Position Size**: Number of shares/units to trade
## Usage Examples
### Example 1: Conservative Long Trade
- **Total Portfolio**: $50,000
- **Trading Allocation**: 15%
- **Risk per Trade**: 0.05%
- **Entry Price**: $25.00
- **Stop Loss**: $24.00
- **Risk Factor**: 1.0
- **Fee**: 0.01%
**Calculated Risk Amount**: $50,000 × 15% × 0.05% ÷ 100 = $3.75
### Example 2: Aggressive Short Trade
- **Total Portfolio**: $200,000
- **Trading Allocation**: 30%
- **Risk per Trade**: 0.2%
- **Entry Price**: $150.00
- **Stop Loss**: $155.00
- **Risk Factor**: 2.0
- **Fee**: 0.01%
**Calculated Risk Amount**: $200,000 × 30% × 0.2% ÷ 100 = $120
**Actual Risk**: $120 × 2.0 = $240 (due to risk factor)
## Color Coding System
- **Green/Red Header**: Trade direction (Long/Short)
- **Light Blue**: Portfolio management parameters
- **Gray**: Trade setup parameters
- **Red**: Risk-related calculations and results
- **Blue**: Final position size result
## Best Practices
### Portfolio Management
1. **Keep trading allocation reasonable** (typically 10-30% of total portfolio)
2. **Use conservative risk percentages** (0.05-0.2% per trade)
3. **Don't risk more than you can afford to lose**
### Risk Management
1. **Start with small risk factors** (1.0 or less) until comfortable
2. **Monitor your total exposure** across all open positions
3. **Adjust risk based on market conditions**
### Trade Execution
1. **Always validate calculations** before placing trades
2. **Account for slippage** in volatile markets
3. **Consider position size relative to liquidity**
## Risk Management Guidelines
### Conservative Approach
- Trading Allocation: 10-20%
- Risk per Trade: 0.05-0.1%
- Risk Factor: 0.5-1.0
### Moderate Approach
- Trading Allocation: 20-30%
- Risk per Trade: 0.1-0.15%
- Risk Factor: 1.0-1.5
### Aggressive Approach
- Trading Allocation: 30-40%
- Risk per Trade: 0.15-0.25%
- Risk Factor: 1.5-2.0
## Troubleshooting
### Common Issues
1. **Position Size shows 0**
- Verify all portfolio inputs are greater than 0
- Check that entry price differs from stop loss
- Ensure calculated risk amount is positive
2. **Very small position sizes**
- Increase risk percentage or risk factor
- Check if your risk amount is too small for the price difference
3. **Large risk deviation**
- Normal for very small positions
- Consider adjusting entry/stop loss levels
### Validation Checklist
- Total portfolio value is realistic
- Trading allocation percentage makes sense
- Risk percentage is conservative
- Entry and stop loss prices are valid
- Trade direction matches your intention
## Advanced Features
### Risk Factor Usage
- **Scaling up**: Use risk factors > 1.0 for high-confidence trades
- **Scaling down**: Use risk factors < 1.0 for uncertain trades
- **Never exceed**: Risk factors that would risk more than your comfort level
### Multiple Timeframe Analysis
- Use different risk factors for different timeframes
- Consider correlation between positions
- Adjust trading allocation based on market conditions
## Disclaimer
This tool is for educational and planning purposes only. Always verify calculations manually and consider market conditions, liquidity, and correlation between positions. The automated risk calculation assumes you're comfortable with the mathematical relationship between portfolio allocation and individual trade risk. Past performance doesn't guarantee future results, and all trading involves risk of loss.
WRAMA Channel (Weighted RSI ATR MA)OVERVIEW
The WRAMA Channel (Weighted RSI ATR MA) is an advanced technical analysis tool designed to react more quickly to price movements compared to indicators using conventional moving averages. It combines the Relative Strength Index (RSI), Average True Range (ATR), and a weighted moving average, resulting in the WRAMA. This indicator forms a dynamic price channel based on a weighted average that incorporates both trend strength (via RSI) and market volatility (via ATR). It helps traders identify trends, potential reversals, and breakout signals, while offering broad customization options.
Key Features
WRAMA Price Channel:
Generates a dynamic channel around the weighted moving average (WRAMA), adapting to market volatility and momentum, similar to Bollinger Bands. Users are encouraged to adjust channel width and length according to their strategy.
The upper and lower channel bands are calculated based on a percentage deviation from the baseline line.
The channel fill color changes depending on the price's position relative to the baseline (green above, red below), with an optional gradient for better visualization.
Weighted Moving Average (WRAMA):
WRAMA is a custom weighted moving average (MA1), where closing prices are weighted based on RSI and ATR, allowing it to dynamically adapt to market conditions.
Baseline: The WRAMA line calculated over a user-defined period.
WRAMA Calculation:
RSI Weight: Based on RSI value. When RSI is in extreme zones (below the lower threshold or above the upper threshold), an extreme weight is applied. Otherwise, the weight is based on the squared RSI value divided by 100, raised to a power defined by the rsi_weight_factor.
ATR Weight: Based on the ATR-to-average-ATR ratio. If ATR exceeds a threshold (atr_threshold × avg_atr), an extreme weight is applied. Otherwise, the weight is based on the squared ratio of ATR to average ATR, raised to the power of the atr_weight_factor.
Combined Weight: RSI and ATR weights are combined using a rsi_atr_balance parameter. Final weight = RSI weight × balance + ATR weight × (1 - balance).
WRAMA Calculation: The closing price is multiplied by the combined weight. The result is averaged over the ma_length period and divided by the average of the weights, forming the WRAMA line. For current WRAMA (ma_length = 1), the calculation simplifies to a single weighted price.
Additional Moving Averages:
For additional confirmations, the indicator supports up to five moving averages (MA1–MA5) with various types (SMA, EMA, WMA, HMA, ALMA) and customizable periods.
All additional MAs are calculated based on WRAMA or its baseline, ensuring consistency and enabling deeper analysis within a unified methodology. MA trend directions can be tracked in a built-in signal table.
Trading Signals:
Breakout Signals: Breakouts above/below the channel are optionally marked with triangle shapes (green for bullish, red for bearish).
MA Signals: Price position relative to MAs or their slope generates bullish/bearish signals. These are optionally visualized with default triangles (green up, red down).
A signal table in the top-right corner summarizes the status of each moving average – bullish, bearish, or neutral.
Customization Options
Channel Settings:
MA Period: Length of the WRAMA baseline (default: 100).
Channel Deviation : Percentage offset from the baseline for upper/lower bands (default: 1.5%).
RSI Settings:
RSI Period: Length of the RSI calculation (default: 14).
RSI Upper/Lower Threshold: Overbought/oversold levels (default: 70/30).
RSI Weight Factor: Influence of RSI on weighting (default: 2.0).
ATR Settings:
ATR Period: ATR calculation length (default: 14).
ATR Threshold: Volatility threshold as a multiple of average ATR (default: 1.5).
ATR Weight Factor: Influence of ATR on weighting (default: 2.0).
RSI & ATR Combined:
Extreme Weight: Weight applied in extreme RSI/ATR conditions (default: 3.0).
RSI/ATR Balance: Balance between RSI and ATR influence (default: 0.5).
Signal Settings:
Show Breakout Signals: Enable/disable breakout triangles.
Show MA Signals: Enable/disable MA-based signals.
MA Signal Source: Choose between current WRAMA or baseline.
MA Signal Analysis: Based on price position or slope.
Neutral Threshold : Minimum distance from MA for signal neutrality (default: 0.5%).
Minimum MA Slope : Minimum slope for trend direction signals (default: 0.01%).
Moving Averages (MA1–MA5):
Options to enable/disable, select type (SMA, EMA, WMA, HMA, ALMA), set period length, and choose color.
Style Settings:
Gradient Fill: Enable/disable gradient coloring within the channel.
Show Baseline: Enable/disable WRAMA baseline visibility.
Colors: Customize line, fill, and signal colors.
Use Cases
Trend Identification: The WRAMA channel highlights trend direction and potential reversal zones when price contacts the channel edges.
Breakout Signals: Channel breakouts may indicate trend shifts or momentum surges.
MA Analysis: The signal table provides a clear summary of market direction (bullish, bearish, or neutral) based on selected moving averages.
Trading Strategies: Suitable for trend-following, mean-reversion, and scalping strategies, depending on user preferences and settings.
Notes
The indicator offers a high degree of flexibility, making it adaptable to various trading styles, instruments, and timeframes.
It is recommended to adjust channel length and width to fit your trading strategy.
Backtesting settings on historical data is advised to optimize parameters for a specific strategy and market.
EMAs 60/125/250 + Swing-Struktur + CCI-AlertsEMAs 60/125/250 + Swing-Points + CCI-Alerts / crossover 100 /-100