library TypeMovingAveragesLibrary "TypeMovingAverages"
This library function returns a moving average.
ma_fast
ma_slow
MA_selector()
Example
// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © hapharmonic
//@version=5
indicator("Test MATYPE", overlay=true)
import hapharmonic/TypeMovingAverages/1 as MAType
xprd1 = input(title=' 💉Fast EMA period', defval=12)
ma_select1 = 'EMA'
xprd2 = input(title=' 💉Fast EMA period', defval=26)
ma_select2 = 'EMA'
xsmooth = input.int(title='🏄♂️Smoothing period (1 = no smoothing)', minval=1, defval=1)
ma_fast = MAType.MA_selector(close, xprd1, ma_select1,xsmooth)
ma_slow = MAType.MA_selector(close, xprd2, ma_select2,xsmooth)
plot(ma_fast, "INDICATOR",color.green)
plot(ma_slow, "INDICATOR",color.red)
///////////////////////////////////////////////////////
///////////////////////////////////////////////////////
Of course, you can run these types just by adding options. 'ma_select1 ' and 'ma_select2'
SMA', 'EMA', 'WMA', 'HMA', 'JMA', 'KAMA', 'TMA', 'VAMA', 'SMMA', 'DEMA', 'VMA', 'WWMA', 'EMA_NO_LAG', 'TSF', 'ALMA'
HMA
Moving Average Gradient (MAG) The Moving Average Gradient Indicator uses multiple Moving Averages to create a gradient. It creates continually more faint MAs, filled upwards or downwards to the price at a certain opacity. It can be used efficiently for stocks, forex, crypto, and more. This indicator combines numerous Moving Averages of your choice, a few of which include:
EMA
SMA
WMA
HMA
RMA
DMA
LSMA
VAMA
TMA
MF
Using this indicator will make entries more simple because crossovers and crossovers can more easily be detected, either manually or using alerts. These multiple Moving Averages allow for a smoothed out price trend, and the filtering of irregular and odd short-term price fluctuations. Due to the ample count of price trends that are widely used, it is difficult to view the market through the eyes of all types of investors/traders. This indicator manages to counter exactly that, you will be able to see all existing trends and enter/exit positions accordingly. This indicator can be used with all chart types and works well with many other indicators. It allows for complete customization and offers easy-to-understand settings which can be designated to a certain individual. You can modify every single factor of the MAs which allows for an even more personalized and adapted Indicator that reflects your trading/ investing inquiries. Most importantly, it looks cool.
A few of the technical settings you can change are:
Moving Average Count (Select how many do you want to be displayed.)
Moving Average Type (EMA, SMA, WMA, etc.)
Source (close, open, high, low)
Separate MA Length (The length of each Moving Average, its lookback. How many previous candles should it be based on? Choose each Moving Average's lookback length.)
You can also change the style settings of the indicators like:
Progressive opacity percentage (By how much will the next MAs fill affect the other? 1st: 50%, 3rd: 30%, 4th: 20%, 5th: 10%)
Bullish Candle Color
Bearish Candle Color
This indicator is unique because it can be used for all strategies and all trading styles, for example, day trading or long-term investing, really anything if used correctly. The reason it can be used in so many instances is a result of the detailed and in-depth settings tab. This allows the indicator to be used and to be useful in various situations and allows you to dominate the market. You can either increase the MA length difference by progressively small amounts for day trading and create bigger gaps in the MA length difference for swing trading or long-term investing. Integrated alerts also enhance your efficiency while using this indicator because you can choose to be notified at the crossovers and crossunders of a pair of Moving Averages.
The technical portion of the indicator creates and plots the chosen amount or count of Moving Averages as specified in the settings tab. Then it fills each MA using the selected color and opacity. Afterward, it adapts the moving Averages to use the inputted data from the settings tab and uses it to plot them accordingly.
MACD Infinity Indicator(MACDI)MACDI is the macd of macd indicators and macd of macd indicators of macd indicatrs and so on...!!
I used macd algo to find slopes of macd of price and it can helpfull when we want to find best signalls it can make amazing shapes that can be usable to everyone!
author: Masoud Azizi
github: mablue
UT Bot v5This is an update by request, on someone elses strategy! well more of an edit, but also update from pine v4 to pine v5.
//CREDITS to HPotter for the orginal code. The guy trying to sell this as his own is a scammer lol.
//Edited and converted to @version=5 by SeaSide420 for Paperina
The UT Bot v5 is Movinging average (the MA) vs ATR (the ATR is in the form intended for use as trailing stop loss (ATR_TSL))
Entry logic:
buy = the MA > ATR_TSL and Price > ATR_TSL
sell = the MA < ATR_TSL and Price < ATR_TSL
The Moving average type can be changed in the settings:
options = "SMA", "EMA", "WMA", "HMA"]
the edits i made were:
convert to v5
Add TP and SL
Add Buy only or Sell only option
Add MA type option
Add price source option
Draw MA and ATR_TSL on-chart
Moving Average Trend█ OVERVIEW
This is a Moving Average Script that contains both a cloud and a ribbon that has independent MA-type selection.
⬆ green arrow up = up trend flip
⬇ red arrow down = down trend flip
🟢 Green Dot = Potential Long
🔴 Red Dot = Potential Short
█ CONCEPTS
1 — Cloud, like most trading algo, the cloud is made of 8 short term MA , with MA cross and MA cross (longema)
2 — Ribbon, this is by default turned off, the default values , an option in setting to change longema to look for ribbon cross
3 — Sequence, It goes from 1 – 9 at 9 the sequence resets. The sequence changes colour depending on if it’s a down trend(red) or uptrend(green) or an over extended trend (yellow)
Setup definitions
Red sell start = current close < the close 4 candles back
Yellow sell extended = current close < last close and current close < two closes back
Green buy start = current close > the close 4 candles back
Yellow buy extended = current close last close and current close < two closes back
This can help you find when it’s time to get out, or sit out of a choppy trend.
4 - Moving Average types:
sma = Simple Moving Average
ema = Exponential Moving Average
wma = Weighted Moving Average
vwma = Volume Weighted Moving Average
rma = Running Moving Average
alma = Arnaud Legoux Moving Average
hma = Hull Moving Average
jma = Jurik Moving Average
frama-o = frama
frama-m = frama mod
dema = Double Exponential Moving Average
tema = Triple Exponential Moving Average
zlema = Zero lag Exponential Moving Average
smma = Smoothed Moving Average
kma = kaufman Moving Average
tma = triangular Moving Average
gmma = Geometric Mean Moving Average
vida = Variable Index Dynamic Average
cma = Corrective Moving average
rema = Range Exponential Moving average
█ OTHER SECTIONS
• FEATURES: to describe the detailed features of the script, usually arranged in the same order as users will find them in the script's inputs.
• HOW TO USE
• LIMITATIONS: Like with any MA script there is a lag factor associated with is.
• RAMBLINGS: Experiment to your hearts content with all the MA types, I'm impartial to HMA as is
• NOTES: some of the MA's are more taxing, therefore take longer to load, be patience, this is a trimmed down version of an existing invite only script i have
Triple Modified Hull Moving Average Cross By <Zakaria>Triple Modified Hull Moving Average Cross By
What is this?
this is a modified formula for Hull moving average, it is more accurate and predicts the golden and death cross earlier.
How to use?
Work better in high time frames (1D,1W)
the white line vs the red and the orange lines :
1 - when the white line crosses the red and the orange lines from the bottom the price will go down . Death cross!
2 - when the white line crosses the red and the orange lines from the top the price will go up . Golden Cross!
the red line vs the orange line :
1- when the orange line crosses the red line from the bottom the price will go down . Death cross!
2 - when the orange line crosses the red line from the top the price will go up . Golden Cross!
p.s: the lag between these two lines will be very small. use it in the 1W time frame to predict where exactly the bull market will end.
You can input your personalized values if you want!
Zero-Lag HMA Backtest v1.0 [loxx]This backtest compares profitability differences between a regular Hull Moving Average ( HMA ) and a Zero-Lag HMA .
Things to know:
- Profit is set to 1 ATR
- Stop-loss is set to 1.5 ATR.
- This is by design to test the minimum the profit scenario (1 ATR up) and the worst case loss scenario (1.5 ATR down) for momentum trading. Actual results vary when additional TPs are added
How to use:
- Adjust settings and dates to view different market structures and position scenarios
- See results in the "Strategy Tester" pane
Conclusions and what's next
- Modifying HMA does very little to improve backtest results
- Future iterations will include options to backtest various moving averages with additional modifiers to improve profits and avoide losses
Comment below or send a PM with questions, comments, observations, or concerns.
Juicy TrendThis script is simple.
It uses EMA and HMA crosses to find entries and exits.
There is an option for sourcing Heikin Ashi based entries/exits.
There is an option for Stop Loss percentage.
It is made for finding Long entries on the 45min chart.
You can optimize the signals by adjusting the moving average lengths.
The default settings are for BTC/USDT 45min.
Suggestion, reduce the Stop Loss percentage for smaller / more volatile assets.
multiMaLibrary "multiMa"
Provides function that returns the type of moving average requested.
ma(type, src, len) Returns the moving average requested.
Parameters:
type : The type of moving average (choose one of "EMA", "SMA", "DEMA", "TEMA", "WMA", "VWMA", "SMMA", "HMA")
src : The source
len : The length
Returns: The moving average requested or `na`
Advanced OutSide with HMA and Klinger Forex Swing strategyThis is a swing forex strategy, adapted for big timeframes, such as 4h+.
For this example I adapted the strategy to EUR USD main forex pair.
Its components are:
Outside condition
Klinger Oscillator
Hull moving average
Rules for entry
For long: if current high is bigger than previous high and current is smaller than previous low and klinger is positive, close of the candle is above lsma and we have a bull candle.
For short: if current high is smaller than previous high and current is bigger than previous low and klinger is negative, close of the candle is below lsma and we have a bear candle.
Rules for exit
We exit when we have a reverse condition
We exit in case we hit the tp/sl based on % movement of the price.
If you have any questions, let me know !
Hull Crossover Strategy no TP or SLWhat is it?
A simple yet effective strategy ran on the 30m chart.
This is a basic idea that can be expanded on using different indicator to either add signals or filter out certain bad signals!
The strategy consists of 1 fast moving average and 1 slow moving average.
Both of these moving averages are the Hull Moving Average
What is the Hull Moving Average?
The Hull Moving Average ( HMA ) is a directional trend indicator.
It captures the current market conditions and uses recent price action to determine if conditions are bullish or bearish relative to historical data.
The Hull is different from traditional trend indicators like the EMA and the SMA .
It is designed to reduce the lag often associated with other MAs by providing a faster signal on a smoother visual plane.
How it works?
When the fast HMA crosses over the slow HMA , we initiate a long signal, and
when the fast HMA crosses under the slow HMA , we initiate a short signal.
Conclusion
The power of simplicity is what makes this such a great core to use to build onto making something even better!
The results were optimised to suit the most common market conditions seen today.
******** Not financial advice! ********
Moving Average Forecast (Beast)This script displays up to 8 lengths of moving averages using either the SMA , EMA, WMA, HMA, SWMA, VWMA or CCI and forecasts where the moving average will be in future periods (by removing the oldest periods and adding future prices based on either current price "flat" or a user-defined period linear regression "linreg".
Built on top of Triple MA Forecast by yatrader2, expanded it and added awesome features.
The following has been changed/added:
- Changed to pine script version 4
- Altered number of moving averages displayed up to 8
- Added multiple moving average types ( SMA , EMA , WMA, HMA, SWMA, VWMA, CCI )
* SMA - Simple moving average *
* EMA - Exponential moving average *
* WMA - Weighted moving average *
* HMA - Hull moving average *
* SWMA - Symmetrical weighted moving average *
* VWMA - Volume-weighted moving average *
* CCI - Commodity channel index *
- Fixed settings menu
- Added label with current moving average values (sorted by price)
- Cleaned up the logic
- Cleaned up the code
TFi Simple Moving Average Bot V1 - PUBLICThe bot is using 2 moving averages for detecting the trend; the type of moving average is configurable; if the 2 moving averages are crossing it enters a long or short position. A stop-loss and profit-target can be configured; if reaching the profit-target, the bot is closing 50% (configurable) of the position, from this time on it is using a trailing-stop to close the position if the trailing-stop has been crossed.
The following moving-averages can be configured:
DEMA
EMA
HMA
RMA
SMA
TEMA
VWMA
WMA
Overview of features:
Optional stop-loss and profit-target/trailing-stop
Built-in backtesting engine with start balance, position size and pyramiding; each year will be evaluated separately
Inputs for a percentage entry and exit slippage, entry/exit and daily funding fees
Configurable alerts, which follow the exact position of the entry/exit marker
Alert messages contain predefined trading instruction to execute orders via TradeFab's proprietary trading server, which supports Alpaca-Markets, TD Ameritrade, Oanda, CCXT API's, or can be defined by the user
The script renders a performance/status table, which shows the current position status and result of the built-in trading simulation results. The following statistics are shown:
Current position PnL - also background turns green if position is in profit and red if in loss
Average entry price and number of positions
Current percentage distance to the optional stop-loss level
Current Maximum Draw Down
Number of wins and losses and the win/loss ratio per year and overall
Profit and loss amount, paid fees per year and overall
Profit-ratio and Maximum Draw Down per year and overall
Balance and ROI per year and overall
Iceberg Intraday LearningHOW TO USE?
A setup which contains Most Useful 14 indicators, that any Intraday Trader might require.
Below will see one by one-
1) Trend Following Icebergs - (3 Different Indicators to choose from)
--> The trend following indicators optionally.
--> Very simple to understand, yellow indicating sideways, green - going upside, and red - going downside.
--> Trend Indicator - 1st Iceberg is HMA Crossovers
--> Trend Indicator - 2nd Iceberg is SMA (20). It will change its color according to the trend of the market.
--> Trend Indicator - 3rd Iceberg is RSI(14) in EMA, will be plotted at the bottom of the screen.
2) Classic Pivot Points & Floor Pivot Points: - ( 2 Different Indicators to choose from )
--> Classic Pivot Points having 5 Supports & Resistances on the chart.
--> Floor Pivot Points, At the middle, it is pivot point (PP) level and multiple support and resistance levels
--> Floor Pivot Points is a very known indicator that indicates whether that helps in-stock selection.
--> This is a very crucial indicator as it shows the Floor Pivot Points levels for the next day.
--> One can make a learn by looking at next day's Floor Pivot Points that whether the stock is going to be trendy/sideways the next day.
3) Support/Resistance
--> This indicator is used for finding support and resistance levels on charts.
--> Helps in getting pullbacks and exit levels
--> Lines will change color automatically if any candle closes above the support/resistance line. It will change it's to green.
--> Similarly, it will change its color to red if the price is below the support
4) Highs/lows, SuperTrend Up Down ( 2 Different indicators to use )
--> Plots Highs / Lows in the selected time frame.
--> Added SuperTrend indicator with length 10 with source HL/2 and multiplier to be 2.
5) Dynamic ATR - Average True Range (14 Days)
--> It plots 2 important levels at the starting of the day.
--> 2 bands are plotted in the morning when the market opens, resembling strong support/resistance zones.
6) First Candle
--> This will highlight the first candle that is formed of the selected time interval.
7) Bollinger Band
--> Bollinger band is also added for better catching the momentum as seen on chart.
--> The Upper and Lower Bands are used as a way to measure volatility by watching the relationship between the Bands and price
8) VWAP
--> VWAP is useful for learning trend direction in any market conditions.
9) RSI & MACD
--> Plots label indicating the status of RSI and MACD.
This works for Intraday Trades - when the resolution is kept to less than 1 hour ( Say 3 , 5 , 10 , 15 Mins), This works well when the resolution is kept to 1 Day - Good for Swing Trades spanning over a few days, This works well when the resolution is kept to 1 Day or Week - Good for Investments.
Trend Indicator - 3rd Iceberg Is a repainted based on the hybrid RSI Logic
Stop Loss - That should be done by following ones risk appetite , Ideally the open/close of the previous candle should be the stop loss for the buy/sell but everyone has their own Risk Management Strategies based on the capital deployed.
If you like it and find it useful or if you find a defect or bug , Please let us know in the comments .. that would encouraging !! for us to develop it further
Coded for learning INDIAN Markets.
CAUTION:: There could be scenarios when the breakout/breakdown candle is rejected , especially when it is long one
so it is always recommended to have a confirmation candle that open-closes above the breakout candle / open-closes below the breakdown candle.
Disclaimer: No Investment Advice Provided , You should always understand that P AST PERFORMANCE IS NOT NECESSARILY INDICATIVE OF FUTURE RESULTS.
Inspiring to learn the Pine making market learnings easier.
Thanks & Regards,
Iceberg Intraday Learning.
Best Bollinger BandsRemoving the Simple Moving Average and replacing it with the Hull Moving Average (HMA) in the Bollinger Bands (BB), you can not only predict support, resistance, and price movement, but you can also leverage the value of the BB in evaluating when price is over extended in an up and/or down trend.
3GBH - DOMindex v1This indicator has rsi-sourced HMA's of the dominance of key-market-players,
vs the current symbol you're viewing.
-----
We monitor the dominance of ( symbols )
- BTC.D
- ETH.D
- OTHERS.D
and whichever symbol you are currently viewing.
-----
It may be useful in some scenarios to see the trend of the average-of-overall-momentum,
compared to a symbol you are doing technical analysis on.
In my thinking, if the momentum of the current symbol is greater than that of the average
of the key-players, it may be in a stronger trend where price-action may be more favorable
for traders.
3GBH - Simple HMA'sIncluded in this indicator:
- 3x HMA w/ cloud
(Slow/Fast HMA)
(Signal HMA)
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
3GBH - RSI + HMAs Included in this indicator:
- RSI
- 2x HMA's w/ Zones of Fast HMA
- BTCUSD RSI + Comparison
- Highlight Saturdays & Sundays
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
-----
I was inspired to create this indicator, which is an exact copy of my very first
except this time we're using HMA's rather than EMA's.
Hull Moving Averages stick to price action a lot closer in my opinion.
3GBH - CCI + HMAsCommodity Channel Index w/ Hull Moving Average's.
Included in this indicator:
- CCI
- 3x HMA's that use the CCI as the source.
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
3GBH - Multiple HMAIncluded in this indicator:
- 3 Hull Moving Averages
- High & Low background fill
-----
You can toggle On/Off, any or all of the HMA's.
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
3GBH - Multiple MA'sIncluded in this indicator:
- Fast/Slow EMA's
- Fast/Slow SMA's
- Fast/Slow WMA's
- Fast/Slow HMA's
- Fast/Slow RMA's
-----
Use of of the type of Moving Averages.
Or use them all.
-----
User-friendly.
You can change all the inputs, they are labelled for ease-of-use.
You can toggle On/Off any or all of the options.
HMA_ATR StrategyATR with HMA experimental minimalist bot for ETHBTC .
A strategy for use by Automated Algorithm systems.
Different from normal ATR as it uses HMA for smoothing.
Example settings result shown here on chart include commission 0.5%