150MA Cross BuyAndSell Strategy [d3nv3r]This is a Buy And Sell Strategy I haven't seen anywhere so i share mine.
Used on Bitcoin - daily chart - the strategy generate sell and buy indicator on crossover and crossunder the 150 simple moving average.
Simple Moving Average (SMA)
Scripting Tutorial 9 - TManyMA Strategy - Long Market Order OnlyThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy
- Strategy only enters long positions with a market order when MA crossovers occur
- Strategy exits positions when crossunders occur
- Trades 100% of the equity with one order/position by default
- Ability to disable trading certain crosses with input checks
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
Ultimate MA Cross IndicatorContinue to experiment with new labels functionality in TradingView. Created ma cross script with 9 different types of MA wit additional information box. In that box, I included the bars passed from the previous bull/bear cross.
Also you cand find there live distance between moving averages in price and ATRs , so you track how close are you from the next close.
Do you think this concept is useful? What information do you want to see in this kind of boxes?
These ma types are included in this indicator:
Simple Moving Average ( SMA )
Exponential Moving Average ( EMA )
Weighted Moving Average ( WMA )
Arnaud Legoux Moving Average ( ALMA )
Hull Moving Average ( HMA )
Volume-weighted Moving Average ( VWMA )
Least Square Moving Average ( LSMA )
Smoothed Moving Average ( SMMA )
Double Exponential Moving Average ( DEMA )
Scripting Tutorial 8 - Triple Many Moving Averages RibbonsThis script is for a triple moving average indicator where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
Simple 17 BF 🚀A Simple Moving Average of period 17 based on ohlc4 values. We go long when price closes above it. We go short when price closes below it. No stop loss. No take profit.
This strategy is really to showcase how effective a basic system can be, and that with discipline and patience, trading does not need to be complex to yield good results over time.
You can change the Moving Average type, source and period in the settings as well as the backtesting range. I found 17 period SMA with ohlc4 to be a good fit for XBT/USD on Daily timeframe but for other pairs, the type, source and period will likely differ.
INSTRUCTIONS
Red turns to Green = Long Entry/Short Exit
Green turns to Red = Short Entry/Long Exit
The entries are based on when price crosses the MA and this is what the backtest is based on. We exit the current trade when we get an opposing signal and enter the new trade.
Easy to Use 50/100/200 Day Moving Average StrategyWhenever you see someone publish a chart or idea, what's the one thing you almost always see? Moving Averages!
Many investors focus on these indictors solely as entry and exit points, so here's an easy to manipulate strategy to backtest and see if this is feasible on your security.
CODE VARIABLES
LINE 2 - Here you can change your currency and amount you want to invest on each entry.
LINE 8/9/10 - Here we establish the 50 (Fast), 100 (Medium) and 200 (Slow) day variables. These can be adjusted to your choosing.
LINE 13/14/15 - Here we establish what date we want to start backtesting from. Simple change the defval on each line to change the date (In the code below we start on Jan 1st, 2010).
LINE 20/23 - Here, within the crossover and crossunder functions, we set which MA's must cross to enter and exit a trade. Below we have the 50 day moving above and under the 200 day. Simple change the variables to FastMA, MediumMA and SlowMA to your choosing.
NOTE: As a beginner you may not want to short stock, therefore LINE 5 was added to only allow long positions.
Hope this helps, from one beginner to another.
Cheers!
8 EMA & 5 SMA ComboA combination of 8 EMA & 5 SMA to use with more advanced MA strategies and de-cluttering of indicator list.
To identify lines, Color combination should be somewhat warmer/lighter to cooler/darker colors.
EMA have a thicker line than the SMA. Color pairs have lighter/darker in cases where there are slight variations (when using one over another).
3 EMA & SMA (Market Cycle)Simple Indicator based on 3 Simple and 3 Exponential Moving Averages. Used to indicate Market Cycles.
Definition of Bull Market: 10 SMA is above 21 EMA . 30 SMA slope is up. 55 EMA is trending above 200 EMA .
Definition of Bear Market: 10 SMA is below 21 EMA . 30 SMA slope is down. 55 EMA is trending below 200 EMA .
SSL Channel BFSSL Channel Close is a great all-rounder based on 2 Simple Moving Averages, one of recent Highs, one of recent Lows.
The calculation prints a channel on the chart consisting of 2 lines.
This strategy gives a Long signal when price closes above the top of these 2 lines and a Short signal when it closes below the bottom.
Trading in choppy sideways markets can compound losses so we avoid that here by using recent ATR to determine relative volatility and refrain from trading when the background is White.
We use a basic 3% stop loss.
Charted on XBT/USD Bitmex Daily chart.
INSTRUCTIONS
Green = long
Red = short
White Background= No trade
The way I have set this strategy up is that if we get stopped out but we are still in a green or red background, we re-enter. Closing the trade only occurs on an opposing signal or if we get stopped out.
Scripting Tutorial 7 - Triple Many Moving Averages ResolutionsThis script is for a triple moving average indicator where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
Multiple SMAs + X-Bar High/LowWhen starting my daily analysis, I typically open a daily chart and check where the price is compared to several SMAs, as well as check the high/low of today and the 10-day high/low. This indicator was designed to save chart space as well as make finding the highs and lows more efficient. Everything is adjustable, so you don't have to stick with my 10-bar rule.
MA X 200 BFGo long when the price closes above the 200 SMA.
Go short when the price crosses under the 200 SMA.
Keep it simple.
MavCrossover v2Simple moving average crossover strategy with
SMA and EMA,
a time window and
the possibility to set the 2nd MA as a factor of the 1st one (to quick cycle through them)
DT21 Moving Averages
I know a lot of people use the free version of TradingView, So I made a script to combine 5 Moving averages as 1 indicator for my followers
Scripting Tutorial 6 - Triple Many Moving Averages ForecastingThis script is for a triple moving average indicator where the user can select from different types of moving averages, price sources and lookback periods.
Features:
- 3 Moving Averages with variable MA types, periods, price sources and ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked on my profile.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
Volume-supported Fractal SRModified version of SynapticEX's Volume-supported Fractal S/R with EMA instead of SMA, pinescript 4 port, and EMA20/EMA50 defaults for support and resistance.
EMA20 = red/green
EMA50 = orange/yellow
MTF Bollinger Bands - ModifiedModified version of tansancrypto's MTF Bollinger to Pinescript 4 and removed limiters on BB1/BB2 max Sigma values.
Original Script:
Scripting Tutorial 5 - Triple Many Moving Averages CrossoversThis script is for a triple moving average indicator where the user can select from different types of moving averages and periods. This script improves upon tutorial 3 by adding source selection for MAs and another option for an MA that is not built-in, the HMA . It is meant as an educational script with well formatted styling, and references for specific functions.
Scripting Tutorial 3 - Triple Many Moving AveragesThis script is for a triple moving average indicator where the user can select from different types of moving averages. It is meant as an educational script with well formatted styling, and references for specific functions.
Scripting Tutorial 1 - Simple Moving AverageThis script is for a simple moving average indicator. It is meant as an educational script with well formatted styling, and references for specific functions.
DT-21 Moving AveragesI know a lot of people use the free version of TradingView, So I made a script to combine 5 Moving averages as 1 indicator.
X Period High/Low/MidToday we have a simple, but endlessly versatile, indicator that plots the X Period High/Low/Mid of your chosen market.
Traditionally the 52 week High/Low is used as a breakout signal. However, by changing to an X period, and adding a midway line, we create a more versatile indicator that can be tailored to various markets.
By default it's set at 250 periods (because I like the 250 period moving average), and I generally trade H4 and Daily time frames. But tweak it to your liking, you just have to modify the length periods by your desired time frame and lookback length. E.g. to create a 52 week indicator on the daily time frame, enter a length of 260 in the indicator (5 days per week * 52 weeks = 260).
For the above reason, I haven't made this indicator MTF, as there's no real need. However, if users find it easier I can look at adding it later.
Also, the mid point between an X period high/low is often a good trend-follower, as well as acting as support/resistance . I encourage you to experiment with different ways of using this indicator. Entire systems (if your risk management is correct) can be built and traded from this one indicator.
Good luck.
DD