4 MA Strategy + Position Management// This is a simple crossover Moving Average strategy, good for long term crypto trades.
// It buys when the MA "X" crosses up the MA "Y", viceversa for shorts.
// Both MAs are selectable from the Inputs section in the front panel.
// There is also a Position Management option thats
// sizes positions to have the same USD risk (using leverage) on each trade,
// based on the percentage distance to the stop loss level.
// If you turn this option on you will see how the profit
// grows exponentially while the drawdown percentage almost remains the same.
ค่าเฉลี่ยเคลื่อนที่แบบง่าย (SMA)
HYE Mean Reversion SMAIndicator version of the strategy "HYE Mean Reversion SMA "
"Long", "Short", "Exit Long" and "Exit Short" alarms added.
Use with "Once Per Bar Close".
HYE Mean Reversion SMA [Strategy]An RSI filtered version of PJ Sutherland's Jaws Mean Reversion algorithm.
"Long" on the close when;
1-) 2 period simple moving average closes 3% or more below the 5 period simple moving average,
2-) 5 period exponential average of the 2 period RSI is below 30.
"Exit Long" on the close when;
1-) 2 period simple moving average closes above the 5 period moving average.
"Short" on the close when;
1-) 2 period simple moving average closes 3% or more above the 5 period simple moving average,
2-) 5 period exponential average of the 2 period RSI is above 70.
"Exit Short" on the close when;
1-) 2 period simple moving average closes below the 5 period moving average.
*** You can change the needed percentage for long and short trades, periods of simple moving averages and RSI levels.
*** You can select the trend direction: "Long Only" , "Short Only" or "Both". Default is "Long Only".
Interest rateCompare the MAs of the three symbols.
Basically it can be applied to interest rates.
It also displays the long-short interest rate differential (Long-Short).
Alt Golden Ratio by USCG_VetPine Script math based on the medium article by Philip Swift.
Idea based from Willy Woo Charts.
Disclaimer: None of this Pine Script, Title, nor Description should be used for Financial Advice. For Education Purposes Only.
Purpose: Identify a Golden Ratio Cross of the 350 Daily MA vs the 111 Daily MA with Multiplier to theorize where local valuation tops or bottoms could be approximated. NOT FINANCIAL ADVICE!
Parameters:
DMA A: short Daily Moving Average
DMA B: long Daily Moving Average
Golden Ratio: point where short Daily Moving Average crosses value assigned in parameter.
Indicators:
S2: Cross of DMA A vs DMA B in upward direction (approximate local top)
Sn: additional approximate top indicators
Sell1: first approximate local bottom
Selln: additional approximate local bottom indicators
GR: Golden-Ratio Cross of DMA A
Simple Moving Average 20,50,100This SMA Script is modified and is based on 3 bands which are of 20 days, 50 days, 100 days average line.
This is a very appropriate for Indian Markets.
**How to Use :**
***BUY***
When the chart pattern is as follows :-
- SMA 200 (Black)
- SMA 50 (Red)
- SMA 20 (Green)
- "Last Traded Price"
***SELL***
When the chart pattern is as follows :-
- "Last Traded Price"
- SMA 20 (Green)
- SMA 50 (Red)
- SMA 200 (Black)
And Book Good Profits!!!
Grid Bot AutoThis script is an auto-adjusting grid bot simulator. This is an improved version of the original Grid Bot Simulator. The grid bot is best used for ranging/choppy markets. Prices are divided into grids, or trade zones, that will trigger signals each time a new zone is entered. During ranging markets, each transaction is followed by a “take profit.” As the market starts to trend, transactions are stacked (compare to DCA ), until the market consolidates. No signals are triggered above the Upper Limit or Below the Lower Limit. Unlike the previous version, the upper and lower limits are calculated automatically. Grid levels are determined by four factors: Smoothing, Laziness, Elasticity, and Grid Intervals.
Smoothing:
A moving average (or linear regression) is applied to each close price as a basis. Options for smoothing are Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average.
Laziness:
Laziness is the percentage change required to reach the next level. If laziness is 1.5, the price must move up or down by 1.5% before the grid will change. This concept is based on Alex Grover’s Efficient Trend Step. This allows the grids to be based on even price levels, as opposed to jagged moving averages.
Elasticity:
Elasticity is the degree of “stickiness” to the current price trend. If the smoothing line remains above (or below) the current grid center without reverting but still not enough to reach the next grid level, the grid line will start to curve toward the next grid level. Elasticity is added to (or subtracted from) the gridline by a factor of minimum system ticks for the current pair. Elasticity of zero will keep the gridlines horizontal. If elasticity is too high, the grid will distort.
Grid Intervals:
Grid intervals are the percentage of space between each grid.
Laziness = 4%, Elasticity = 0. Price must move at least 4% before reaching the next level. With zero elasticity, gridlines are straight.
Laziness = 5%, Elasticity = 100. For each bar at a new grid level, the grid will start “curve” toward the next price level (up if price is greater than the middle grid, down if less than middle grid). Elasticity is calculated by the user-inputted “Elasticity” multiplied by the minimum tick for the current pair (ELSTX = syminfo.mintick * iELSTX)
Try experimenting with different combinations of the Smoothing Length, Smoothing Type, Laziness, Elasticity, and Grid Intervals to find the optimum settings for each chart. Lower-priced pairs (e.g. XRP/ADA/DODGE) will require lower Elasticity. Also note that different exchanges may have different minimum tick values. For example, minimum tick for BITMEX:XBTUSD and BYBIT:BTCUSD is .5, but BINANCE:BTCUSDT and COINBASE:BTCUSD is .01.
s3.tradingview.com
DODGEUSDT, 5min. Laziness: 4%, Elasticity 2.5
Number of Grids: 2. Laziness: 3.75%. Elasticity: 150. Grid Interval 2%.
Settings Overview
Smoothing Length : Smoothing period
Smoothing Type : Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average
Laziness : Percentage required for price to move until it reaches the next level. If price does not reach the next level (up or down), the grid will remain the same as previous grid (because it’s lazy).
Elasticity : Amount of curvature toward the next grid, based on the current price trend. As elasticity increases, gridlines will curve up or down by a factor of the number of ticks since the last grid change.
Grid Interval : Percent between grid levels.
Number of Grids : Number of grids to show.
Cooldown : Number of bars to wait to prevent consecutive signals.
Grid Line Transparency : Lower transparencies brighten the gridlines; higher transparencies dim the gridlines. To hide the gridlines completely, enter 100.
Fill Transparency: Lower transparencies brighten the fill box; higher transparencies dim the fill box. To hide the fill box completely, enter 100.
Signal Size : Make signal triangles large or small.
Reset Buy/Sell Index When Grids Change : When a new grid is formed, resetting the index may prevent false signals (experimental)
Use Highs/Lows for Signals : If enabled, signals are triggered as soon as the price touches the next zone. If disabled, signals are triggered after bar closes. Enable this for “Once Per Bar alerts. Disable for “Once Per Bar Close” alerts.
Show Min Tick : If checked, syminfo.mintick is displayed in upper-righthand corner. Useful for estimating Laziness.
Reverse Fill Colors : Default fill for fill boxes is green after buy and red after sell. Check this box to reverse.
Note: The Grid Bot Simulator scripts are experimental and works in progress. Please feel free to comment or contact me if you have suggestions/complaints.
VWMA / SMA / TEMA DifferenceThis Study try to simulate Weakening and Strengthening trends on Bear(down) or Bull(up) movements.
It looks to VWMA - TEMA trend for Bull / Bear trend and looking for SMA - VWMA trend for Weak / Strong trends.
On default settings Line shows the difference between VWMA - TEMA and Columns show difference between SMA - VWMA. Suggesting to use this script for 5m intervals.
This is a personal work of mine. Using this script and taking decisions regarding to this script is only and only under responsibility of the trader!!!
CheckmateTrades - Pivots End GameThis indicator is based on the Pivot study. Traders will be able to plot CPR, Standard floor pivots as well as Camarilla Pivots on multiple timeframes.
Why pivots from multiple timeframes are relevant and included in this one indicator?
We can analyse pivots on multiple timeframes for different trading setups. As in, Daily floor pivots are best suited for analysing the market trend for Day trading. Similarly, Weekly and Monthly floor pivots can be analysed for Swing and positional trading entries. Whereas yearly pivot is best suited for trend analysis for investment purpose.
What is the relevance of plotting tomorrow's pivot level in advance?
Pivot are calculated based on the price happened on a previous day. And hence trader can plot tomorrow pivots in advance to shortlist stocks for tomorrow's trading session.
TimeFrames Available to traders are –
1. Daily
2. Weekly
3. Monthly
A) Daily Pivots
Present Day –
1. Trader can plot Daily CPR
2. Trader can plot Daily R1, R2, R3 and R4 pivot resistance levels
3. Trader can plot Daily S1, S2, S3 and S4 pivot support levels
4. Trader can plot Daily Camarilla levels
Future Day –
1. Trader can plot Tomorrow CPR
2. Trader can plot Tomorrow R1, R2, R3 and R4 pivot resistance levels
3. Trader can plot Tomorrow S1, S2, S3 and S4 pivot support levels
4. Trader can plot Tomorrow Camarilla levels
5. Previous Day High and Low
B) Weekly Pivots
Present Week –
1. Trader can plot Present week CPR
2. Trader can plot Present week R1, R2, R3 and R4 pivot resistance levels
3. Trader can plot Present week S1, S2, S3 and S4 pivot support levels
4. Trader can plot Present week Camarilla levels
Next Week –
1. Trader can plot Next week CPR
2. Trader can plot Next week R1, R2, R3 and R4 pivot resistance levels
3. Trader can plot Next week S1, S2, S3 and S4 pivot support levels
4. Trader can plot Next week Camarilla levels
5. Previous Week High and Low
C) Monthly Pivots
Present Month –
1. Trader can plot Present Month CPR
2. Trader can plot Present Month R1, R2, R3 and R4 pivot resistance levels
3. Trader can plot Present Month S1, S2, S3 and S4 pivot support levels
4. Trader can plot Present Month Camarilla levels
Next Month –
1. Trader can plot Next Month CPR
2. Trader can plot Next Month R1, R2, R3 and R4 pivot resistance levels
3. Trader can plot Next Month S1, S2, S3 and S4 pivot support levels
4. Trader can plot Next Month Camarilla levels
5. Previous Month High and Low
Moreover, I have also included SMA (Simple moving averages) study in this indicator. Trader can add 20,50 & 200 SMA on there charts.
Why is it relevant? Trader can get a visual confirmation of an up-trending or an down-trending move by looking at rising or falling 20 & 50 SMA respectively
Usually in an uptrending stocks. 20 & 50 SMA will move in parallel to each other and will rise upwards. Price will tend to trade above the 20 SMA and 20 SMA will continue to act as a support.
Simple Bollinger Bands + 3 EMAWe know that the number of indicators that we can use is limited, that is why with this indicator the Bollinger Bands + 3 EMAs join and be able to use 4 indicators in 1.
Bollinger Bands (BB)
Bollinger Bands (BB) are a widely popular technical analysis instrument created by John Bollinger in the early 1980’s. Bollinger Bands consist of a band of three lines which are plotted in relation to security prices. The line in the middle is usually a Simple Moving Average (SMA) set to a period of 20 days (the type of trend line and period can be changed by the trader; however a 20 day moving average is by far the most popular). The SMA then serves as a base for the Upper and Lower Bands which are used as a way to measure volatility by observing the relationship between the Bands and price. Typically the Upper and Lower Bands are set to two standard deviations away from the SMA (The Middle Line); however the number of standard deviations can also be adjusted by the trader.
Exponential Moving Average (EMA)
Moving averages visualize the average price of a financial instrument over a specified period of time. However, there are a few different types of moving averages. They typically differ in the way that different data points are weighted or given significance. An Exponential Moving Average (EMA) is very similar to (and is a type of) a weighted moving average. The major difference with the EMA is that old data points never leave the average. To clarify, old data points retain a multiplier (albeit declining to almost nothing) even if they are outside of the selected data series length.
The 3 EMAs that the Script has, are configured as follows:
Fast EMA (purple) 10 periods.
Slow EMA (blue) 55 periods.
Big EMA (olive) 200 periods.
However, you can configure each one with the color and the number of periods you want.
There are other indicators in the Public Library that have similar functions to this Script, but they all do it in a more complex and less friendly way when configuring it, for this reason we wanted to keep this Script as simple as possible.
Moving Average - IntradayMoving Average Intraday Strategy
Basic moving average strategy purpose built for intraday trading. It uses two simple moving averages & takes a positions on crossover.
Position is reversed when signal changes by using double quantity. Once the intraday session is over & if the position is open; it is squared off.
Users can define intraday session during which the strategy will run.
Parameters:
Intraday Session - Defines the duration for which the strategy should execute.
Short Term Moving Average Period
Long Term Moving Average Period
Directional Matrix [LuxAlgo]Returns a dashboard showing the direction taken by 4 overlay indicators, SMA (simple moving average), TMA (triangular moving average), WMA (weighted moving average), and REG (linear regression), all using different length periods.
The user can select the minimum and maximum length of these indicators and introduce an increment.
1. Settings
Maximum Length: The end value of sequences of the indicator periods to analyze
Minimum Length: The starting value of sequences of the indicator periods to analyze
Step: Determines the spacing between each indicator periods values
Src: Data source for each of the 4 indicators
1.1 Style settings
Normalized Change Mode: Allows the user to access a different interpretation of the indicator by showing the normalized first differences of each indicator in the dashboard instead of their sign
Dashboard Location: Location of the dashboard on the chart
Dashboard Size: Size of the dashboard on the chart
Text/Frame Color: Determines the color of the frame grid as well as the text color
Bullish Cell Color: Determines the color of cell associated with a rising indicator direction
Bearish Cell Color: Determines the color of cell associated with a decreasing indicator direction
Cell Transparency: Transparency of each cell
2. Usage
Each of the indicators included in the dashboard aim to give an estimate of the underlying trend in the price. Knowing which direction they are taking can help us have a broader view regarding the direction of shorter/longer-term trends. We will later see that this is not the only kind of information that we can get from this indicator.
Rising indicators are represented by blue cells (or the color selected in the Bullish Cell Color setting) while decreasing indicators are represented by red cells (or the color selected in the Bearish Cell Color setting).
The percentage of bullish cells is given in the top-left cell of the dashboard.
2.1 Normalized change mode
Enabling the Normalized Change mode will display the normalized changes returned by the indicators over different length periods. This metric is within a range (0,1), with 1 indicating the highest change over the selected length periods, while 0 indicates the lowest one.
When enabling this mode the color of the cells makes use of a gradient with a color palette ranging from the color selected in the Bearish Cell setting to the color selected in the Bullish Cell setting.
2.1 Other Usage
The direction taken by certain indicators can give more information than one would think. Indeed, the sign of the change of one indicator can often be given by different indicators.
A positive change in a simple moving average indicates that the price is greater than the price p bars ago, where p is the period of the simple moving average.
A positive change in a triangular moving average indicates that a simple moving average of period p is above a simple moving average of period p × 2 , where p is the period of the triangular moving average (note that we assume here that the TMA is given by cascading two SMAs of period p ).
A positive change in a weighted moving average indicates that the price is above a simple moving average of period p+1 , where p is the period of the WMA.
Finally, a positive change in a linear regression indicates that a weighted moving average is above a simple moving average of period p , where p is the period of the linear regression.
Table: EMA SurveillanceThis script will show information of interest about Moving Averages from the selected timeframe.
The idea is to provide data from higher timeframes (Daily preferably).
The information provided includes:
• selected length and calculation
• a relative position of the close to the average (above, below, and how much)
• how many periods passed since the moving average has been tested - any break counts as a test, it doesn't have to close on the opposite side
Global Settings:
• Timeframe of the moving averages
• Choose to see simple words such as "Above" / "Below" OR the specific percentage OR how much percentage % it moved from the moving average?
• EMA or SMA
Moving Average Settings:
• Up to 6 different lengths
• You can deactivate the averages you don't need
I hope it will be useful. Good luck!
Borg's BaselineMoving average baseline comprised of and an adjustable Keltner Channel band around the MA.
Used as directional bias indicator in systems trading.
Inverse BandsI'm very new to trading. I've been toying with moving averages to trigger swing trades and wanted an indicator that would swell when price moves sideways and squeeze when price is trending.
So this is the inverse of the popular Bollinger Bands indicator. It makes a very easy identifier for price breakout when paired with your favorite fast moving average. When MA falls outside the bands, it indicates an emerging trend. Still requires some curve fitting, but it is a work in progress.
I hope this isn't a direct copy of something I am not aware of.
Main MAs and EMAs multi-timeframe for supportObjective is to map out different multi-timeframe support/resistance , all at once. Includes weekly, daily and 4H EMAs and MAs, as per the follow (allowing customization)
WEEKLY (in pink/purple variations):
- 13 EMA
- 21 EMA
- 34 EMA
- 50 M.A
DAILY (in green variations):
- 21 EMA
- 50 EMA
- 120 M.A.
- 200 M.A.
4H (in yellow/golden colors):
- 400 EMA
- 500 EMA
- 675 EMA
- 715 EMA
- 920 EMA
- 1150 EMA
Notes:
- Quite useful to all types of assets; crypto, commodities , stocks, etc...
- Ideally not to be visible all the time, as it can "pollute" the charts. But very helpful in moments of great volatility
Moving Average Buy/Sell IndicatorUsing a selected Exponential Moving Average (EMA)/Simple Moving Average (SMA) range, this indicator inserts a Long/Short (buy/sell) indicator overlaid on chart depending on the following conditions:
- LONG/BUY SIGNAL = if SMA value is less than EMA, and both the SMA and EMA are less than the current average price.
- SHORT/SELL SIGNAL = if SMA value is greater than EMA, and both the SMA and EMA are greater than the current average price.
**Intended for use with the 21 and 34 weekly moving average time range. Much more useful for long-term analysis rather than short-term analysis.**
[SerDarK] SMA RSI Engulfing BarENG: This indicator includes the SMA line colored according to the price position, the RSI to identify the bearish or the bullish points, the Engulfing bars, the clock and the information panel showing the countdown to the candle closing.
SMA: default period is set to 50. It can change from the settings.
Definition of SMA line default colors: When the price is below the SMA line, its color is blue. It is green when the price is above the SMA line. It is yellow in RSI alerts and when the price hits the SMA line.
RSI: default period 14 is set. It can be changed in the settings.
🔨 Hammer Emoji: RSI is located at the overbought turnaround point. This sign does not mean that the trend will definitely return.
🚀Rocket Emoji: Tries to catch the "RSI oversold point turn".This sign does not mean that the trend will definitely return.
↗️↘️Up and Down arrows emojis. After the price crosses the SMA line, it indicates that it is closing a candle in that direction.
Engulfing candles: bullish engulfing candle is blue color. Bear engulfing candle is black in color.colors can be changed in settings.
Note that this indicator is only an indicator. It does not give advice on buying or selling.
Enjoy
TUR: Bu indikatör, fiyat konumuna göre renklendirilmiş SMA çizgisi, RSI ile düşüş veya yükseliş noktalarını belirleme, Engulfing (Yutan) barlar , saat ve mum kapanışı için geri sayım gösteren bilgi paneli içermektedir.
SMA: varsayılan periyodu 50 ayarlıdır. Ayarlardan değiştirebilir.
SMA çizgisi varsayılan renklerinin tanımı: Fiyat SMA çizgisi altında iken rengi mavidir. Fiyat SMA çizgisi üstünde iken yeşildir. RSI uyarılarında ve fiyat SMA çizgisine temas ettiğinde sarı renktedir.
RSI: varsayılan periyodu 14 ayarlanmıştır. Ayarlardan değiştirilebilir.
🔨 Çekiç Emojisi: RSI aşırı alım dönüş noktasında bulunur. Bu işaret trendin kesin döneceği anlamına gelmez.
🚀Roket Emojisi: "RSI aşırı satım noktası dönüşünü "yakalamaya çalışır. Bu işaret trendin kesin döneceği anlamına gelmez.
↗️↘️Yukarı ve Aşağı yönlü okl emojileri. Fiyat SMA çizgisini kestikten sonra, o yönde mum kapattığını gösterir.
Engulfing mumları: bullish engulfing (yutan boğa) mumu mavi renktir. Bear engulfing (yutan ayı) mumu siyah renktir. Renkler ayarlardan değiştirilebilir.
Not: Bu indikatörün yalnızca gösterge olduğunu unutmayın. Alma satma tavsiyesi vermez.
Kalan süre etiketi BIST gibi sınırlı süreli sembollerde, gün ve daha üstü periyotlarda doğru çalışmayabiliyor.
Alert for 3Commas Bollinger StrategyThis is just an alert for the 3Commas Bollinger Strategy written by tedwardd
CAPE (Shiller PE) RatioCalculating the Shiller PE Ratio (aka cyclically adjusted price to earnings ratio). The calculation is similar to the traditional PE ratio, however uses the simple average of the earnings over past 5 years (default is 5, can choose different) adjusted for inflation (default is the Australian CPI index however a different index can be used in the input).
Stan Weinstein 30-week Moving AverageStan Weinstein's book 'Secrets for Profiting in Bull and Bear Markets' is without doubt one of the classics books traders read.
Weinstein said that at any one point in time, a stock (or an index) will be in one of four market "stages":
Stage 1 the Basing Area (also known as consolidation or accumulation phase)
Stage 2 the Advancing Stage
Stage 3 the Top Area (also known as the distribution phase), or
Stage 4 the Declining Stage
One of the concepts from the book that became classic is the definition of the four stages a stock can be in. These stages basically classify the different periods in the lifetime of a stock. An important thing to understand is that Weinstein uses weekly charts and identifies the current stage based on the direction on the 30 week moving average.
This script plots the 30 week moving average and the 150 day moving average.
Daily and Weekly Moving Averages on Daily ChartFor the long term trend I use the 200 and 150 daily moving averages. The 200-day MA will be plotted as a black line. It is a no-go zone to buy anything trading below that.
The 150-day, or 30-week like Stan Weinstein uses, is plotted in orange.
Than I use the 50 day moving average but also the 10 week moving average. While those look similar there is a small difference which sometimes impacts the choice for selling a stock or holding on to it.
That slight difference is useful in different situations that’s why I want to have them both on my chart.
Both the 50-day and the 10-week are plotted as red lines on the chart. Since there’s only a small difference the same color gives a nicer view.
For shorter term trend I like to use the 20 and 10 day exponential moving averages. I tested these but also the commonly used 21, 9 and some other variations. But came to the conclusion that for me the 20EMA and 10EMA works best.
Both EMA’s are plotted in blue, where the 20EMA has a thicker line to easily see the difference.
ChBrkOutStrategySMAThis script relies on channel breakout strategy and the exit condition is defined by the SMA crossover, this works well on futures and Indices