Advanced Larry Williams 9.2- By EduHit rate greater than Setup 9.1
However, the stop of this setup becomes more expensive in certain situations.
PURCHASE SIGN
1 - Paper comes in a bullish trend in the operational term to be operated.
2 - Exponential moving average of 9 upward periods.
3 - Wait for a candle to make the largest closing (candle reference).
4 - If the next candle CLOSES below the minimum of the candle reference the setup is armed.
5 - Mark the candle maxim that closed below the reference. It's the trigger!
6 - If the next candle exceeds this maximum by 1 cent the trade is triggered. Put the stop loss at the low of the candle that closed below (0.01 to 0.10 below)
7 - If the next candle does not fire, let's lower the trigger to the lower maximums, SINCE the mm9exp does not turn down.
8 - It exceeded the maximum we will have the entrance.
9 - Original stop-loss in the minimum of the candle we set the maximum activated.
SIGN OF SALE
1 - Paper comes in a downtrend in the operating period to be operated.
2 - Exponential moving average of 9 periods descending.
3 - Wait for a candle that makes the lowest closing (candle reference).
4 - If the next candle CLOSE above the maximum of the reference candle the setup is armed.
5 - Bookmark the candle that closed above the reference. It's the trigger!
6 - If the next candle breaks this minimum, the trade is triggered.
7 - Place the stop-loss at the maximum of the candle that closed up.
8 - If the next candle does not trigger, we will raise the trigger to the highest minimums SINCE the exponential moving average of 9 periods does not turn upwards.
9 - It broke the minimum we will have the entrance.
10 - Stop-loss original in the maximum of the candle that we set the minimum activated.
*********************************************************************************************************************************************************
Índice de acerto Superior ao Setup 9.1
Porém o stop deste setup acaba se tornando mais caro em determinadas situações.
SINAL DE COMPRA
1 - Papel vem em tendência de alta no prazo operacional a ser operado.
2 - Média móvel exponencial de 9 períodos ascendente.
3 - Aguardar um candle que faça o maior fechamento (candle referência).
4 - Se o próximo candle FECHAR abaixo da mínima do candle referência o setup está armado.
5 - Marcar a máxima do candle que fechou abaixo do referência. É o gatilho!
6 - Se o próximo candle superar essa máxima em 1 centavo o trade é acionado. Colocar o stop-loss na mínima do candle que fechou abaixo (0,01 a 0,10 abaixo)
7 - Se o próximo candle não acionar, vamos abaixando o gatilho para as máximas menores DESDE QUE a mm9exp não vire para baixo.
8 - Superou a máxima teremos a entrada.
9 - Stop-loss original na mínima do candle que marcamos a máxima ativada.
SINAL DE VENDA
1 - Papel vem em tendência de baixa no prazo operacional a ser operado.
2 - Média móvel exponencial de 9 períodos descendente.
3 - Aguardar um candle que faça o menor fechamento (candle referência).
4 - Se o próximo candle FECHAR acima da máxima do candle referência o setup está armado.
5 - Marcar a mínima do candle que fechou acima do referência. É o gatilho!
6 - Se o próximo candle romper essa mínima o trade é acionado.
7 - Colocar o stop-loss na máxima do candle que fechou acima.
8 - Se o próximo candle não acionar, vamos levantando o gatilho para as mínimas maiores DESDE QUE a média móvel exponencial de 9 períodos não vire para cima.
9 - Rompeu a mínima teremos a entrada.
10 - Stop-loss original na máxima do candle que marcamos a mínima ativada.
Cari dalam skrip untuk "大位科技同行业可替代股票的技术面分析数据(如5日均线、10日均线、支撑位、压力位)"
Reset Every (Price)Someone requested a high/low price indicator that would reset the "remembered" prices daily. I started out doing just that, and then decided to make it much more configurable.
Choose the units (minutes, hours, days, weeks, months) and the number of those units, and this will reset the highest/lowest value remembered to the current values on your chosen time interval.
This should work with any time interval you desire, within reason...asking for resets every 4000 hours on a monthly chart will probably not work.
GE, monthly, every 7 months:
Ford, weekly, every 18 months:
Dow Jones Industrial Average, weekly, every 90 days:
LTCBTC, daily, every 10 days:
ETHUSD, 30 minutes, every 10 days:
BTCUSD, 1 minute, every 10 hours:
EURUSD, 1 minute, every 50 minutes:
Also, I am about to publish another version of this with just one source input that can be applied to any indicator...stay tuned!
XPloRR MA-Trailing-Stop StrategyXPloRR MA-Trailing-Stop Strategy
Long term MA-Trailing-Stop strategy with Adjustable Signal Strength to beat Buy&Hold strategy
None of the strategies that I tested can beat the long term Buy&Hold strategy. That's the reason why I wrote this strategy.
Purpose: beat Buy&Hold strategy with around 10 trades. 100% capitalize sold trade into new trade.
My buy strategy is triggered by the fast buy EMA (blue) crossing over the slow buy SMA curve (orange) and the fast buy EMA has a certain up strength.
My sell strategy is triggered by either one of these conditions:
the EMA(6) of the close value is crossing under the trailing stop value (green) or
the fast sell EMA (navy) is crossing under the slow sell SMA curve (red) and the fast sell EMA has a certain down strength.
The trailing stop value (green) is set to a multiple of the ATR(15) value.
ATR(15) is the SMA(15) value of the difference between the high and low values.
The scripts shows a lot of graphical information:
The close value is shown in light-green. When the close value is lower then the buy value, the close value is shown in light-red. This way it is possible to evaluate the virtual losses during the trade.
the trailing stop value is shown in dark-green. When the sell value is lower then the buy value, the last color of the trade will be red (best viewed when zoomed)(in the example, there are 2 trades that end in gain and 2 in loss (red line at end))
the EMA and SMA values for both buy and sell signals are shown as a line
the buy and sell(close) signals are labeled in blue
How to use this strategy?
Every stock has it's own "DNA", so first thing to do is tune the right parameters to get the best strategy values voor EMA , SMA, Strength for both buy and sell and the Trailing Stop (#ATR).
Look in the strategy tester overview to optimize the values Percent Profitable and Net Profit (using the strategy settings icon, you can increase/decrease the parameters)
Then keep using these parameters for future buy/sell signals only for that particular stock.
Do the same for other stocks.
Important : optimizing these parameters is no guarantee for future winning trades!
Here are the parameters:
Fast EMA Buy: buy trigger when Fast EMA Buy crosses over the Slow SMA Buy value (use values between 10-20)
Slow SMA Buy: buy trigger when Fast EMA Buy crosses over the Slow SMA Buy value (use values between 30-100)
Minimum Buy Strength: minimum upward trend value of the Fast SMA Buy value (directional coefficient)(use values between 0-120)
Fast EMA Sell: sell trigger when Fast EMA Sell crosses under the Slow SMA Sell value (use values between 10-20)
Slow SMA Sell: sell trigger when Fast EMA Sell crosses under the Slow SMA Sell value (use values between 30-100)
Minimum Sell Strength: minimum downward trend value of the Fast SMA Sell value (directional coefficient)(use values between 0-120)
Trailing Stop (#ATR): the trailing stop value as a multiple of the ATR(15) value (use values between 2-20)
Example parameters for different stocks (Start capital: 1000, Order=100% of equity, Period 1/1/2005 to now) compared to the Buy&Hold Strategy(=do nothing):
BEKB(Bekaert): EMA-Buy=12, SMA-Buy=44, Strength-Buy=65, EMA-Sell=12, SMA-Sell=55, Strength-Sell=120, Stop#ATR=20
NetProfit: 996%, #Trades: 6, %Profitable: 83%, Buy&HoldProfit: 78%
BAR(Barco): EMA-Buy=16, SMA-Buy=80, Strength-Buy=44, EMA-Sell=12, SMA-Sell=45, Strength-Sell=82, Stop#ATR=9
NetProfit: 385%, #Trades: 7, %Profitable: 71%, Buy&HoldProfit: 55%
AAPL(Apple): EMA-Buy=12, SMA-Buy=45, Strength-Buy=40, EMA-Sell=19, SMA-Sell=45, Strength-Sell=106, Stop#ATR=8
NetProfit: 6900%, #Trades: 7, %Profitable: 71%, Buy&HoldProfit: 2938%
TNET(Telenet): EMA-Buy=12, SMA-Buy=45, Strength-Buy=27, EMA-Sell=19, SMA-Sell=45, Strength-Sell=70, Stop#ATR=14
NetProfit: 129%, #Trade
Renko Price Bars Overlay// Shows the price renko bars (or range bars) instead of the PERIOD renko
// bars that are integrated into Trading View. The normal renko bars that
// Trading View offers only consider the drawing of a new brick when the
// price closes above or below the required brick size. This can produce
// misleading charts since depending on the time interval of a chart, new
// bricks may or may not be drawn. True price renko bars will draw a new
// brick immediately upon the price exceeding the next target brick size.
// When running this script in "Traditional" mode, the painting of the
// brick overlay band is INDEPENDENT of the chart interval. If price
// exceeds the required target price for the next brick, the band is
// updated immediately, instead of waiting for the price bar on the chart
// interval to close first. The brick starting anchor point will attempt
// to be a "nice number" at a round interval for the chart ticker. For
// example, if viewing EURUSD with the box size equal to 50 ticks/pips,
// the open and close prices will take the form of 1.2100, 1.2150, 1.2200,
// 1.2250, and so on. This is the same behavior as the normal traditional
// Renko bars in Trading View and other major trading platforms such as
// Meta Trader.
// Use the tick size in traditional mode to specify the block size, in
// ticks. This may give interesting results in FOREX pairs... as the tick
// size in Trading View may be 0.00001 instead of the normal pip size of
// 0.0001, so a 10 pip block size may be '100', and not the expected '10'.
// FOREX futures should work in the manner expected, a 10 pip block size
// will indeed equal 0.0010.
// The "ATR" mode functions differently than the Trading View built in
// version. The block size is updated each time the range is exceeded.
// In Trading View, when using the ATR mode, the ATR is the last ATR
// value calculated on the ENTIRE data interval, and is applied to all
// past data. You can see this when you press the '+' sign of the ticker
// in the top left of the chart window and you will see the brick size
// as a constant, the brick size is not a function of the ever changing
// ATR value of the price action. The block size of this script is not
// updated for each price candle (i.e. each 1HR on a 1HR chart), instead
// it is updated only when the price thresholds are exceeded requiring a
// the band to be updated. At that point the current ATR is considered
// and the brick size is updated.
// Options exist to show the current high and low of the brick, and to
// show the required levels that the price must exceed to draw a new
// brick and update the band.
Please leave comments if you notice any bugs or would like any new features added. I don't find much use for plotting the H/L of the current renko candle, but I have seen some request it in the past.
Cheers.
EMA Indicators with BUY sell SignalCombine 3 EMA indicators into 1. Buy and Sell signal is based on
- Buy signal based on 20 Days Highest High resistance
- Sell signal based on 10 Days Lowest Low support
Input :-
1 - Short EMA (20), Mid EMA (50) and Long EMA (200)
2 - Resistance (20) = 20 Days Highest High line
3 - Support (10) = 10 Days Lowest Low line
Volume Range EventsChanges in the feelings (positive, negative, neutral) in the market concerning the valuation of an instrument are often preceded with sudden outbursts of buying and selling frenzies. The aim of this indicator is to report such outbursts. We can see them as expansions of volume, sometimes 10 times more than usual. and as extensions of the trading range, also sometimes 10 times more than usual (e.g. usual range is 10 cent suddenly a whole dollar.) The changes are calculated in such a way that these fit between plus and minus 100 percent, the bars are scaled in some sort of logarithmic way. The Emoline is the same as the one in the True Balance of Power indicator, which I already published
ONLY RISES ARE EVENTS
Sometimes analysts are tempted to give meaning to low volume or small ranges. These simply mean that the market has little interest in trading this instrument. I believe that in such cases the trader needs to wait for expansion and extension events to happen, then he can make a better guess of where the market is heading. As events often mark the beginning or ending of a trend, this indicator provides an early and clear signal, because it doesn’t bother us about non-events.
WHAT IS USUAL?
If the algorithm would use an average as a normal to scale volume or range events, then previous peaks will act as spoilers by making the average so high that a following peak is scaled too small. I developed a function, usual() , that kicks out all extremes of a ‘population of values’ and which returns the average of the non-extreme values. It can be called with any serial. This function is called by both algorithms that report volume and range peaks, which guarantees that the results are really comparable. As this function has a fixed look back of 8 periods, we might state that ‘usual’ is a short lived relative value. I think this doesn’t matter for the practical use of the indicator.
COLORING AND INTERPRETATION
I follow the categories in the ‘Better Volume Indicator’, published by LeazyBear, these are:
1. Climactic Volumes, event >40 % (this means peak is 1.5 X usual)
LIME: Climax Buying Volume, direction up, range event also > 30 %
RED: Climax Selling Volume, direction down, range event also > 30 %
AQUA: Climax Churning Volume, both directions, range event < 30%
2. Smaller Volumes, event <40 %
GREEN: Supportive Volume, both directions, if combined with range event
BLUE: Churning Volume, both directions, if not combined with range event (Professional Trading)
3. Just Range Events
BLACK histogram bars (Amateurish Trading)
Forex Master v4.0 (EUR/USD Mean-Reversion Algorithm)DESCRIPTION
Forex Master v4.0 is a mean-reversion algorithm currently optimized for trading the EUR/USD pair on the 5M chart interval. All indicator inputs use the period's closing price and all trades are executed at the open of the period following the period where the trade signal was generated.
There are 3 main components that make up Forex Master v4.0:
I. Trend Filter
The algorithm uses a version of the ADX indicator as a trend filter to trade only in certain time periods where price is more likely to be range-bound (i.e., mean-reverting). This indicator is composed of a Fast ADX and a Slow ADX, both using the same look-back period of 50. However, the Fast ADX is smoothed with a 6-period EMA and the Slow ADX is smoothed with a 12-period EMA. When the Fast ADX is above the Slow ADX, the algorithm does not trade because this indicates that price is likelier to trend, which is bad for a mean-reversion system. Conversely, when the Fast ADX is below the Slow ADX, price is likelier to be ranging so this is the only time when the algorithm is allowed to trade.
II. Bollinger Bands
When allowed to trade by the Trend Filter, the algorithm uses the Bollinger Bands indicator to enter long and short positions. The Bolliger Bands indicator has a look-back period of 20 and a standard deviation of 1.5 for both upper and lower bands. When price crosses over the lower band, a Long Signal is generated and a long position is entered. When price crosses under the upper band, a Short Signal is generated and a short position is entered.
III. Money Management
Rule 1 - Each trade will use a limit order for a fixed quantity of 50,000 contracts (0.50 lot). The only exception is Rule
Rule 2 - Order pyramiding is enabled and up to 10 consecutive orders of the same signal can be executed (for example: 14 consecutive Long Signals are generated over 8 hours and the algorithm sends in 10 different buy orders at various prices for a total of 350,000 contracts).
Rule 3 - Every order will include a bracket with both TP and SL set at 50 pips (note: the algorithm only closes the current open position and does not enter the opposite trade once a TP or SL has been hit).
Rule 4 - When a new opposite trade signal is generated, the algorithm sends in a larger order to close the current open position as well as open a new one (for example: 14 consecutive Long Signals are generated over 8 hours and the algorithm sends in 10 different buy orders at various prices for a total of 350,000 contracts. A Short Signal is generated shortly after the 14th Long Signal. The algorithm then sends in a sell order for 400,000 contracts to close the 350,000 contracts long position and open a new short position of 50,000 contracts).
My5min1. Follow the instructions for entry and exit exactly as above. Don’t second guess, or assume/presume anything.
2. Avoid entering the trade when the price is temporarily above /below 10 day MA, but the price candle hasn’t fully formed yet. Enter the trade only after the price candle closes above/below the 10 day MA.
3. Exit the trade immediately when the price candle closes above/below 10 day MA in the direction opposite to the trade. Don’t remain in the trade wishing it to turn in your favor.
4. Never ever trade in the opposite direction of the market. i.e. don’t buy when the price is below 200 day MA and sell when the price is above 200 day MA.
5. Take profits when limit is reached. Don’t be greedy and keep on increasing the target. Remember- A bird in hand is worth two in the bush.
MACD, backtest 2015+ only, cut in half and doubledThis is only a slight modification to the existing "MACD Strategy" strategy plugin!
found the default MACD strategy to be lacking, although impressive for its simplicity. I added "year>2014" to the IF buy/sell conditions so it will only backtest from 2015 and beyond ** .
I also had a problem with the standard MACD trading late, per se. To that end I modified the inputs for fast/slow/signal to double. Example: my defaults are 10, 21, 10 so I put 20, 42, 20 in. This has the effect of making a 30min interval the same as 1 hour at 10,21,10. So if you want to backtest at 4hr, you would set your time interval to 2hr on the main chart. This is a handy way to make shorter time periods more useful even regardless of strategy/testing, since you can view 15min with alot less noise but a better response.
Used on BTCCNY OKcoin, with the chart set at 45 min (so really 90min in the strategy) this gave me a percent profitable of 42% and a profit factor of 1.998 on 189 trades.
Personally, I like to set the length/signals to 30,63,30. Meaning you need to triple the time, it allows for much better use of shorter time periods and the backtests are remarkably profitable. (i.e. 15min chart view = 45min on script, 30min= 1.5hr on script)
** If you want more specific time periods you need to try plugging in different bar values: replace "year" with "n" and "2014" with "5500". The bars are based on unix time I believe so you will need to play around with the number for n, with n being the numbers of bars.
SmartMA(EN)
## **SmartMA v1.2: Technical Specification & Integration Guide**
### 1\. Overview & Philosophy
**SmartMA v1.2** is a professional-grade Pine Script library designed to replace static, lagging indicators (like EMA, SMA, ATR) with dynamic, context-aware engines.
The core philosophy is that a trading system's "baseline" (its sense of value) and "sigma" (its sense of risk) should not be fixed. They should adapt in real-time to changes in market structure, volume, flow, and regime.
This library is a **pure logic engine**. It provides no plots or inputs. It is intended to be imported into a sophisticated "super-indicator" (like your `X Ω` system) to serve as its core processor for value and risk.
### 2\. Core Concepts
Before using the main functions, understand these foundational components:
* **`robust_price()`:** This is the recommended price source for all calculations. It replaces `close` or `hlc3`. It is a 70/30 blend of `hlc3` (for smoothness) and a "body-weighted close" (which prioritizes the candle's body and discounts noisy wicks/dojis). **Use this as the `src` for all MAs.**
* **Rate-Limiting:** All adaptive sigmas (`avs`, `qvs`) and advanced MAs (`ava_plus`, `wva`) are "rate-limited." This means they cannot jump more than a small fraction of the ATR in a single bar, ensuring an extremely smooth and stable output, free of jerky movements.
* **Context-Awareness:** The "plus" (`+`) and advanced functions (`wva`, `aria`) are designed to be "slaved" to your main system. They accept signals like `hazard01`, `fit01`, and `squeeze01` as inputs to dynamically alter their own behavior.
-----
### 3\. ⚙️ Module Analysis & How-To Guide
This library is best understood in four parts: Baselines (MAs), Volatility (Sigmas), Regime (Context), and VWAP (Utilities).
#### \#\# 3.1. Adaptive Baselines (MA Replacements)
These functions replace `ta.ema` or `ta.sma` to provide a dynamic, intelligent "moving average" that acts as your core value baseline.
##### \#\#\# `ava()` / `ava_plus()` (Adaptive Volume Average)
* **Purpose:** The primary replacement for `EMA` or `VWMA`.
* **Logic:** Intelligently blends `EMA` (price-driven) and `VWMA` (volume-driven). It gives more weight to `VWMA` during high "conviction" (strong candle bodies, high volume) and reverts to `EMA` in low-volume, uncertain markets.
* **How to Use `ava_plus` (Recommended):** This is the context-aware version. It accepts `hazard01` and `squeeze01` (from your `X Ω` EWS and Compression blocks).
* `float base = SmartMA.ava_plus(20, EWS_envHazard01, CP_squeeze01, "rob")`
* **Result:** When hazard or squeeze is high, `ava_plus` *reduces* its adaptive logic and defaults toward a simple, "safe" `EMA`, preventing erratic signals in high-risk environments.
##### \#\#\# `aria()` (Adaptive Regime & Intent Average)
* **Purpose:** A "top-down" regime-aware baseline. It is a lighter, more elegant alternative to `WVA`.
* **Logic:** `aria` blends three MAs based on the market's "big picture":
1. `ZLEMA` (Fast): Prioritized when `fit01` (trend quality) is high.
2. `EMA` (Slow): Prioritized when `hazard01` (risk) is high.
3. `AVA` (Core): Used as the default.
* **How to Use:** This is an *ideal* baseline for `X Ω`. Feed it the final outputs from your Analyst and EWS blocks.
* `float baseline = SmartMA.aria(20, ANL_fit01_out, EWS_envHazard01, ANL_biasPM1_out)`
* **Result:** The baseline automatically becomes faster in good trends, slower in risky markets, and even "tilts" slightly in the direction of your system's `bias` (intent).
##### \#\#\# `wva()` / `wva_plus()` (Whale-flow Adaptive Average)
* **Purpose:** The "ultimate" baseline. This is the most comprehensive, data-driven MA in the suite.
* **Logic:** `wva_plus` is a multi-scale MA that synthesizes 12 context signals (whale flow, absorption, imbalance, hazard, etc.) AND is anchored to **two distinct, user-defined events**. It uses "consensus" (max of up/down pressure) to drive its adaptive speed.
* **How to Use:** This function is *perfectly* designed to be the "central brain" for `X Ω`'s "senses." You connect your `X Ω` blocks directly to its parameters.
> **Example: Creating a Master Baseline**
> `// 1. Define your two anchors (e.g., 2022 Low and 2023 Q4 Low)`
> `bool anchor_L_2022 = (year == 2022 and month == 11 and dayofmonth == 16)`
> `bool anchor_L_2023 = (year == 2023 and month == 11 and dayofmonth == 1)`
> `// 2. Feed X Ω signals directly into wva_plus`
> `float master_baseline = SmartMA.wva_plus(20,`
> ` whale01 = WH2_score01, // from Block 11`
> ` absorbTop01 = FE_absorbTop01, // from Block 6`
> ` absorbBot01 = FE_absorbBot01, // from Block 6`
> ` imbUp01 = IMB_imbalanceUp01, // from Block 8`
> ` imbDn01 = IMB_imbalanceDn01, // from Block 8`
> ` easeUp01 = LM_easeUp01_out, // from Block 9`
> ` easeDn01 = LM_easeDn01_out, // from Block 9`
> ` hazard01 = EWS_envHazard01, // from Block 13`
> ` breadth01 = FE_miScore01, // from Block 4`
> ` squeeze01 = CP_squeeze01, // from Block 10`
> ` anchor1 = anchor_L_2022,`
> ` slot1 = 1,`
> ` anchor2 = anchor_L_2023,`
> ` slot2 = 2`
> `)`
* **Result:** You get a single baseline that reflects multi-scale price, volume, flow, imbalance, *and* is anchored to two critical historical events.
-----
#### \#\# 3.2. Adaptive Volatility (Sigma Replacements)
These functions replace `ta.atr` to provide a dynamic, smoother, and more robust measure of risk (sigma).
##### \#\#\# `avs()` / `avs_plus()` (Adaptive Volatility Sigma)
* **Purpose:** The primary replacement for `ta.atr`.
* **Logic:** Blends `ATR` (which is good at capturing overnight gaps) with statistical OHLC estimators (Garman-Klass by default) for a more accurate measure of intra-bar volatility. It is heavily smoothed and rate-limited.
* **How to Use `avs_plus`:** This is the context-aware version. Feed it the `hazard01` signal from your `X Ω` EWS block.
* `float risk_sigma = SmartMA.avs_plus(14, hazard01=EWS_envHazard01)`
* **Result:** Your risk bands (`VZA`) will *automatically* widen during high-hazard periods.
##### \#\#\# `qvs()` (Quantile Volatility Sigma)
* **Purpose:** A **more robust** alternative to `AVS`. Highly recommended.
* **Logic:** `AVS` and `ATR` are based on an *average*, which is highly sensitive to one-off, extreme outlier wicks (e.g., a "flash crash" wick). `QVS` is based on **quantiles** (percentiles). It measures the volatility level that (e.g.) 90% of recent bars fall *below*.
* **How to Use:** Use this for your "must-hold" stop-loss bands.
* `float robust_sigma = SmartMA.qvs(20, 0.90, "mix")`
* **Result:** A "real-world" sigma that is immune to outliers and provides a much more stable band for risk management.
##### \#\#\# `avs_asym_ex()` (Extended Asymmetric Sigma)
* **Purpose:** Creates dynamic, asymmetric risk bands (channels).
* **Logic:** This is a brilliant integration point. It takes the `avs` (or `qvs`) sigma and creates two different bands (` `) that are "tilted" by:
1. `biasPM1`: Your system's directional intent (from `X Ω`'s Analyst block).
2. `easeUp01` / `easeDn01`: The "Line of Least Resistance" (from `X Ω`'s S/R block).
* **How to Use:**
* ` = SmartMA.avs_asym_ex(14, ANL_biasPM1_out, LM_easeUp01_out, LM_easeDn01_out, "qvs")`
* ` = SmartMA.vza_asym(master_baseline, sigmaUp, sigmaDn, 1.5, 1.5)`
* **Result:** A channel that *automatically widens* in the direction of the trend, and widens *even more* if it's moving into an area of low S/R (high "ease"). It gives a strong trend "room to run."
-----
#### \#\# 3.3. Regime & Drift (Context Engines)
These functions are not MAs themselves, but rather engines to *drive* other MAs.
##### \#\#\# `fia()` (Fit Integrator)
* **Purpose:** Provides a single "regime" score (0-1) answering, "How good is this trend quality?"
* **Logic:** Blends `R²` (linearity), `ADX` (strength), and the **Hurst Exponent** (persistence/memory). A high score means the trend is strong, linear, and *likely to continue* (H \> 0.5).
* **How to Use:** This is the *primary input* for `dfa()` and `aria()`.
* `float fit_score = SmartMA.fia(14, 20)`
##### \#\#\# `dfa()` (Drift & Fit Average)
* **Purpose:** The replacement for `ta.linreg_slope`. It calculates the "fit-aware" velocity of price.
* **Logic:** It blends the slope of `ZLEMA` (fast, low-lag) with the slope of `ta.linreg` (smooth, stable). It uses the `fit_score` from `fia()` to decide the blend.
* **How to Use:** Use this to power your `X Ω` "Forecast Core" (Block 21).
* `float forecast_drift = SmartMA.dfa(robust_price(), 20, fit_score)`
* **Result:** Your forecast will automatically accelerate in high-quality trends and slow down/stabilize in choppy, low-fit markets.
-----
### 4\. Quick API Reference (Key Exports)
* `robust_price()`: Use as your `src`.
* `ava(len, profile)`: Simple adaptive volume MA.
* `ava_plus(len, hazard01, squeeze01, profile)`: `ava` gated by risk.
* `avs(len, method, wATR)`: `ATR` replacement (smooth, blended).
* `avs_plus(len, ..., hazard01)`: `avs` gated by risk.
* `qvs(len, quantile, mode)`: Robust, quantile-based `ATR` replacement (Recommended).
* `avs_asym_ex(len, biasPM1, easeUp01, easeDn01, base, ...)`: Asymmetric bands driven by bias and S/R.
* `fia(lenS, lenL)`: Regime/Fit score 0-1 (R², ADX, Hurst).
* `dfa(src, len, fit01)`: "Fit-aware" slope/drift.
* `aria(len, fit01, hazard01, biasPM1, profile)`: Top-down, regime-aware baseline.
* `wva_plus(len, , anchor1, slot1, anchor2, slot2, profile)`: The "ultimate" dual-anchor, context-aware baseline.
-----
ORB 30 Alerts (ATH)Overview
ATH ORB 30m automates the Opening Range Breakout (ORB) process across multiple global sessions — Tokyo, London, and New York — and delivers clean, consolidated alerts when fresh breakouts occur.
It’s built for traders who track several tickers and want precise, non-repeating signals that reflect genuine momentum shifts, not constant noise.
How it works
The script defines a 30-minute Opening Range (ORB) for each enabled session and plots its high, low, and midpoint levels.
Every 10-minute candle close is evaluated to detect first-time crosses of those range boundaries — upward or downward.
Once a breakout triggers, that side’s alert is disabled until price returns inside the range, where the system automatically re-arms.
Multiple triggers in the same bar are batched into one combined alert, listing all symbols that broke out.
A built-in debug panel and optional chart labels visualize each trigger and re-arm event in real time.
Key features
-Multi-session ORB logic (Tokyo, London, New York)
-10-minute confirmation filter to validate breakouts
-Automatic alert re-arming when price re-enters range
-Combined per-bar alert messages (no duplicates)
-Optional on-chart labels and debug diagnostics
-Optimized for watchlists and multi-symbol scanners
Usage
Designed for day traders and momentum scalpers, this tool highlights early directional strength during market opens.
Add it to your chart, enable your preferred sessions, and set alert conditions for “ORB Breakouts (BUY),” “ORB Breakdowns (SELL),” or "Any alert() function call" You’ll receive one concise message each bar showing exactly which symbols broke out and in which direction.
DISCLAIMER:
This script is for educational and informational purposes only.
It does not constitute financial advice or a recommendation to buy or sell any security.
Always perform your own due diligence and backtesting before using any trading strategy live.
Trading involves risk; past performance does not guarantee future results.
Fisher MPzFisher MPz - Multi-Period Z-Score Fisher Transform
Overview
An enhanced Fisher Transform that uses multi-period analysis and improved statistical methods to provide more reliable trading signals with the goal of fewer false positives.
Evolution Beyond Traditional Fisher Transform
While the classic Fisher Transform uses simple price normalization and basic smoothing, Fisher MPz introduces several key enhancements:
- Multi-period composite instead of single timeframe analysis
- Robust z-score normalization using median/MAD rather than mean/standard deviation
- Winsorization to handle outliers and price spikes
- Dynamic clipping that adapts to market volatility
- Kalman filtering for superior noise reduction vs. traditional EMA smoothing
These improvements result in cleaner signals, better adaptability to different market conditions, handles trending markets without over-saturation at extreme values, and reduced false signals compared to the standard Fisher Transform.
Key Features
Multi-Period Analysis
- Three Timeframe Approach: Simultaneously analyzes short (default 8), medium (default 13), and long (default 26) periods
- Weighted Composite: Combines all three periods using customizable weights for optimal signal generation
- Individual Period Display: Optional visualization of each period's Fisher Transform for deeper analysis
Advanced Statistical Methods
Robust Z-Score Calculation
- Uses median and MAD (Median Absolute Deviation) instead of mean and standard deviation
- More resistant to outliers and extreme price movements
- Provides stable normalization across varying market conditions
Winsorization
- Caps extreme price values at specified percentiles (default 5th and 95th)
- Reduces the impact of price spikes and anomalies
- Configurable lookback period for threshold calculation
Dynamic Z-Score Clipping
- Automatically adjusts clipping levels based on recent volatility
- Tighter bounds in calm markets (0.05) for precision
- Wider bounds in volatile markets (0.2) to capture significant moves
- Uses ATR-based volatility measurement
Kalman Filter Smoothing
- Optional advanced noise reduction using Kalman filtering
- Superior to traditional EMA smoothing for optimal signal extraction
- Configurable process noise (Q) and measurement noise (R) parameters
- Fallback to traditional smoothing factor available
How to Use
Basic Interpretation
- Above Zero: Bullish momentum
- Below Zero: Bearish momentum
- Extreme Values: Potential overbought/oversold conditions
- Crossovers: Entry/exit signals when composite crosses trigger line
Customizable Settings
Periods: Adjust based on your trading timeframe
- Lower values (3-10): More sensitive, suitable for scalping
- Medium values (10-20): Balanced for swing trading
- Higher values (20-50): Smoother for position trading
Weights: Customize responsiveness
- Increase short weight: More reactive to recent price changes
- Increase long weight: More stability and trend confirmation
Kalman Settings
- Lower Q (0.001-0.02): Smoother, more filtered signals
- Higher Q (0.02-0.1): More responsive to price changes
- Lower R (0.01-0.05): Trust data more, less filtering
- Higher R (0.1-1.0): More skeptical of data, more smoothing
Session SFPThis script is a powerful, multi-timeframe tool designed to identify high-probability Swing Failure Patterns (SFPs) at key historical levels.
Instead of looking for traditional "pivots" (like a 3-bar swing), this indicator finds the actual high and low of a previous higher-timeframe (HTF) bar (e.g., the previous weekly high/low) and waits for a lower-timeframe (LTF) candle to sweep that level and fail.
This allows you to spot liquidity sweeps and potential reversals at significant, structural price points.
How It Works
The indicator's logic is based on a simple, two-timeframe process:
Level Detection: First, it finds the high and low of the previous bar on your chosen "Level Timeframe" (e.g., W for Weekly, D for Daily). It plots these as small 'x' markers on your chart.
SFP Identification: Second, it watches price action on a lower "SFP Timeframe" (e.g., 240 for 4H). A potential SFP is identified when a candle's wick sweeps above a key high or below a key low.
Confirmation: The SFP is only confirmed after the SFP candle closes back below the high (for a bearish SFP) or above the low (for a bullish SFP). It then waits for a set number of "Confirmation Bars" to pass. If price does not close back over the level during this window, the signal is locked in, and a label is printed.
How to Use (Key Settings)
Level Timeframe (Most Important): This is the timeframe for the levels you want to trade. Set this to W to find SFPs of the previous weekly high/low. Set it to D to find SFPs of the previous daily high/low.
SFP Timeframe: This is the timeframe you want to use to find the SFP candle itself. This should be lower than your Level Timeframe (e.g., 240 or 60).
Level Lookback: This controls how many old levels the script will track. A value of 10 on a W Level Timeframe will track the highs and lows of the last 10 weeks.
Confirmation Bars: This is your "patience" filter. It's the number of SFP Timeframe bars that must close without reclaiming the level after the SFP. A value of 0 will confirm the SFP immediately on the candle's close.
Enable Wick % Filter: A quality filter. If checked, this ensures the SFP candle's rejection wick is a significant percentage of the candle's total range.
Chart Visuals
'x' Markers: These are the historical highs and lows from your "Level Timeframe". You can turn these on or off in the settings.
SFP Label: When an SFP is fully confirmed, a label (Bearish SFP or Bullish SFP) will appear, detailing the level that was swept and the timeframes used.
SFP Line: A solid horizontal line is drawn from the 'x' marker to the SFP candle to highlight the sweep.
Colored Boxes (Optional): If you are viewing a chart timeframe lower than your "SFP Timeframe", you can enable background boxes to highlight the exact SFP candle and its confirmation bars.
MACD Volume VWAP Scalping (2min) by Obiii📘 Strategy Description (for TradingView)
MACD Volume VWAP Scalping Strategy (2-Minute Intraday Momentum)
This strategy is designed for scalpers and short-term intraday traders who focus on capturing small, high-probability moves during the most active hours of the trading session — typically between 9:45 AM and 11:30 AM (New York time).
The system combines three key momentum confirmations:
MACD crossovers to detect short-term trend shifts,
Volume spikes to validate real market participation, and
VWAP / EMA alignment to filter trades in the direction of the prevailing intraday trend.
🔹 Entry Logic
Long Entry:
MACD line crosses above the signal line
Both MACD and Signal are above zero
Current volume > average of the last 10 candles
Price is above VWAP and (optionally) above EMA 9 and EMA 20
Short Entry:
MACD line crosses below the signal line
Both MACD and Signal are below zero
Current volume > average of the last 10 candles
Price is below VWAP and (optionally) below EMA 9 and EMA 20
🎯 Exit Logic
Fixed Take Profit: +0.25%
Fixed Stop Loss: -0.15% to -0.20%
Optionally, switch to the 5-minute chart after entry to monitor momentum and manage exits more smoothly.
⚙️ Recommended Settings
Timeframe: 2 minutes (entries), 5 minutes (monitoring)
Market Session: 9:45 AM – 11:30 AM EST
Assets: Highly liquid instruments such as SPY, QQQ, NVDA, TSLA, AAPL, or large-cap momentum stocks.
💡 Notes
This is a momentum-based scalping strategy — precision and discipline are key.
It performs best in high-volume environments where clear direction emerges after the morning volatility settles.
The system can be fine-tuned for different profit targets, MACD settings, or volume thresholds depending on volatility.
Trend & Strength Detector TSDTrend Strength Detector (TSD)
*Objective Trend Quality Measurement for Educational Market Analysis*
Note: This mathematical framework is a proprietary quantitative model developed by Ario Pinelab, inspired by classical EMA, ADX, RSI and MACD principles, yet not documented in any public technical or academic publication.
## 🎯 Purpose & Design Philosophy
The ** Trend Strength Detector- TSD ** is an educational research tool that provides **quantitative measurement of trend quality** through two independent scoring systems (0-100 scale). It answers the analytical question: *"How strong and aligned is the current market trend environment?"*
This indicator is designed with a **modular, complementary approach** to work alongside various analysis methodologies, particularly pattern-based recognition systems.
## 🔗 Complementary Research Framework
### Designed to Work With Pattern Detection Systems
This indicator provides **environmental context measurement** that complements qualitative pattern recognition tools. It works particularly well alongside systems like:
- **RMBS Smart Detector - Multi-Factor Momentum System**
- Traditional chart pattern analyzers
- Any momentum-based pattern identification tools
🔍 **To find RMBS Smart Detector:**
- Search in TradingView Indicators Library: `" RMBS Smart Detector - Multi-Factor Momentum System"`
- Look for: *Multi-Factor Momentum System*
- By author: ` `
### Why This Complementary Approach?
**Trend Quality Measurement** (TSD - this tool) provides:
- ✅ Structural trend alignment (0-100 score)
- ✅ Momentum intensity levels (0-100 score)
- ✅ Environment classification (Strong/Moderate/Weak)
- 📌 **Answers:** *"HOW STRONG is the underlying trend environment?"*
### Educational Research Value
When used together in a research context, these tools enable systematic study of questions like:
- How do reversal patterns behave when Strength Score is above 70 vs below 30?
- Do continuation patterns in weakening environments (declining scores) show different characteristics?
- What is the correlation between high Alignment Scores and pattern "success rates"?
- Can environment classification help identify genuine trend initiation vs false starts?
⚠️ **Important Note:** Both tools are **independent and work standalone**. TSD provides value whether used alone or with other analysis methods. The relationship with RMBS (or any pattern tool) is **complementary for research purposes**, not dependent.
---
###Mathematical Foundation
##TSA Formula: scoring method developed by Ario
-Trend Model (0 – 100)
TAS = EMA Alignment (0–40) + Price Position (0–30) + Trend Consistency (0–30)
EMA Alignment checks EMA_fast vs EMA_slow vs EMA_trend structure.
Price Position evaluates if Close is above/below all EMAs.
Consistency = 3 × max(bullish,bearish bars within 10 candles).
-Strength Model (0 – 100)
Strength = ADX (0–50) + EMA Slope (0–25) + RSI (0–15) + MACD (0–10)
ADX measures trend energy; Slope shows EMA momentum %;
RSI assesses zone positioning; MACD confirms directional agreement.
Note: This formula represents a proprietary quantitative model by Ario_Pinelab, inspired by classical technical concepts but not published in any external reference.________________________________________
📊 Environment Classification
Based on Total Strength Score:
🟢 Strong Environment: Score ≥ 60
→ Well-defined momentum, clear directional bias
🟡 Moderate Environment: 40 ≤ Score < 60
→ Mixed signals, transitional conditions
🔴 Weak Environment: Score < 40
→ Ranging, choppy, low conviction movement
Color Coding:
• Green background: Strong (≥60)
• Yellow background: Moderate (40-59)
• Red background: Weak (<40)
________________________________________
📈 Visual Components
Main Chart Display
Score Labels (Top-Right Corner):
┌─────────────────────────────────┐
│ 📊 Alignment: 75 | Strength: 82 │
│ Environment: Strong 🟢 │
└─────────────────────────────────┘
Color-Coded Background:
• Environment strength visually indicated via background color
• Helps quick identification of market regime
• Customizable transparency (default: 90%)
Reference Lines:
• Dotted line at 60: Strong/Moderate threshold
• Dotted line at 40: Moderate/Weak threshold
• Mid-line at 50: Neutral reference
________________________________________
🔧 Customization Settings
Input Parameters
The best setting is the default mode.
🚫 Important Disclaimers & Limitations
What This Indicator IS:
✅ Educational measurement tool for trend quality research
✅ Quantitative assessment of current market environment
✅ Complementary analysis tool for pattern-based systems
✅ Historical data analyzer for systematic study
✅ Multi-factor scoring system based on technical calculations
What This Indicator IS NOT:
❌ NOT a trading system or signal generator
❌ NOT financial advice or trade recommendations
❌ NOT predictive of future price movements
❌ NOT a guarantee of pattern success/failure
❌ NOT a substitute for comprehensive risk management
________________________________________
Known Limitations
1. Lagging Nature:
⚠️ All components (EMA, ADX, RSI, MACD) are calculated
from historical price data
→ Scores reflect CURRENT and RECENT conditions
→ Cannot predict sudden reversals or black swan events
→ Trend measurements lag actual price turning points
2. Whipsaw Risk:
⚠️ In choppy/ranging markets, scores may fluctuate rapidly
→ Moderate zone (40-60) can see frequent transitions
→ Low timeframes more susceptible to noise
→ Consider higher timeframes for stable measurements
3. Component Conflicts:
⚠️ Individual components may disagree
→ Example: Strong ADX but weak RSI alignment
→ Scores average these conflicts (may hide nuance)
→ Check individual components for deeper insight
4. Not Predictive:
⚠️ High scores do NOT guarantee continuation
⚠️ Low scores do NOT guarantee reversal
→ Measurement ≠ Prediction
→ Use for CONTEXT, not SIGNALS
→ Combine with comprehensive analysis
________________________________________
Risk Acknowledgments
Market Risk:
• All trading involves substantial risk of loss
• Past performance (even systematic studies) does not guarantee future results
• No indicator, system, or methodology can eliminate market risk
Measurement Limitations:
• Scores are mathematical calculations, not market predictions
• Environmental classification is descriptive, not prescriptive
• Strong measurements can deteriorate rapidly without warning
Educational Purpose:
• This tool is designed for LEARNING about market structure
• Not designed, tested, or validated as a standalone trading system
• Any trading decisions are user’s sole responsibility
No Warranty:
• Indicator provided “as-is” for educational purposes
• No guarantee of accuracy, reliability, or profitability
• Users must verify calculations and apply critical thinking
Open Source
Full Pine Script code available for educational study and modification. Feedback and improvement suggestions welcome.
“All logic is presented for research and educational visualization.”
---
Volume growthVolume Spike vs Previous Day
Description:
This indicator highlights moments of unusually high trading activity by comparing the current bar’s volume to the previous one.
Whenever the current volume exceeds the previous bar’s volume by a specified multiple, the candle is highlighted, and a visual marker appears on the chart.
It’s a simple yet powerful tool to instantly spot sudden spikes in market participation — often signaling key moments of accumulation, distribution, or breaking news activity.
How it works:
Compares the current volume to the previous bar’s volume.
If the increase exceeds your chosen multiplier (for example, 10×), the bar is highlighted.
A green “VOL↑” marker is displayed below the bar for quick visual recognition.
Optional alert conditions allow you to get notified whenever a spike occurs.
Inputs:
Multiplier — sets how many times larger the current volume must be compared to the previous one (default: 10).
Best for:
Spotting sudden surges in interest or liquidity.
Identifying potential breakout or reversal zones.
Works on any asset and any timeframe.
Indicator Overview主力籌碼預判買賣力道 (JUMBO)Pro+ 2.0主力預判買賣力道 Pro+ 是一個先進的多維度交易分析系統,專為台灣股市投資者設計。本指標整合了趨勢、成交量、動量、價格位置和波動率五大維度,通過加權評分系統生成綜合的「Power指標」,精準預判主力資金動向。
🔧 核心技術架構
1. 多維度評分系統
趨勢維度 (30%):雙EMA系統 + MACD + ADX趨勢強度
成交量維度 (25%):OBV能量潮 + 成交量比率分析
動量維度 (20%):RSI + MFI資金流量指標
價格位置維度 (20%):VWAP + 布林通道位置分析
波動率維度 (5%):ATR波動率調整
2. 多重確認機制
趨勢確認:EMA金叉/死叉 + 超級趨勢方向
成交量確認:成交量脈衝檢測 + OBV趨勢確認
動量確認:RSI超買超賣 + MFI資金流向
位置確認:布林通道位置 + VWAP相對位置
📊 主要功能特色
訊號系統
主力佈局訊號 🟥
趨勢多頭確認 + Power > 35
成交量放大 + 動量指標多頭
RSI未超買 + 價格突破基準
主力出貨訊號 🟩
趨勢空頭確認 + Power < -35
成交量異常 + 動量指標空頭
RSI未超賣 + 價格跌破基準
Power交叉訊號 🟠🔵
黃金交叉:Power線向上穿越Power MA線
死亡交叉:Power線向下穿越Power MA線
視覺化系統
台灣股市顏色標準:紅色上漲/多頭,綠色下跌/空頭
多層級K線著色:強力訊號→普通訊號→偏多偏空→盤整
智能資訊面板:實時顯示8大關鍵指標狀態
⚙️ 參數設定說明
主要參數
EMA週期:13/55(短期/長期)
Power閾值:35(靈敏度調整)
成交量濾波:1.2倍(異常成交量檢測)
超級趨勢:10週期/3倍數(趨勢過濾)
進階參數
布林通道:20週期/2倍標準差
波動率設定:14週期ATR
動量指標:14週期RSI/MFI
🎯 交易應用策略
進場時機
強力買入:🔥標記 + Power黃金交叉
常規買入:紅色向上箭頭 + Power > 35
確認買入:多重條件同時滿足
出場時機
強力賣出:💧標記 + Power死亡交叉
常規賣出:綠色向下箭頭 + Power < -35
風險控制:趨勢反轉 + 動量減弱
風險管理
止損設定:ATR波動率參考
倉位控制:Power數值強度分級
訊號過濾:ADX趨勢強度確認
📈 指標優勢
高準確率:多重條件過濾,減少假訊號
及時性:領先指標預判主力動向
完整性:涵蓋技術分析主要維度
用戶友好:直觀的視覺化設計
自定義:參數可調適應不同交易風格
🎯 Indicator Overview
Main Force Prediction Buying/Selling Strength Pro+ is an advanced multi-dimensional trading analysis system specifically designed for Taiwan stock market investors. This indicator integrates five key dimensions: trend, volume, momentum, price position, and volatility, generating a comprehensive "Power Indicator" through a weighted scoring system to accurately predict institutional fund movements.
🔧 Core Technical Architecture
1. Multi-Dimensional Scoring System
Trend Dimension (30%): Dual EMA system + MACD + ADX trend strength
Volume Dimension (25%): OBV accumulation + Volume ratio analysis
Momentum Dimension (20%): RSI + MFI money flow index
Price Position Dimension (20%): VWAP + Bollinger Bands position analysis
Volatility Dimension (5%): ATR volatility adjustment
2. Multi-Confirmation Mechanism
Trend Confirmation: EMA golden/death cross + SuperTrend direction
Volume Confirmation: Volume spike detection + OBV trend confirmation
Momentum Confirmation: RSI overbought/oversold + MFI money flow
Position Confirmation: Bollinger Bands position + VWAP relative position
📊 Key Features
Signal System
Institutional Accumulation Signals 🟥
Bullish trend confirmation + Power > 35
Volume expansion + Momentum indicators bullish
RSI not overbought + Price breakthrough baseline
Institutional Distribution Signals 🟩
Bearish trend confirmation + Power < -35
Abnormal volume + Momentum indicators bearish
RSI not oversold + Price breakdown below baseline
Power Cross Signals 🟠🔵
Golden Cross: Power line crosses above Power MA line
Death Cross: Power line crosses below Power MA line
Visualization System
Taiwan Market Color Standard: Red for uptrend/bullish, Green for downtrend/bearish
Multi-level Candlestick Coloring: Strong signals → Regular signals → Bias signals → Consolidation
Smart Info Panel: Real-time display of 8 key indicator statuses
⚙️ Parameter Settings
Main Parameters
EMA Periods: 13/55 (Short-term/Long-term)
Power Threshold: 35 (Sensitivity adjustment)
Volume Filter: 1.2x (Abnormal volume detection)
SuperTrend: 10 period/3 multiplier (Trend filtering)
Advanced Parameters
Bollinger Bands: 20 period/2 standard deviations
Volatility Settings: 14 period ATR
Momentum Indicators: 14 period RSI/MFI
🎯 Trading Application Strategies
Entry Timing
Strong Buy: 🔥 Mark + Power Golden Cross
Regular Buy: Red upward arrow + Power > 35
Confirmed Buy: Multiple conditions simultaneously met
Exit Timing
Strong Sell: 💧 Mark + Power Death Cross
Regular Sell: Green downward arrow + Power < -35
Risk Control: Trend reversal + Momentum weakening
Risk Management
Stop Loss Setting: ATR volatility reference
Position Sizing: Power value strength grading
Signal Filtering: ADX trend strength confirmation
📈 Indicator Advantages
High Accuracy: Multiple condition filtering reduces false signals
Timeliness: Leading indicators predict institutional movements
Completeness: Covers main dimensions of technical analysis
User-Friendly: Intuitive visualization design
Customizable: Adjustable parameters adapt to different trading styles
🔍 Professional Usage Tips
Trend Confirmation: Use in conjunction with major trend direction
Volume Validation: Ensure volume confirms price movements
Risk Management: Always use appropriate position sizing
Timeframe Analysis: Apply across multiple timeframes for confirmation
Market Context: Consider overall market conditions and sector rotation
版本: Pro+ 2.0
適用市場: 台股、亞股、全球股市
最佳時間框架: 日線、4小時線、1小時線
開發者: JUMBO Trading System
更新日期: 2025版本
Elliott Wave Expert AdvisorElliott Wave Expert Advisor - Professional Wave Analysis Tool
OVERVIEW
--------
The Elliott Wave Expert Advisor is a comprehensive Pine Script indicator designed for TradingView that automates Elliott Wave analysis and generates high-probability trading signals. Built on Ralph Nelson Elliott's Wave Principle, this indicator identifies impulse wave patterns, validates them against strict Elliott Wave rules, and provides precise entry points with calculated risk management levels.
CORE FUNCTIONALITY
------------------
1. TREND DETECTION
- Dual Moving Average system (Fast/Slow MA)
- MACD confirmation for trend strength
- Automatic trend classification (Uptrend/Downtrend/Sideways)
- Only generates signals aligned with main trend
2. SWING POINT DETECTION
- Automatic pivot high/low identification
- Configurable sensitivity (lookback periods)
- Minimum swing size filtering to reduce noise
- ZigZag visualization connecting swing points
3. WAVE IDENTIFICATION
- 5-wave impulse pattern recognition (1-2-3-4-5)
- 3-wave corrective pattern detection (A-B-C)
- Wave labels displayed on chart
- Color-coded validation status (Blue = Valid, Orange = Pending)
4. ELLIOTT WAVE RULES VALIDATION
Strictly enforces three cardinal rules:
- Rule 1: Wave 2 never retraces more than 100% of Wave 1
- Rule 2: Wave 3 is never the shortest impulse wave
- Rule 3: Wave 4 never overlaps Wave 1 price territory
5. FIBONACCI ANALYSIS
- Automatic Fibonacci retracement calculations (23.6%, 38.2%, 50%, 61.8%, 78.6%)
- Fibonacci extension projections (100%, 161.8%, 261.8%)
- Wave 3 and Wave 5 target projections
- Fibonacci-based Take Profit levels
6. SIGNAL GENERATION
- Entry signals at Wave 2 completion (catch Wave 3)
- Entry signals at Wave 4 completion (catch Wave 5)
- Automatic Stop Loss placement below/above pivot points
- Multiple Take Profit targets (TP1 at 1.618 extension, TP2 at Wave 5 projection)
- Risk/Reward ratio calculation and filtering
- Minimum R:R threshold (default 1.5:1)
7. VISUAL ELEMENTS
- Pivot markers (H/L) showing swing highs and lows
- ZigZag lines connecting swing points
- Wave number labels (1-2-3-4-5) with validation colors
- Entry signal arrows (Green = BUY, Red = SELL)
- Stop Loss lines (Red dashed)
- Take Profit lines (Green dashed and dotted)
- Real-time status dashboard showing:
* Number of pivots detected
* Wave count progress (X/5)
* Pattern validation status
* Market trend direction
* Signal active status
* Helpful tips and guidance
OPTIMAL USAGE
-------------
• Timeframes: H1, H4, D1 (avoid M1-M5 due to noise)
• Markets: Forex majors (EUR/USD, GBP/USD), Gold (XAU/USD), Major Cryptocurrencies
• Market Conditions: Strong trending markets (avoid ranging/sideways conditions)
• Risk Management: Never risk more than 1-2% per trade
• Position Sizing: Based on calculated Stop Loss distance
CONFIGURATION PARAMETERS
------------------------
Trend Detection:
- MA Fast Period (default: 20)
- MA Slow Period (default: 50)
- MACD settings (12/26/9)
Swing Detection:
- Pivot Lookback Left/Right (default: 10/10, reduce to 5/5 for M15)
- Min Swing Size % (default: 0.1%, reduce to 0.05% for M15)
Wave Detection:
- Min Wave Size % (default: 0.5%, reduce to 0.2-0.3% for smaller timeframes)
Risk Management:
- SL Buffer % (default: 0.1%)
- TP1 Fibonacci Ratio (default: 1.618)
- Min Risk/Reward (default: 1.5)
Visualization:
- Toggle visibility for MAs, ZigZag, Wave Labels, Signals, SL/TP
- Customizable colors for all elements
- Optional trend background coloring
IMPORTANT NOTES
---------------
• Elliott Wave analysis is subjective - this indicator implements one specific interpretation
• Works best in trending markets; automatically suppresses signals in sideways conditions
• Signals are NOT repainting after pivot confirmation
• Not a "holy grail" - combine with other analysis and proper risk management
• Requires patience - quality setups are infrequent but high-probability
• Always backtest on historical data before live trading
ELLIOTT WAVE THEORY BACKGROUND
------------------------------
Elliott Wave Theory, developed by Ralph Nelson Elliott in the 1930s, proposes that market prices move in predictable wave patterns driven by investor psychology. An impulse wave consists of five sub-waves (three in the trend direction, two corrections), followed by a three-wave correction. This indicator automates the identification of these patterns and validates them against Elliott's original rules.
DISCLAIMER
----------
This indicator is for educational and informational purposes only. Past performance does not guarantee future results. Always conduct your own analysis and never trade with money you cannot afford to lose. The indicator provides signals based on technical analysis patterns and does not constitute financial advice.
VERSION
-------
v1.0 - Initial Release
Pine Script v5
Created: 2024
SUPPORT
-------
For detailed usage instructions, refer to the included documentation:
- usage_guide.md - Complete user manual with examples
- elliott_rules.md - Elliott Wave theory reference and implementation details
Average Price Calculator / VisualizerDCA Average Price Calculator - Visualize Your Breakeven & TP!
Ever wished you could visualize your trades and instantly see your average entry price right here on TradingView? Especially if you're a DCA (Dollar-Cost Averaging) trader like me, tracking multiple entries can be a hassle. You're constantly switching to a spreadsheet or calculator to figure out your breakeven and take-profit levels. Well I've developed this DCA Average Price Calculator to solve exactly that problem, bringing all your position planning directly onto your chart.
What It Does
This indicator is a interactive tool designed to calculate the weighted average price of up to 10 separate trade entries. It then plots your crucial breakeven (average price) and a customizable take-profit target directly on your chart, giving you a clear visual of your position.
Key Features
Up to 10 Order Entries: Plan complex DCA strategies with support for up to ten individual buys.
Flexible Size Input: Enter your position size in either USD Amount or Number of Shares/Contracts. The script is smart enough to know which one you're using.
Instant Average Price Calculation: Your weighted average price (your breakeven point) is calculated and plotted in real-time as a clean yellow line.
Customizable Take-Profit Target: Set your desired profit percentage and see your take-profit level instantly plotted as a green line.
Detailed On-Chart Labels: Each order you plot is marked with a detailed label showing the entry price, the number of shares purchased, and the total USD value of that entry.
Clean & Uncluttered UI: The main Average and TP labels are intelligently shifted to the right, ensuring they don't overlap with your entry markers, keeping your chart readable.
How to Use It - Simple Steps
Add the indicator to your chart.
Open the script's 'Settings' menu.
In the 'Take Profit' section, set your desired profit percentage (e.g., 1 for 1%).
Under the 'Orders' section, begin filling in your entries. For each 'Order #', enter the Price.
Next, enter the size. You can either fill in the 'Size (USD)' box OR the '/ Shares' box. Leave the one you're not using at 0.
As you add orders, the 'Avg' (yellow) and 'TP' (green) lines, along with the blue order labels, will automatically appear and adjust on your chart!
Who Is This For?
DCA Traders: This is the ultimate tool for you!
Position Traders: Keep track of scaling into a larger position over time.
Manual Backtesters: Quickly simulate and visualize how a series of buys would have played out.
Any Trader who wants a quick and easy way to calculate their average entry without leaving TradingView.
I built this tool to improve my own trading workflow, and I hope it helps you as much as it has helped me. If you find it useful, please consider giving it a 'Like' and feel free to leave any feedback or suggestions in the comments!
Happy trading
Fat Tony's Composite Momentum Histogram (v01)Fat Tony's Composite Momentum Histogram (v01)
Overview
Fat Tony's Composite Momentum Histogram (v01) is a sophisticated momentum oscillator that combines four powerful technical analysis components into a single, unified signal. Unlike traditional single-indicator approaches, this tool synthesizes Williams %R, Stochastic, MACD Histogram, and Rate of Change to provide a comprehensive view of momentum across multiple timeframes and calculation methods.
The indicator displays as a histogram that oscillates between -150 and +150, with overbought/oversold zones clearly marked at +100/-100. When momentum crosses above the oversold level with sufficient volume, a green triangle appears below the histogram signaling a potential long entry. Conversely, when momentum crosses below the overbought level, a red triangle appears above signaling a potential short entry.
What Makes This Different
Multi-Component Synthesis: Rather than relying on a single momentum calculation, this indicator averages four complementary momentum measures, each capturing different aspects of price action:
Williams %R captures overbought/oversold conditions
Stochastic tracks momentum relative to recent price range
MACD Histogram shows trend strength and potential reversals
Rate of Change measures velocity of price movement, normalized by volatility
Intelligent Volume Weighting: The indicator amplifies signals when volume confirms the move. Recent volume is compared to a 20-bar average using a logarithmic scale, preventing extreme spikes from distorting the signal while still rewarding genuine volume-backed momentum.
Adaptive Normalization: The MACD component uses a 200-bar standard deviation to adaptively scale itself, ensuring the indicator remains responsive across different market conditions and volatility regimes.
Volume Filtering: Optional minimum volume threshold (5-bar average) prevents false signals during low-liquidity periods when price moves may not be meaningful.
Key Features
Composite Signal: Combines four momentum indicators into one cohesive oscillator
Volume Confirmation: Optional volume weighting amplifies signals backed by strong participation
Trend Filter: Optional EMA-200 filter to trade only with the dominant trend
Visual Clarity: Color-coded histogram (blue for positive, orange for negative, red/green at extremes)
Automatic Alerts: Built-in alerts for entry and exit signals
Customizable Thresholds: Adjust overbought/oversold levels to match your trading style
ROC Toggle: Enable/disable the Rate of Change component based on your preference
Debug Mode: View individual component plots for fine-tuning and validation
Settings & Customization
Momentum Settings
Length (default: 14): Primary calculation period for Williams %R and Stochastic
MACD Fast (default: 12): Fast EMA period for MACD calculation
MACD Slow (default: 26): Slow EMA period for MACD calculation
MACD Signal (default: 9): Signal line period for MACD
ROC Length (default: 10): Lookback period for Rate of Change calculation
MACD StDev Length (default: 200): Period for adaptive MACD normalization
Levels
Overbought Level (default: 100): Threshold for short signals
Oversold Level (default: -100): Threshold for long signals
Volume Settings
Enable Volume Weighting (default: ON): Amplifies signals when volume confirms
Volume Sensitivity (default: 1.5): Controls strength of volume impact (0.5-3.0)
Min Avg Volume (default: 50,000): Minimum 5-bar average volume to trigger signals
Components
Include ROC Component (default: ON): Adds Rate of Change to the composite
Enable Trend Filter (default: OFF): Only signals aligned with EMA-200 trend
Show Component Plots (default: OFF): Display individual components for analysis
How to Use
Basic Signal Interpretation:
Green triangle below histogram = Long signal (momentum crossing up through oversold)
Red triangle above histogram = Short signal (momentum crossing down through overbought)
Histogram color indicates momentum direction and strength
Background shading highlights extreme overbought/oversold zones
Entry Strategy:
Wait for the histogram to enter oversold territory (below -100) for longs, or overbought (above +100) for shorts
Look for the entry signal (triangle) when momentum crosses back through the threshold
Confirm the signal occurs with adequate volume (if volume filter is enabled)
Consider the trend filter if trading with the dominant direction only
Exit Strategy:
Optional exit signals appear when momentum crosses the zero line against your position
Consider taking profits at extreme opposite readings (e.g., long exit when reaching +100)
Use price action, support/resistance, or your own risk management for final exits
Fine-Tuning:
Shorter Length settings (8-10): More responsive, more signals, potentially more noise
Longer Length settings (18-21): Smoother signals, fewer false positives, slower response
Higher Volume Sensitivity: Requires stronger volume confirmation
Lower Overbought/Oversold Levels (±80): More frequent signals
Enable Trend Filter: Reduces signals but improves win rate by trading with trend
Best Practices
Combine with Price Action: Use this indicator to confirm what you're seeing on the price chart, not as a standalone system
Respect the Volume Filter: Low-volume signals are often false moves; the volume confirmation is there for a reason
Don't Chase: Wait for signals at extreme levels; entries in the middle zone tend to whipsaw
Use Multiple Timeframes: Check that momentum aligns across your trading timeframe and a higher timeframe
Backtest Your Settings: Default parameters work well on many instruments, but optimization for your specific market and timeframe can improve results
Technical Details
The indicator normalizes each component to a -50 to +50 range before averaging, ensuring equal weighting regardless of the raw scale differences between Williams %R, Stochastic, MACD, and ROC. The MACD component uses a hyperbolic tangent function for smooth, bounded normalization. Volume weighting applies a logarithmic scale to prevent extreme outliers from dominating the calculation while still capturing genuine volume surges.
MPO4 Lines – Modal Engine█ OVERVIEW
MPO4 Lines – Modal Engine is an advanced multi-line modal oscillator for TradingView, designed to detect momentum shifts, trend strength, and reversal points through candle-based pressure analysis with multiple fast lines and a reference slow line. It features divergence detection on Fast Line A, overbought/oversold return signals, dynamic coloring modes, and layered gradient visualizations for enhanced clarity and decision-making.
█ CONCEPT
The indicator is built upon the Market Pressure Oscillator (MPO) and serves as its expanded evolution, aimed at enabling broader market analysis through multiple lines with varying parameters. It calculates modal pressure using candle body size and direction, weighted against average body size over a lookback period, then normalized and smoothed via EMA. It generates four distinct oscillator lines: a heavily smoothed Slow Line (trend reference), two Fast Lines (A & B) for momentum and support/resistance, and an optional Line 4 for additional confirmation. Divergence is calculated solely on Fast Line A, with visual gradients between lines and bands for intuitive interpretation.
█ WHY USE IT?
- Multi-Layer Momentum: Combines slow trend reference with dual fast lines for precise entry/exit timing.
- Divergence Precision: Bullish/bearish divergences on Fast Line A with labeled confirmation.
- OB/OS Return Signals: Clear buy/sell markers when Fast Line A exits oversold/overbought zones.
- Dynamic Visuals: Gradient fills, line-to-line shading, and band gradients for instant market state recognition.
- Flexible Coloring: Slow Line color by direction or zero-position; fast lines by sign.
- Full Customization: Independent lengths, smoothing, visibility, and transparency — by adjusting the lengths of different lines, you can tailor results for various strategies; for example, enabling Line 4 and tuning its length allows trading based on crossovers between different lines.
█ HOW IT WORKS?
- Candle Pressure Calculation: Body = math.abs(close - open); avgBody = ta.sma(body, len). Direction = +1 (bull), –1 (bear), 0 (neutral). Weight = body / avgBody. Contribution = direction × weight.
- Rolling Sum & Normalization: Sums contributions over lookback, normalizes to ±100 scale (÷ (len × 2) × 100).
Smoothing: Applies primary EMA (smoothLen), with extra EMA on Slow Line for stability.
Line Structure:
- Slow Line = calcCPO(len1=20, smoothLen1=5) → extra EMA (5)
- Fast Line A = calcCPO(len2=6, smoothLen2=7)
- Fast Line B = calcCPO(len3=6, smoothLen3=10)
- Line 4 = calcCPO(len4=14, smoothLen4=1)
Divergence Detection: Uses ta.pivothigh/low on price and Fast Line A (pivotLength left/right). Bullish: lower price low + higher osc low. Bearish: higher price high + lower osc high. Valid within 5–60 bar window.
Signals:
- Buy: Fast Line A crosses above oversold (–30)
- Sell: Fast Line A crosses below overbought (+30)
- Slow Line color flip (direction or zero-cross)
- Divergence labels ("Bull" / "Bear")
- Band Coloring as Momentum Signal:
When Fast Line A ≤ Fast Line B → Overbought band turns red (bearish pressure building)
When Fast Line A > Fast Line B → Oversold band turns green (bullish pressure building) This dynamic coloring serves as visual confirmation of momentum shift following fast line crossovers
Visualization:
- Gradients: Fast B → Zero (multi-layer fade), Fast A ↔ B fill, OB/OS bands
- Dynamic colors: Green/red based on sign or trend
- Zero line + dashed OB/OS thresholds
Alerts: Trigger on OB/OS returns, Slow Line changes, and divergences.
█ SETTINGS AND CUSTOMIZATION
- Line Visibility: Toggle Slow, Fast A, Fast B, Line 4 independently.
Line Lengths:
- Slow Line: Base (20), Primary EMA (5), Extra EMA (5)
- Fast A: Lookback (6), EMA (7)
- Fast B: Lookback (6), EMA (10)
- Line 4: Lookback (14), EMA (1)
- Slow Line Coloring Mode: “Direction” (trend-based) or “Position vs Zero”.
- Bands & Thresholds: Overbought (+30), Oversold (–30), step 0.1.
- Signals: Enable Fast A OB/OS return markers (default: on).
- Divergence: Enable/disable, Pivot Length (default: 2, min 1).
- Colors & Appearance: Full control over bullish/bearish hues for all lines, zero, bands, divergence, and text.
Gradients & Transparency:
- Fast B → Zero: 75 (default)
- Fast A ↔ B fill: 50
- Band gradients: 40
- Toggle each gradient independently
█ USAGE EXAMPLES
The indicator allows users to configure various strategies manually, though no built-in alerts exist for them. Entry signals can include color of fast lines, crossovers between different lines, alignment of colors across lines, or consistency in direction.
- Trend Confirmation: Slow Line above zero + green = bullish bias; below + red = bearish.
- Entry Timing: Buy on Fast A crossing above –30 (circle marker), especially if Slow Line is rising or near zero.
- Reversal Setup: Bullish divergence (“Bull” label) + Fast A in oversold + green gradient band = high-probability long.
- Scalping: Fast A vs Fast B crossover in direction of Slow Line trend.
- Noise Reduction: Increase extraSmoothLen on Slow Line
█ USER NOTES
- Best combined with volume, support/resistance, or trend channels.
- Adjust lookback and smoothing to asset volatility.
- Divergence delay = pivotLength; plan entries accordingly.
Candlestick Combo Strategy - [CLEVER]📊 Strategy Name:
Candlestick Combo Strategy –
🧠 Purpose
This strategy is built to identify high-probability reversal or continuation setups based on a combination of classic Japanese candlestick patterns filtered through a trend indicator (50-period SMA) and volatility measure (ATR).
It automatically executes long or short trades when multiple conditions align — giving traders a rules-based, mechanical approach to using price action patterns.
⚙️ Core Components Explained
1. Trend & Volatility Filters
50-period SMA (Simple Moving Average):
Defines market direction.
If price > SMA → Uptrend (only long signals considered).
If price < SMA → Downtrend (only short signals considered).
ATR (Average True Range):
Used to measure volatility and define the size of candlestick patterns.
Helps distinguish strong candles from normal noise.
Also used to calculate stop-loss and target levels dynamically.
2. Candlestick Patterns Detected
The script detects 8 classical patterns, some bullish (for long entries) and some bearish (for short entries).
Each pattern has specific rules based on candle bodies, wicks, and relative positioning.
🟩 Bullish (Long) Patterns
Pattern Description
Mat Hold Strong bullish continuation: a long green candle, small consolidation, then another bullish breakout.
Tower Bottom Reversal setup: large bearish candle, several small neutral candles (base), followed by a large bullish candle.
Rising Window Gap-up pattern signaling bullish strength and momentum continuation.
Bullish Marubozu Full-body bullish candle with little to no wicks — represents aggressive buying pressure.
🟥 Bearish (Short) Patterns
Pattern Description
Matching High Two strong bullish candles with nearly identical highs — signals exhaustion and potential reversal.
Falling Window Gap-down continuation pattern — confirms bearish momentum.
Bearish Marubozu Full-body bearish candle with minimal wicks — represents strong selling pressure.
Long-Legged Doji High indecision after an uptrend — potential reversal warning when confirmed by trend filter.
3. Trade Signal Logic
Long Signal:
Generated when the market is in an uptrend and one of the bullish patterns forms.
Short Signal:
Generated when the market is in a downtrend and one of the bearish patterns appears.
This ensures that signals align with the overall market structure and aren’t triggered in the opposite direction of momentum.
4. Risk Management & Trade Execution
Each trade is managed with automatic stop-loss (SL) and take-profit (TP) levels based on recent price swings and risk-to-reward ratio.
Stop-Loss (SL):
For long trades → lowest low of the last 10 bars.
For short trades → highest high of the last 10 bars.
Target (TP):
Based on user-defined risk:reward ratio (RR), default is 2:1.
ATR Multiplier:
Ensures only strong patterns (larger than average candle size) trigger trades.
Trade Limiter:
The strategy includes maxOpenTrades, which restricts how many trades can be open at once (default = 1), preventing overexposure.
5. Visual Signals
Green Triangles (▲) → Long entry signals appear below candles.
Red Triangles (▼) → Short entry signals appear above candles.
These markers visually represent where the strategy detects valid setups.
💡 Trading Logic Summary
Condition Requirement
Trend Based on 50-SMA (uptrend = long, downtrend = short)
Pattern Strength Verified using ATR for realistic volatility filtering
Entry Triggered only when both trend and pattern align
Exit Stop and target auto-calculated (Risk:Reward = configurable)
Trade Control Limits number of concurrent open positions
🧩 Best Use Cases
Timeframes: Works best on 1H, 4H, or daily charts.
Markets: Suitable for Forex, indices, and commodities.
Trading Style: Ideal for swing traders and technical analysts who prefer price action confirmation.
✅ Summary Table
Feature Description
Strategy Type Price Action + Candlestick Pattern Recognition
Trend Filter 50-SMA
Volatility Filter ATR-based
Patterns Used 8 classic bullish/bearish candlestick formations
Trade Management Auto SL/TP via recent swing levels
Customization Adjustable ATR, SMA, Risk:Reward, and max trades
Objective Identify high-probability reversal or continuation setups with disciplined risk control TVC:DXY OANDA:XAUUSD OANDA:AUDJPY CITYINDEX:GBPMXN CRYPTO:BTCUSD TVC:USOIL OANDA:USDCHF WHSELFINVEST:NOKJPY IBKR:SEKJPY
Turtles StrategyBorn from the 1980s "Turtle" experiment, this method of trading captures breakouts and places or closes trades with intrabar entries or exits and realized-equity risk controls.
How It Works
The strategy buys/sells on breakouts from recent highs/lows, using ATR for volatility-adjusted stops and sizing. It risks a fixed % (default 1%) of realized equity per trade—initial capital plus closed P&L, ignoring open positions for conservatism. Drawdown protection auto-reduces risk by 20% at 10% drops (up to three times), resetting only on full peak recovery. Single positions only, with 1-tick slippage simulated for realistic fills. Best for trending assets like forex,commodities, crypto, stocks. Backtest for optimal parameters.
Main Operations
The strategy works on any timeframe but it's meant to be used on daily charts.
Entry Signals:
Long: Buy-stop 1 tick above 20-bar high (default "Entry Period") when no position—enters intrabar on breakout.
Short: Sell-stop 1 tick below 20-bar low. OCA cancels opposites.
Size: (Realized equity × adjusted risk %) ÷ (2× ATR stop distance), scaled by point value.
Exit Signals:
Longs: Stop at tighter of (entry - 2× ATR) or (10-bar low - 1 tick trailing, default "Exit Period").
Shorts: Stop at tighter of (entry + 2× ATR) or (10-bar high + 1 tick trailing).
Locks profits in trends, exits fast on fades.
Risk Controls:
Tracks realized equity peak.
10% drawdown: Risk ×0.8; 20%/30%: Further ×0.8 (max 3x).
Full reset above peak—preserves capital in slumps.






















