M&Ms - Multiple Moving Average CrossingSometimes you want to have multiple moving averages in the graph to evaluate your operation.
Here is my alternative for this need and I´m glad to share with you.
This script also has some pivot indicators and can be a good start point to you extend its features.
Simple Moving Average (SMA)
Average DownThis strategy has been published for a Pyramiding tutorial on the Backtest Rookies website.
For a full overview of the code and an introduction to Pyramiding check out our site.
Summary
The code example will create a simple script that allows us to average down whenever our portfolio is down x%. The idea will be to bring our average cost down so that we can still exit with a profit when conditions improve. With this in mind, the strategy shall also have a simple take profit exit at x% above our average price.
Inputs
Target Loss to Average Down (%) : This is the target percentage level will trigger us to average down. In other words, if we have a close below this level from our average buying price, we will average down.
Target Take Profit : A standard take profit percentage level. Use this to set how much profit you will target.
% Of Current Holdings to Buy : Is the number of shares/contracts we will aim to buy when we average down. 50 will mean we buy 50% of our current holdings. So if we have 100 shares, then we buy 50 when we average down.
SMA Period : Defines our SMA lookback period. Our strategy will enter the first/initial position when we have a close above our SMA level.
Seven Moving AvveragesThis is a simple yet very flexible moving average script. There are more than few moving average scripts out there but non of them are as flexible as this one.
This script lets you have seven different moving averages. Each moving average can be set separately, each can :
1- switch the moving average between EMA and SMA
2- set the flat percentage, this setting will be used to determine where we don't have trend in that moving average to set the color to black (default)
3- set the source
You can easily set the colors in the style tab.
This script was developed by request of few of my friends.
GoldenCross Strategy by ClefsphereGolden cross when 50SMA crosses 200SMA. Can be used for any market. Day time frame is ideal.
Distance From 200-day moving averagePlot of the distance from the 200ma. Helpful to identify areas where max distance from the 200ma caused a drop down or jump up to the mean
Mayer Multiple @ Current PriceThough this script is by me, the original idea comes from a podcast I heard where Trace Mayer talks about how he does crypto valuation. It is based on current price against the 200 day moving average. This indicator script will simply plot that value as a label overlayed on your trading view chart. Best long term results occur when acquiring BTC when the multiple is 2.4 or less. For more info, google "mayer multiple" This script/indicator is strictly for educational purposes. It is not exclusive to bitcoin.
To get the best look out of your charts I make the following changes.
1.Apply the indicator to your chart.
2. In the tools palette of trading view, when looking at a chart, click "Show Objects Tree" the icon displayed above the trash can.
In the objects tree panel, click the preferences icon for "Mayer Multiple @ Current Price"
Switch "scale" to "scale Left"
3. Then for your chart preferences (right click on chart background and select "Properties", and be sure the following are checked on the "Scales" tab
Left Axis
Right Axis
Indicator Last Value
Indicator Labels
Screenshots are not allowed in this view, so I can't post screenshots, but the view above is what it should look like when you are done.
For anyone who wants to see the code, here is the code of the script:
Use at will, and at your own risk.
//@version=3
// Created By Timothy Luce, inspired by Trace Mayer's 200 Day SMA cryptocurrency valuation method
study("Mayer Multiple @ Current Price", overlay=true)
currentPrice = close
currentDay = security(tickerid, "D", sma(close, 200))
mayerMultiple = currentPrice/currentDay
plot(mayerMultiple, color=#00ffaa, transp=100)
If you want to change the color, change this line: #00ffaa
Multiple Moving Averages using only 1 indicator! (configurable)Simple modification to an existing script that allows for configurable MA lookback-lengths
Leeloo Triple Simple Moving AverageAllows you to have three simple moving averages in one indicator.
Vamp's Six Simple Moving AveragesProvides the 6 moving averages @ChartVampire uses in a single indicator
Simple_longshort_signalsLong Entry
Criteria:
1) Green candle close above 50MA
2) Green candle close above 20MA
3) MA of RSI(14) is cross upward 50
Result: displays green up arrow
Long Exit
Criteria:
1) Three red candles in a row
2) Any candle close bellow 20MA
3) MA of RSI(14) cross downward 50
Result: displays green diamond
Short Entry
1) Red candle close bellow 50MA
2) Red candle close bellow 20MA
3) MA of RSI(14) is cross downward 50
Result: displays red down arrow
Short Exit
Criteria
1) Three green candles in a row
2) Any candle close above 20MA
3) MA of RSI(14) is cross upward 50
Result: displays red diamond
4 Moving Averages4 Moving averages contained in one indicator. Based on the recommendation of Alessio Rastani in this video. It includes the 21, 55 & 100 EMAs and the 200 SMA.
I have also included the close for using setting up "cross" alerts with each of the MAs.
Leading Trader Pulse - Reverse EngineerMy attempt to replicate the functionality of the 'LT Pulse' based on information available in Alessio Rastani videos.
Dow Phases MA [ROCHA]phases of dow theory
1 - recuperation
2 - accumulation
3 - buy
4 - attention
5 - distribution
6 - sell
Tom's Moving Average & Lagging SpanSinple Moving Average 5 / 20 / 40 / 100 / 200
Ichimoku Lagging Span
tom_btcfx_fx setting
14/28 Day SMA Divergence and RSI - No RepaintIf you are interested in purchasing my algorithmic trading bot that receives Tradingview indicator alerts via email and then executes them in Bittrex, please visit my product page here: ilikestocks.com Additionally, I would love to create video/blog guides on creating Tradingview scripts or strategies. If you are a knowledgeable in finance or other related fields and would like to be featured on my page, please contact me at tanner@ilikestocks.com.
No crossovers were used in this script, and this is likely the reason for the no repaint(Correct me if wrong).
This strategy script uses a 14-day SMA signal line, a 28-day SMA and RSI. The strategy works by determining whether the (14-day SMA is above the 28-day SMA and the RSI levels are overbought(below 30)) or RSI is very overbought(below 13 or so). Once either of these conditions have been met, a long position is opened.
The initial long position must be partially closed by the take profit first and then the final close is executed if the 14-day signal SMA is below the 28-day SMA; you may also exclusively use take profit to close positions.
The green plotted spikes are the initial long position conditions. The orange plotted spikes are take profit signals once a long position is opened. The red plotted spikes are plotted when the SMA 14-day is below the 28-day SMA.
Please do leave constructive criticism or comments below because it helps me better create scripts!
BB limitMarket maker strategy using Bollinger bands as entry, moving average as close and simple stop-loss with percentage of entry position. It was extremely profitable in june on xbtusd.