[LunaOwl] 11 kinds of Adaptive MA Model作品: 11種自適應性平滑模型
It integrates eleven kinds of adaptive moving average method. At first, I just wanted to make a ATR. Later, the price series ±N*ATR mult, to form two series. Then use the concept of support/resistance breakthrough to design it, and then two adaptive series formation channels were formed. Take the average of the two series as the signal. When the price crosses the signal, it's judged to be long or short.
整合了十一種能夠自適應性的移動平均模型。起初只是想要做一個基本款ATR指標,後來將價格加減N個ATR倍數,形成兩條序列形成通道,再使用支撐阻力突破的概念去設計它,再形成兩條自適應性的序列形成通道,再取中間值當成信號。當價格與信號交叉,則判斷作多或者作空。
--------------------------*
Parameter 設置參數
Resolution: The default is "the same as the variety". Is a named constant for resolution input type of input function.
商品分辨率:預設與品種相同。是input函數的時間周期輸入類型的命名常量。
Smoothing: The default is Recursive Moving Average(RMA). It can choose other methods, the table is as follows.
平滑類型:預設是「遞回平均」,可以選擇其它方法,列表如下。
列表 / The table of moving averages is as follows:
//****中英對照表*****##______________________________________
1. 遞回平均 || Recursive Moving Average
2. 簡單平均 || Simple Moving Average
3. 指數平均 || Exponential Moving Average
4. 加權平均 || Weighted Moving Average
5. 船體平均 || Hull Moving Average
6. 成交量加權 || Volume Weighted Moving Average
7. 對稱加權 || Symmetric Weighted Moving Average
8. 雙重指數 || Double Exponential Moving Average
9. 三重指數 || Triple Exponential Moving Average
10. 高斯分佈 || Arnaud Legoux Moving Average
11. 提爾森T3 || Tillson T3 Moving Average
//##_________________________________________________________
Candle Mode: There are three versions, original, two-color and four-color.
燭台模式:預設模式只區分趨勢,可以改成原版蠟燭或四種顏色版本。
Length: The default is 14, usually no need to adjust.
平滑期數:預設值是14,基本上不用理它。
Occurrence: The default is 1. The range is 0~10. The larger the value, the more delayed. If zero will become too sensitive and noise.
滯後性:預設值是1。調整範圍是0~10,數值愈大信號愈延遲,如果值為0,會變得過於敏捷,那將會失去平滑的意義。
N multiple: The default is 0.618, can be set to 1. The range is 0.382~3.000.
倍數N:預設值是0.618,也可以設定1,最低是0.382,最大是3。
--------------------------*
1. Candle Mode can set the original candle, cancel candle trend color changes. However, the background will still be filled.
可以設定顯示原版的蠟燭線,背景與線並不會消失。
2. Four-color version of candles. It shows changes in trends and prices.
四色版本的蠟燭線,可以顯示趨勢與每日收盤價的變化。
애버리지 트루 레인지 (ATR)
Hikkake PatternLifted description from web:
Hikkake means to trap, trick, or ensnare. Primarily, this price pattern seeks to identify inside bar breakouts and profit from their failures.
An inside bar is a price bar that is entirely within the range of the preceding price bar. Inside bars are typical on price charts of most timeframes.
While you’ll often find inside bars in congested markets, they also offer a low-risk entry point for price action traders. The contracted range of an inside bar offers a natural tight stop-loss.
Hence, inside bar breakouts seem attractive. However, if you are patient and focus on identifying false breakouts, you might be able to find more reliable trading setups in the form of Hikkakes.
In a nutshell, the Hikkake pattern offers a systematic approach to trading false inside bar breakouts.
As a filter I incorporated VWAP into the code to only trigger Bullish / Bearish signals when price is Above/Below VWAP respectively. The ATR is used to create a Stop buffer (red cross) for the Entry signal ( green dot ). The R1 and R2 (orange squares) are two possible profit targets that are customizable to different Risk multiples based upon the difference between Entry and Stop.
Twin Range Filter Algo@Colinmck used two different ranges to generate signals. Read his release notes to find out what the original script does.
I added one condition which seems to increase performance on 15m BTCUSD as well as 1h BTCUSD and that is ATR with 32 periods being smaller than ATR with 64 periods. I used my script Volatility Optimiser to discover this tendency.
Both buying and selling conditions are same as in @Colinmck's script plus one condition of my own. You can disable my condition.
Target and stop-loss are manually set values in ticks.
Time stop-loss is manually set value in a number of candles. After this number of candles, a position always exits (or should 😇). You can disable it by inserting a very long period. I do not recommend it, because a value of indicator should not be measured in luck and if market starts moving in the direction after 40 periods, the predictive capability of an indicator is questionable.
I used 300/150/17 for 15m BTCUSD chart and 900/30/17 for 1h BTCUSD. I didn't try to optimize any other parameters for these periods.
Since this script relies mostly on volatility for its prediction, I wouldn't recommend using it on its own. Individual approach to the market is recommended. Also, it didn't work on EURUSD when using the same default values and different order management (tp, sl, time sl), so it is probably not as versatile.
Let me know what do you think of this strategy. If you have some ideas about how to make it more reliable, share it in the comments, I might put it to the test. Good luck 🍀
DA. Daily ATR (Pips) (10%)This is the Daily ATR Indicator that convert the ATR value into pips.
This script support the pair that contain JPY.
And show the 10% value of ATR in pips.
ATR Timeframe RangeThis indicator shows the ATR range on the daily or any other timeframe on your current chart. All settings are fully customize-able.
ATRxNIndacator shows price range calculated as previous closing price +/- ATR * multiplier
Setup options: multiplier, average type (RMA, EMA,SMA,WMA), Source and number of point to average
Индикатор показывает диапазон цен рассчитанный как цена предыдущего закрытия +/- ATR * множитель
Настраивается : Множитель, тип усреднения (RMA, EMA,SMA,WMA), Источник и Длина усреднения
ATR Stop Loss LONG/SHORT by melihgulerYou can monitor the stop loss level according to ATR in 2 ways (Long/Short).
ATR_bandCreates lower and upper band on BTCUSD chart based on ATR value of the previous day and daily open of the current day
Position Size CalculatorPosition Size Calculator
To calculate stop loss in pips, you can use my other indicator ATR pips
Average True Range % of PriceThis script easily shows in an indicator window the Average True Range % of Price, which helps people understand the volatility of an asset in % terms defined by custom MA periods for custom ATR periods.
The MA Period gives the average price.
The ATR Period gives the average range.
The Average Range / Average Price = Average Range % of Price.
Understanding the volatility of an asset can help people manage risk e.g. if an asset has a low entry cost, but very high volatility it may be more risky than another asset with a high entry cost, but much lower volatility.
ATR Trailing Stop by ceyhunSame coding only coloring and information panel was added.
CDC ATR Trailing Stop V2.1 (2013)
//Barcolor
Green = Trail1 > Trail2 and close > Trail2 and low > Trail2
Blue = Trail1 > Trail2 and close > Trail2 and low < Trail2
Red = Trail2 > Trail1 and close < Trail2 and high < Trail2
Yellow = Trail2 > Trail1 and close < Trail2 and high > Trail2
//It gives White color where there is deterioration.
//InfoPanel
Buy Price = Blue draws the circles at the purchase price.
Profit Long>20 = Risk level taken as a percentage, I got the highest 20%, you can determine as you wish.
Sell Price = Red draws the circles at the purchase price.
Profit Short>20 = Risk level taken as a percentage, I got the highest 20%, you can determine as you wish.
ATR _NormalizedThis script is good to use with Williams %R indicator, to find out when price has bottomed out.
ATR has to be over 90 and Williams %R ( lenght 52 ) has to be over 95 to find out level around which one is good to buy.
You can check back, to see that this worked very well over history. Best way to use this 2 indicators is with DCA ( dollar cost average ), as area where to buy can go a little bit down and up for as long as few months. So dont just jump in, use DCA .
TrenderTrender is a popular trailing stop indicator on the Bloomberg system and since I didn't have source code to work with, this is a close approximation of that indicator. Let me know if you spot any discrepancies and I will adjust accordingly.
This indicator is a trailing stop system along with a trend confirmation. When the blue line falls below the black line, that is a confirmation of a down trend and when it rises above the black line, it is a confirmation of an up trend. When the trender line is above the price, then that means the stock is in a general down trend and vice versa. I have color coded the trender line to show you when to buy or sell that stock to keep it easy.
This was a special request so let me know if you want to see more scripts from me or if you want something custom!
Fear And Greed IndicatorThe Fear And Greed Indicator is a very popular indicator on the Bloomberg platform and since I didn't have actual source code to work with, this is a very close approximation of that indicator. Let me know if you spot any discrepancies with the original and I will do my best to fix them.
For buy and sell signals it is pretty straightforward. Just buy when the green (greed) is in control and sell when the fear (red) is in control
This was a special request so let me know if you want to see more scripts from me or if you want something custom!
Fancy Bollinger Bands [BigBitsIO]This script is for a Bollinger Band type indicator with as many features as I can possibly fit into a Bollinger Band type indicator.
Features:
- A single custom moving average serving as the middle band.
- Standard MA inputs.
- MA type.
- MA period.
- MA price.
- MA resolution (time frame).
- Visibility toggle.
- MA Candle Type
- Fancy MA inputs.
- Toggle to show only candles included in the MA calculation ("Highlight inclusion") or display entire MA history.
- Toggle to show a ghost trail when Highlight inclusion is toggled on. Displays a shaded version of past MA history before the inclusion period (as seen on snapshot).
- Toggle to show forecast values for the MA.
- Other inputs related to forecasting:
- Forecast bias. (Neutral forecasts MA if the current price remains the same.)
- Forecast period.
- Forecast magnitude.
- Toggle showing details on the screen
- Toggle the visibility of the fill between the upper and lower bands.
- Toggle to use ATR instead of the standard deviation to calculate the location of the upper and lower bands.
- Custom input for the ATR period.
A couple of quick notes. The label will only show up if toggled on, and will always show above the highest of either the candle high or upper band. The fill colors are based on the level of %B currently on the indicator. Higher levels are green, and brighter green, while lower levels are red and brighter red. The fill is lighter in shadow areas to reflect their status as not being included in the middle band calculation.
*** DISCLAIMER: For educational and entertainment purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto. DYOR, TYOB. ***
Multi Timeframe ATRDisplays the ATR for the hourly, daily, weekly and monthly together in the Data window. Doesn't matter what timeframe you're looking at on the chart.
Note: You need to manually turn off the plot lines as they appear by default.
Dazzling BoltsThis is three moving average based strategy focused on trend-following. Targets and stops are set based on ATR. Following image pictures the strategy with all mas plotted:
Buying conditions are:
►A smoothened moving average (red) is above the exponential moving average (yellow)
►An exponential moving average is above simple moving average (black)
►Low five candles ago was still above the exponential moving average
►Low two candles ago reached below the exponential moving average
►Close of the previous candle was above the exponential moving average
►Ema force is disabled or exponential moving average set candles ago (orange) is still above simple moving average now.
If these conditions are met, Dazzling Bolts will always give you a signal. However, it holds only one position at a time and it will not buy again until it is closed or exited.
There are two ways exiting may happen. Smoothened moving average crosses below simple moving average or it reaches value based on your settings of average true range and its multiplier.
Settings 10/76/200/true/50/true/true/5/5 shows perfect results on EURUSD 15m chart but it does not guarantee the results. It is only 62 trades which is barely a useful statistical source. It is also highly optimized which means its settings filters out bad trades that may be bad only because of randomnation rather than set market behaviour. You need to test it on 200 trades + before using.
Average True Range BandsAverage True Range Bands
The 30-day Average True Range is useful in Futures and Forex trading for placing stop orders for entry.
In the example above, a trader may want to initiate a Short position on a break below the support trendline.
A good place to enter this trade would be a price break below the support trendline minus 50 to 100% of the current ATR value.
ATR Bands provides a useful visual overlay of the current ATR value above and below the current price to speed up order entry decisions.
AverageTrueRangeConvergenceDivergenceV1sloth288Simple indicator with the thought of merging MACD and ATR. The idea has come from trying to find a way to define sideways markets. Whipped this up quickly to explore the idea.
Feel free to throw in suggestions or even mention other open source indicators that define sideways markets well.
Simple instructions
If histogram green, breakouts/trade zone.
If histogram red, sideways/keep out.
Show ATR and 1st hour high+low1. Shows TR at daily bars
2. Shows ATR lines intraday: 100% and 75% (customizable)
3. Shows hint with ATR for current day and percent passed
4. Show high and low of the 1st hour