Pocket Pivot IndicatorFrom Gil Morales and Chris Kacher (O'Neil's disciples). Designed to find buy points in bases and continuation buy points in an uptrend. The volume today must be greater then the maximum down volume of the past 10 trading days. Recommended to use in conjunction with the 10 day and/or 50 day moving average.
Typical use :
Scan for pocket pivots.
Is stock strong fundamentally? i.e- leader in it's sector
Has the stock developed a base ?(see O'Neil's work for base discussion)
Is the stock breaking through or bouncing off the 10 period sma? (can use 50 sma too)
If so.. a possible buy.
Cheers
David
Wyszukaj w skryptach "腾讯10大股东"
PIP HUNTERSCR STOCH RSI SIGNALScript made in combination of Stoch and RSI, made by and for PIPHUNTERS on 03/10/2019
Stoch default values 10-3-3 higher band level 90, lower band level 10
RSI default value 14 color:blue
Simplified SizingEnsure you Uncheck #1 , #2, #3 in the STYLE tab or it draws the lines you only need the numbers for.
The first number is the deviation from the EMA , anything below 1.75 == 1. (less than 0.75 % deviation)
NOTE: The fill area turns yellow @ 1.50 and red above 2.75
There are steps built in to slightly lower share size when specific levels of divergence register:
From 1.75 to 10 , 1 == 1.10 (10% reduction)
From 10 and up, 1 == 1.20 (20% reduction)
The second number is the Average True Range , calculated by the input length (RMA smoothed) and a multiplier (in decimal form).
NOTE: From 930-936 this value is multiplied by 1.5
The third number is the max share size.
The 4th number is the lot price if you take a position at the max size.
INPUTS:
ATR Length
EMA Length for divergence calculation
ATR Multiplier (0.1 - 10)
Equity in account
Max loss per trade.
Good Luck!
Ultimate Moving Average Package (17 MA's)Included is the:
VWAP
Current time frame 10 EMA
Current time frame 20 EMA
Current time frame 50 EMA
Current time frame 10 SMA
Current time frame 20 SMA
Current time frame 50 SMA
Daily 10 EMA
Daily 20 EMA
Daily 50 EMA
Daily 50 SMA
Daily 100 SMA
Daily 200 SMA
Weekly 100 SMA
Weekly 200 SMA
Monthly 100 SMA
Monthly 200 SMA
All Daily/Weekly/Monthly MA's can be seen on intraday charts. Current time frame MA's change depending on your time frame. Obviously you dont need all 17 on your chart but you can pick the ones you like and disable the rest.
A.I.Driven Aggressive Intraday Models For 20190610(New to TradingView and trying to learn how best to share our daily Model Trades with the awesome community here. Still learning the tools here and may not be using the best approaches to publish ideas/charts/scirpts - please help us learn by suggesting best practices)
>>>>> Model Trades Published pre-market this morning at tradersai blogspot <<<<<
***** Medium-Frequency Models*****: For today, Monday 06/10, our medium-frequency models indicate going long on a break above 2903 with a 10-point trailing stop, and going short on a break below 2845 with an 8-point trailing stop.
---Note: For the trades to trigger, the breaks should occur during the regular session hours starting at 9:30am ET. By design, these models do NOT open any new positions after 3:45pm. Only one open position at any given time.---
***** Aggressive Intraday Models *****: For today, Monday 06/10, our aggressive intraday models indicate going long on a break above 2895 or 2886 or 2874 with an 8-point trailing stop, and going short on a break below 2890 or 2882 or 2870 with a 6-point trailing stop.
---- Note: For the trades to trigger, the breaks should occur during regular session hours starting at 9:30am ET. Due to the intraday nature of these aggressive models, they indicate closing any open trades at 3:55pm and remaining flat into the session close. No opening of new positions after 3:45pm. Only one open position at any given time.----
Moving Gain Loss PercentTracks the percentage gain/loss in three ranges:
single candle (can be turned on or off)
custom range of candles
custom range of candles
For example, with a range of 3 candles, and the serie:
1 - close 10
2 - close 5
3 - close 20
The moving gain would be:
1 - close 10 - gain 10, infinite%
2 - close 5 - gain 5, infinite%
3 - close 18 - gain 8, 80%
Or, for example if the range is 12 candles on a monthly chart, then the result is the Year-To-Date gain/loss plotted as a percentage.
Sexy RSI for sexy tradersHello fellow sexy traders.
I was tired of constantly having to add my own horizontals/MAs to the default RSI so I decided to make this modification.
The default settings include channels from 40-80 (green horizontals) for a bullish range, and 20-60 (red horizontals) for the bearish range.
Also includes white line at 50 level, and blue horizontals at extremes (90 and 10).
If RSI stays in one of the red or green range that can signify the trend direction, as directed by Andrew Cardwell (inventor of the RSI).
If you wish for other levels to be included, just let me know! Comment on here or dm me on twitter @boss_charts and I can add the settings for you, so all you have to do is click a button and it will set it to your desired config. I want this to be a tool that is useful for heavy traders to save them time.
Additionally, in order to tell the level of the RSI and how overextended it might be, I added the setting for the RSI to change color depending on its level. Current settings are as follows:
Normal RSI (30-70) = PURPLE
Conventional Overbought/Oversold (30-20 + 70-80) = RED
1st extended (20-15 + 80-85) = PINK
2nd extended (15-10 + 85-90) = ORANGE
VERY EXTENDED (<10 + >90) = YELLOW
That way you can get an idea of how drastic a move is by the color alone. According to Dr. Cardwell, a drastic move to over/under extended can be a sign of strength.
Finally, there are the default MAs added that Mr. Cardwell defines as useful for defining the trend. These being the 9 MA and 45 EMA/WMA.
The strategy with these is to have the MAs on both price and RSI. If the 9MA is above the 45 MA on both price and RSI, then this is bullish and you can look for longs.
Conversely, if the 9 is below the 45 on both RSI and price that is bearish, and you can look for shorts.
I added the background color change for the points where the MAs cross each other, so you do not have to have the MAs fogging up your charts to know where they are relative to one another. This is similar to my MA cross indicator which contains the same functionality.
Never financial advice. Backtest it for yourself and find MA configurations that work for you.
Enjoy! Feel free to send feedback/requests whenever.
Multi SMA EMA WMA HMA BB (5x8 MAs Bollinger Bands) MAX MTF - RRBMulti SMA EMA WMA HMA 4x7 Moving Averages with Bollinger Bands MAX MTF by RagingRocketBull 2019
Version 1.0
All available MAX MTF versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: 4x7 = 28 MTF MAs + 28 Levels + 3 BB = 59 < 64
ver 2.0: 5x6 = 30 MTF MAs + 30 Levels + 3 BB = 63 < 64
ver 3.0: 3x10 = 30 MTF MAs + 30 Levels + 3 BB = 63 < 64
ver 4.0: 5(4+1)x8 = 8 CurTF MAs + 32 MTF MAs + 20 Levels + 3 BB = 63 < 64
ver 5.0: 6(5+1)x6 = 6 CurTF MAs + 30 MTF MAs + 24 Levels + 3 BB = 63 < 64
ver 6.0: 4(3+1)x10 = 10 CurTF MAs + 30 MTF MAs + 20 Levels + 3 BB = 63 < 64
Fib numbers: 8, 13, 21, 34, 55, 89, 144, 233, 377
This indicator shows multiple MAs of any type SMA EMA WMA HMA etc with BB and MTF support, can show MAs as dynamically moving levels.
There are 4 MA groups + 1 BB group, a total of 4 TFs * 7 MAs = 28 MAs. You can assign any type/timeframe combo to a group, for example:
- EMAs 9,12,26,50,100,200,400 x H1, H4, D1, W1 (4 TFs x 7 MAs x 1 type)
- EMAs 8,13,21,30,34,50,55,89,100,144,200,233,377,400 x M15, H1 (2 TFs x 14 MAs x 1 type)
- D1 EMAs and SMAs 8,13,21,30,34,50,55,89,100,144,200,233,377,400 (1 TF x 14 MAs x 2 types)
- H1 WMAs 13,21,34,55,89,144,233; H4 HMAs 9,12,26,50,100,200,400; D1 EMAs 12,26,89,144,169,233,377; W1 SMAs 9,12,26,50,100,200,400 (4 TFs x 7 MAs x 4 types)
- +1 extra MA type/timeframe for BB
There are several versions: Simple, MTF, Pro MTF, Advanced MTF, MAX MTF and Ultimate MTF. This is the MAX MTF version. The Differences are listed below. All versions have BB
- Simple: you have 2 groups of MAs that can be assigned any type (5+5)
- MTF: +2 custom Timeframes for each group (2x5 MTF) +1 TF for BB, TF XY smoothing
- Pro MTF: 4 custom Timeframes for each group (4x3 MTF), 1 TF for BB, MA levels and show max bars back options
- Advanced MTF: +4 extra MAs/group (4x7 MTF), custom Ticker/Symbols, Timeframe <>= filter, Remove Duplicates Option
- MAX MTF: +2 subtypes/group, packed to the limit with max possible MAs/TFs: 4x7, 5x6, 3x10, 4(3+1)x10, 5(4+1)x8, 6(5+1)x6
- Ultimate MTF: +individual settings for each MA, custom Ticker/Symbols
MAX MTF version tests the limits of Pinescript trying to squeeze as many MAs/TFs as possible into a single indicator.
It's basically a maxed out Advanced version with subtypes allowing for mixed types within a group (i.e. both emas and smas in a single group/TF)
Pinescript has the following limits:
- max 40 security calls (6 calls are reserved for dupe checks and smoothing, 2 are used for BB, so only 32 calls are available)
- max 64 plot outputs (BB uses 3 outputs, so only 61 plot outputs are available)
- max 50000 (50kb) size of the compiled code
Based on those limits, you can only have the following MAs/TFs combos in a single script:
1. 4x7, 5x6, 3x10 - total number of MTF MAs must always be <= 32, and you can still have BB and Num Levels = total MAs, without any compromises
2. 5(4+1)x8, 6(5+1)x6, 4(3+1)x10 - you can use the Current Symbol/Timeframe as an extra (+1) fixed TF with the same number of MTF MAs
- you don't need to call security to display MAs on the Current Symbol/Timeframe, so the total number of MTF MAs remains the same and is still <= 32
- to fit that many MAs into the max 64 plot outputs limit you need to reduce the number of levels (not every MA Group will have corresponding levels)
Features:
- 4x7 = 28 MAs of any type
- 4x MTF groups with XY step line smoothing
- +1 extra TF/type for BB MAs
- 2 MA subtypes within each group/TF
- 4x7 = 28 MA levels with adjustable group offsets, indents and shift
- supports any existing type of MA: SMA, EMA, WMA, Hull Moving Average (HMA)
- custom tickers/symbols for each group
- show max bars back option
- show/hide both groups of MAs/levels/BB and individual MAs
- timeframe filter: show only MAs/Levels with TFs <>= Current TF
- hide MAs/Levels with duplicate TFs
- support for custom TFs that are not available in free accounts: 2D, 3D etc
- support for timeframes in H: H, 2H, 4H etc
Notes:
- Uses timeframe textbox instead of input resolution dropdown to allow for 240 120 and other custom TFs
- Uses symbol textbox instead of input symbol to avoid establishing multiple dummy security connections to the current ticker - otherwise empty symbols will prevent script from running
- Possible reasons for missing MAs on a chart:
- there may not be enough bars in history to start plotting it. For example, W1 EMA200 needs at least 200 bars on a weekly chart.
- for charts with low/fractional prices i.e. 0.00002 << 0.001 (default Y smoothing step) decrease Y smoothing as needed (set Y = 0.0000001) or disable it completely (set X,Y to 0,0)
- for charts with high price values i.e. 20000 >> 0.001 increase Y smoothing as needed (set Y = 10-20). Higher values exceeding MAs point density will cause it to disappear as there will be no points to plot. Different TFs may require diff adjustments
- TradingView Replay Mode UI and Pinescript security calls are limited to TFs >= D (D,2D,W,MN...) for free accounts
- attempting to plot any TF < D1 in Replay Mode will only result in straight lines, but all TFs will work properly in history and real-time modes. This is not a bug.
- Max Bars Back (num_bars) is limited to 5000 for free accounts (10000 for paid), will show error when exceeded. To plot on all available history set to 0 (default)
- Slow load/redraw times. This indicator becomes slower, its UI less responsive when:
- Pinescript Node.js graphics library is too slow and inefficient at plotting bars/objects in a browser window. Code optimization doesn't help much - the graphics engine is the main reason for general slowness.
- the chart has a long history (10000+ bars) in a browser's cache (you have scrolled back a couple of screens in a max zoom mode).
- Reload the page/Load a fresh chart and then apply the indicator or
- Switch to another Timeframe (old TF history will still remain in cache and that TF will be slow)
- in max possible zoom mode around 4500 bars can fit on 1 screen - this also slows down responsiveness. Reset Zoom level
- initial load and redraw times after a param change in UI also depend on TF. For example: D1/W1 - 2 sec, H1/H4 - 5-6 sec, M30 - 10 sec, M15/M5 - 4 sec, M1 - 5 sec. M30 usually has the longest history (up to 16000 bars) and W1 - the shortest (1000 bars).
- when indicator uses more MAs (plots) and timeframes it will redraw slower. Seems that up to 5 Timeframes is acceptable, but 6+ Timeframes can become very slow.
- show_last=last_bars plot limit doesn't affect load/redraw times, so it was removed from MA plot
- Max Bars Back (num_bars) default/custom set UI value doesn't seem to affect load/redraw times
- In max zoom mode all dynamic levels disappear (they behave like text)
- Dupe check includes symbol: symbol, tf, both subtypes - all must match for a duplicate group
- For the dupe check to work correctly a custom symbol must always include an exchange prefix. BB is not checked for dupes
Good Luck! Feel free to learn from/reuse the code to build your own indicators.
APEX - WaveTrend [v1]WaveTrend is a smoothed oscillator which enables it to detect true reversals in an extremely accurate manner. The beauty of this indicator is that does not generate signals during choppy sideways markets.
The basic settings are 10 / 3 / 4 these are very aggressive settings, that will generate a lot of signals in all even not so volatile markets. If you need high-quality signals you settings close to 10 / 3 /21. The strongest buy/sell signals are given when the cross occurs above or below the threshold. In the 10 / 3 / 4 you threshold for buy should be around -90 values. If you use the very smoothed variant the threshold will be around -45 to -50 values.
This indicator will be first available in APEX v1 currently being beta tested.
Schaff Trend Cycle 1.1 with signal codingThis is an edit of Lazy Bear's Schaff Trend Cycle original description here. I've added in the syntax so that you can generate an alert when it crosses the threshold in either direction. Just tick the box to show threshold crosses.
More background on the indicator is here.
www.investopedia.com
Other common settings are fast 23 slow 53 or 10/30, 3/10. I have also set it to 9/20 for test purposes. They have different pluses and minuses on different timeframes.
Double EMA & ALMA StrategyThe ALMA (50 period) acts as the main trend filter, meaning that long positions are taken above the ALMA and short positions are taken below the ALMA. For instance, the 5 and 10 period exponential moving averages are added on the chart to give early signals to the trend.
Therefore, when the 5/10 EMA triggers a bullish crossover, long signals are taken when price is above the ALMA, likewise, when the 5/10 EMA triggers a bearish crossover, short signals are taken when price is below the ALMA.
Find out optimal values by trying. May not produce accurate results in horizontal markets. Thank you.
Inverted Yield Curve with VIX Fear IndexUS 2 year and US 10 year comparison, inverted yield curve with VIX. I use this on a weekly chart with 2 moving averages, the 40 week (ma200 daily) and the 520 week (10 year median).
The bottom histogram is the VIX and the plot is the yield curve. When the VIX is above a certain level (you can set it in settings) and the ýield curve is close to or at inversion the background goes red.
The last seven recessions were preceded by an inverted yield curve. Here I combined the two main fear indexes, the VIX and the run for safe US treasuries (Inverted Yield Curve).
This is preset to the 2 year and 10 year US bond, weekly, and the normal VIX ticker but you can set it to whatever you like.
Published with source code for anyone to modify. Please comment below if you do so! This is the second in a series of indicators I intend to publish as a package of economic recoverty/recession symptom indicators.
Follow me for updates, next one up is commodities with dr Copper and oil!
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.
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.
Market Pressure Oscillator█ OVERVIEW
The Market Pressure Oscillator is an advanced technical indicator for TradingView, enabling traders to identify potential trend reversals and momentum shifts through candle-based pressure analysis and divergence detection. It combines a smoothed oscillator with moving average signals, overbought/oversold levels, and divergence visualization, enhanced by customizable gradients, dynamic band colors, and alerts for quick decision-making.
█ CONCEPT
The indicator measures buying or selling pressure based on candle body size (open-to-close difference) and direction, with optional smoothing for clarity and divergence detection between price action and the oscillator. It relies solely on candle data, offering insights into trend strength, overbought/oversold conditions, and potential reversals with a customizable visual presentation.
█ WHY USE IT?
- Divergence Detection: Identifies bullish and bearish divergences to reinforce signals, especially near overbought/oversold zones.
- Candle Pressure Analysis: Measures pressure based on candle body size, normalized to a ±100 scale.
- Signal Generation: Provides buy/sell signals via overbought/oversold crossovers, zero-line crossovers, moving average zero-line crossovers, and dynamic band color changes.
- Visual Clarity: Uses dynamic colors, gradients, and fill layers for intuitive chart analysis.
Flexibility: Extensive settings allow customization to individual trading preferences.
█ HOW IT WORKS?
- Candle Pressure Calculation: Computes candle body size as math.abs(close - open), normalized against the average body size over a lookback period (avgBody = ta.sma(body, len)). - Candle direction (bullish: +1, bearish: -1, neutral: 0) is multiplied by body weight to derive pressure.
- Cumulative Pressure: Sums pressure values over the lookback period (Lookback Length) and normalizes to ±100 relative to the maximum possible value.
- Smoothing: Optionally applies EMA (Smoothing Length) to normalized pressure.
- Moving Average: Calculates SMA (Moving Average Length) for trend confirmation (Moving Average (SMA)).
- Divergence Detection: Identifies bullish/bearish divergences by comparing price and oscillator pivot highs/lows within a specified range (Pivot Length). Divergence signals appear with a delay equal to the Pivot Length.
- Signals: Generates signals for:
Crossing oversold upward (buy) or overbought downward (sell).
Crossing the zero line by the oscillator or moving average (buy/sell).
Bullish/bearish divergences, marked with labels, enhancing signals, especially near overbought/oversold zones.
Dynamic band color changes when the moving average crosses MA overbought/oversold thresholds (green for oversold, red for overbought).
- Visualization: Plots the oscillator and moving average with dynamic colors, gradient fills, transparent bands, and labels, with customizable overbought/oversold levels.
Alerts: Built-in alerts for divergences, overbought/oversold crossovers, and zero-line crossovers (oscillator and moving average).
█ SETTINGS AND CUSTOMIZATION
- Lookback Length: Period for aggregating candle pressure (default: 14).
- Smoothing Length (EMA): EMA length for smoothing the oscillator (default: 1). Higher values smooth the signal but may reduce signal frequency; adjust overbought/oversold levels accordingly.
- Moving Average Length (SMA): SMA length for the moving average (default: 14, minval=1). Higher values make SMA a trend indicator, requiring adjusted MA overbought/oversold levels.
- Pivot Length (Left/Right): Candles for detecting pivot highs/lows in divergence calculations (default: 2, minval=1). Higher values reduce noise but add delay equal to the set value.
- Enable Divergence Detection: Enables divergence detection (default: true).
- Overbought/Oversold Levels: Thresholds for the oscillator (default: 30/-30) and moving average (default: 10/-10). For the moving average, no arrows appear; bands change color from gray to green (oversold) or red (overbought), reinforcing entry signals.
- Signal Type: Select signals to display: "None", "Overbought/Oversold", "Zero Line", "MA Zero Line", "All" (default: "Overbought/Oversold").
- Colors and Gradients: Customize colors for bullish/bearish oscillator, moving average, zero line, overbought/oversold levels, and divergence labels.
- Transparency: Adjust gradient fill transparency (default: 70, minval=0, maxval=100) and band/label transparency (default: 40, minval=0, maxval=100) for consistent visuals.
- Visualizations: Enable/disable moving average, gradients for zero/overbought/oversold levels, and gradient fills.
█ USAGE EXAMPLES
- Momentum Analysis: Observe the MPO Oscillator above 0 for bullish momentum or below 0 for bearish momentum. The SMA, being smoother, reacts slower and can confirm trend direction as a noise filter.
- Reversal Signals: Look for buy triangles when the oscillator crosses oversold upward, especially when the SMA is below the MA oversold threshold and the band turns green. Similarly, seek sell triangles when crossing overbought downward, with the SMA above the MA overbought threshold and the band turning red.
- Using Divergences: Treat bullish (green labels) and bearish (red labels) divergences as reinforcement for other signals, especially near overbought/oversold zones, indicating stronger potential trend reversals.
- Customization: Adjust lookback length, smoothing, and moving average length to specific instruments and timeframes to minimize false signals.
█ USER NOTES
Combine the indicator with tools like Fibonacci levels or pivot points to enhance accuracy.
Test different settings for lookback length, smoothing, and moving average length on your chosen instrument and timeframe to find optimal values.
TA█ TA Library
📊 OVERVIEW
TA is a Pine Script technical analysis library. This library provides 25+ moving averages and smoothing filters , from classic SMA/EMA to Kalman Filters and adaptive algorithms, implemented based on academic research.
🎯 Core Features
Academic Based - Algorithms follow original papers and formulas
Performance Optimized - Pre-calculated constants for faster response
Unified Interface - Consistent function design
Research Based - Integrates technical analysis research
🎯 CONCEPTS
Library Design Philosophy
This technical analysis library focuses on providing:
Academic Foundation
Algorithms based on published research papers and academic standards
Implementations that follow original mathematical formulations
Clear documentation with research references
Developer Experience
Unified interface design for consistent usage patterns
Pre-calculated constants for optimal performance
Comprehensive function collection to reduce development time
Single import statement for immediate access to all functions
Each indicator encapsulated as a simple function call - one line of code simplifies complexity
Technical Excellence
25+ carefully implemented moving averages and filters
Support for advanced algorithms like Kalman Filter and MAMA/FAMA
Optimized code structure for maintainability and reliability
Regular updates incorporating latest research developments
🚀 USING THIS LIBRARY
Import Library
//@version=6
import DCAUT/TA/1 as dta
indicator("Advanced Technical Analysis", overlay=true)
Basic Usage Example
// Classic moving average combination
ema20 = ta.ema(close, 20)
kama20 = dta.kama(close, 20)
plot(ema20, "EMA20", color.red, 2)
plot(kama20, "KAMA20", color.green, 2)
Advanced Trading System
// Adaptive moving average system
kama = dta.kama(close, 20, 2, 30)
= dta.mamaFama(close, 0.5, 0.05)
// Trend confirmation and entry signals
bullTrend = kama > kama and mamaValue > famaValue
bearTrend = kama < kama and mamaValue < famaValue
longSignal = ta.crossover(close, kama) and bullTrend
shortSignal = ta.crossunder(close, kama) and bearTrend
plot(kama, "KAMA", color.blue, 3)
plot(mamaValue, "MAMA", color.orange, 2)
plot(famaValue, "FAMA", color.purple, 2)
plotshape(longSignal, "Buy", shape.triangleup, location.belowbar, color.green)
plotshape(shortSignal, "Sell", shape.triangledown, location.abovebar, color.red)
📋 FUNCTIONS REFERENCE
ewma(source, alpha)
Calculates the Exponentially Weighted Moving Average with dynamic alpha parameter.
Parameters:
source (series float) : Series of values to process.
alpha (series float) : The smoothing parameter of the filter.
Returns: (float) The exponentially weighted moving average value.
dema(source, length)
Calculates the Double Exponential Moving Average (DEMA) of a given data series.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the moving average calculation.
Returns: (float) The calculated Double Exponential Moving Average value.
tema(source, length)
Calculates the Triple Exponential Moving Average (TEMA) of a given data series.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the moving average calculation.
Returns: (float) The calculated Triple Exponential Moving Average value.
zlema(source, length)
Calculates the Zero-Lag Exponential Moving Average (ZLEMA) of a given data series. This indicator attempts to eliminate the lag inherent in all moving averages.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the moving average calculation.
Returns: (float) The calculated Zero-Lag Exponential Moving Average value.
tma(source, length)
Calculates the Triangular Moving Average (TMA) of a given data series. TMA is a double-smoothed simple moving average that reduces noise.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the moving average calculation.
Returns: (float) The calculated Triangular Moving Average value.
frama(source, length)
Calculates the Fractal Adaptive Moving Average (FRAMA) of a given data series. FRAMA adapts its smoothing factor based on fractal geometry to reduce lag. Developed by John Ehlers.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the moving average calculation.
Returns: (float) The calculated Fractal Adaptive Moving Average value.
kama(source, length, fastLength, slowLength)
Calculates Kaufman's Adaptive Moving Average (KAMA) of a given data series. KAMA adjusts its smoothing based on market efficiency ratio. Developed by Perry J. Kaufman.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the efficiency calculation.
fastLength (simple int) : Fast EMA length for smoothing calculation. Optional. Default is 2.
slowLength (simple int) : Slow EMA length for smoothing calculation. Optional. Default is 30.
Returns: (float) The calculated Kaufman's Adaptive Moving Average value.
t3(source, length, volumeFactor)
Calculates the Tilson Moving Average (T3) of a given data series. T3 is a triple-smoothed exponential moving average with improved lag characteristics. Developed by Tim Tillson.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the moving average calculation.
volumeFactor (simple float) : Volume factor affecting responsiveness. Optional. Default is 0.7.
Returns: (float) The calculated Tilson Moving Average value.
ultimateSmoother(source, length)
Calculates the Ultimate Smoother of a given data series. Uses advanced filtering techniques to reduce noise while maintaining responsiveness. Based on digital signal processing principles by John Ehlers.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the smoothing calculation.
Returns: (float) The calculated Ultimate Smoother value.
kalmanFilter(source, processNoise, measurementNoise)
Calculates the Kalman Filter of a given data series. Optimal estimation algorithm that estimates true value from noisy observations. Based on the Kalman Filter algorithm developed by Rudolf Kalman (1960).
Parameters:
source (series float) : Series of values to process.
processNoise (simple float) : Process noise variance (Q). Controls adaptation speed. Optional. Default is 0.05.
measurementNoise (simple float) : Measurement noise variance (R). Controls smoothing. Optional. Default is 1.0.
Returns: (float) The calculated Kalman Filter value.
mcginleyDynamic(source, length)
Calculates the McGinley Dynamic of a given data series. McGinley Dynamic is an adaptive moving average that adjusts to market speed changes. Developed by John R. McGinley Jr.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the dynamic calculation.
Returns: (float) The calculated McGinley Dynamic value.
mama(source, fastLimit, slowLimit)
Calculates the Mesa Adaptive Moving Average (MAMA) of a given data series. MAMA uses Hilbert Transform Discriminator to adapt to market cycles dynamically. Developed by John F. Ehlers.
Parameters:
source (series float) : Series of values to process.
fastLimit (simple float) : Maximum alpha (responsiveness). Optional. Default is 0.5.
slowLimit (simple float) : Minimum alpha (smoothing). Optional. Default is 0.05.
Returns: (float) The calculated Mesa Adaptive Moving Average value.
fama(source, fastLimit, slowLimit)
Calculates the Following Adaptive Moving Average (FAMA) of a given data series. FAMA follows MAMA with reduced responsiveness for crossover signals. Developed by John F. Ehlers.
Parameters:
source (series float) : Series of values to process.
fastLimit (simple float) : Maximum alpha (responsiveness). Optional. Default is 0.5.
slowLimit (simple float) : Minimum alpha (smoothing). Optional. Default is 0.05.
Returns: (float) The calculated Following Adaptive Moving Average value.
mamaFama(source, fastLimit, slowLimit)
Calculates Mesa Adaptive Moving Average (MAMA) and Following Adaptive Moving Average (FAMA).
Parameters:
source (series float) : Series of values to process.
fastLimit (simple float) : Maximum alpha (responsiveness). Optional. Default is 0.5.
slowLimit (simple float) : Minimum alpha (smoothing). Optional. Default is 0.05.
Returns: ( ) Tuple containing values.
laguerreFilter(source, length, gamma, order)
Calculates the standard N-order Laguerre Filter of a given data series. Standard Laguerre Filter uses uniform weighting across all polynomial terms. Developed by John F. Ehlers.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Length for UltimateSmoother preprocessing.
gamma (simple float) : Feedback coefficient (0-1). Lower values reduce lag. Optional. Default is 0.8.
order (simple int) : The order of the Laguerre filter (1-10). Higher order increases lag. Optional. Default is 8.
Returns: (float) The calculated standard Laguerre Filter value.
laguerreBinomialFilter(source, length, gamma)
Calculates the Laguerre Binomial Filter of a given data series. Uses 6-pole feedback with binomial weighting coefficients. Developed by John F. Ehlers.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Length for UltimateSmoother preprocessing.
gamma (simple float) : Feedback coefficient (0-1). Lower values reduce lag. Optional. Default is 0.5.
Returns: (float) The calculated Laguerre Binomial Filter value.
superSmoother(source, length)
Calculates the Super Smoother of a given data series. SuperSmoother is a second-order Butterworth filter from aerospace technology. Developed by John F. Ehlers.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Period for the filter calculation.
Returns: (float) The calculated Super Smoother value.
rangeFilter(source, length, multiplier)
Calculates the Range Filter of a given data series. Range Filter reduces noise by filtering price movements within a dynamic range.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the average range calculation.
multiplier (simple float) : Multiplier for the smooth range. Higher values increase filtering. Optional. Default is 2.618.
Returns: ( ) Tuple containing filtered value, trend direction, upper band, and lower band.
qqe(source, rsiLength, rsiSmooth, qqeFactor)
Calculates the Quantitative Qualitative Estimation (QQE) of a given data series. QQE is an improved RSI that reduces noise and provides smoother signals. Developed by Igor Livshin.
Parameters:
source (series float) : Series of values to process.
rsiLength (simple int) : Number of bars for the RSI calculation. Optional. Default is 14.
rsiSmooth (simple int) : Number of bars for smoothing the RSI. Optional. Default is 5.
qqeFactor (simple float) : QQE factor for volatility band width. Optional. Default is 4.236.
Returns: ( ) Tuple containing smoothed RSI and QQE trend line.
sslChannel(source, length)
Calculates the Semaphore Signal Level (SSL) Channel of a given data series. SSL Channel provides clear trend signals using moving averages of high and low prices.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the moving average calculation.
Returns: ( ) Tuple containing SSL Up and SSL Down lines.
ma(source, length, maType)
Calculates a Moving Average based on the specified type. Universal interface supporting all moving average algorithms.
Parameters:
source (series float) : Series of values to process.
length (simple int) : Number of bars for the moving average calculation.
maType (simple MaType) : Type of moving average to calculate. Optional. Default is SMA.
Returns: (float) The calculated moving average value based on the specified type.
atr(length, maType)
Calculates the Average True Range (ATR) using the specified moving average type. Developed by J. Welles Wilder Jr.
Parameters:
length (simple int) : Number of bars for the ATR calculation.
maType (simple MaType) : Type of moving average to use for smoothing. Optional. Default is RMA.
Returns: (float) The calculated Average True Range value.
macd(source, fastLength, slowLength, signalLength, maType, signalMaType)
Calculates the Moving Average Convergence Divergence (MACD) with customizable MA types. Developed by Gerald Appel.
Parameters:
source (series float) : Series of values to process.
fastLength (simple int) : Period for the fast moving average.
slowLength (simple int) : Period for the slow moving average.
signalLength (simple int) : Period for the signal line moving average.
maType (simple MaType) : Type of moving average for main MACD calculation. Optional. Default is EMA.
signalMaType (simple MaType) : Type of moving average for signal line calculation. Optional. Default is EMA.
Returns: ( ) Tuple containing MACD line, signal line, and histogram values.
dmao(source, fastLength, slowLength, maType)
Calculates the Dual Moving Average Oscillator (DMAO) of a given data series. Uses the same algorithm as the Percentage Price Oscillator (PPO), but can be applied to any data series.
Parameters:
source (series float) : Series of values to process.
fastLength (simple int) : Period for the fast moving average.
slowLength (simple int) : Period for the slow moving average.
maType (simple MaType) : Type of moving average to use for both calculations. Optional. Default is EMA.
Returns: (float) The calculated Dual Moving Average Oscillator value as a percentage.
continuationIndex(source, length, gamma, order)
Calculates the Continuation Index of a given data series. The index represents the Inverse Fisher Transform of the normalized difference between an UltimateSmoother and an N-order Laguerre filter. Developed by John F. Ehlers, published in TASC 2025.09.
Parameters:
source (series float) : Series of values to process.
length (simple int) : The calculation length.
gamma (simple float) : Controls the phase response of the Laguerre filter. Optional. Default is 0.8.
order (simple int) : The order of the Laguerre filter (1-10). Optional. Default is 8.
Returns: (float) The calculated Continuation Index value.
📚 RELEASE NOTES
v1.0 (2025.09.24)
✅ 25+ technical analysis functions
✅ Complete adaptive moving average series (KAMA, FRAMA, MAMA/FAMA)
✅ Advanced signal processing filters (Kalman, Laguerre, SuperSmoother, UltimateSmoother)
✅ Performance optimized with pre-calculated constants and efficient algorithms
✅ Unified function interface design following TradingView best practices
✅ Comprehensive moving average collection (DEMA, TEMA, ZLEMA, T3, etc.)
✅ Volatility and trend detection tools (QQE, SSL Channel, Range Filter)
✅ Continuation Index - Latest research from TASC 2025.09
✅ MACD and ATR calculations supporting multiple moving average types
✅ Dual Moving Average Oscillator (DMAO) for arbitrary data series analysis