Color Changing Moving Average
Hello everybody!
I'm not much of a coder but I do make indicators for myself for fun sometimes and found this one super cool. Hope it helps!
Basically it's a moving average that changes colors based on the trend. How does it do it, you may ask? Simply put, it checks and makes sure that the open and close price is above the moving average, then it checks and sees if the 50-period RSI (length adjustable) is above 50. If both conditions are met, the moving average turns green. Simple as that.
If the price is below the moving average and the RSI is below 50, the moving average turns red.
If the price is above the moving average but the RSI is below 50, the line is grey and I advise to simply waiting for the trend direction to be decided. Likewise, if the price is below the moving average, but the RSI is above 50, the line is also grey.
This is NOT a comprehensive system, and the changing color of the moving average does not indicate a buy or sell signal. It simply indicates that the price is trending. You should use your own entry and exit strategy, such as the MACD, Wave Trend, Schaff Trend Cycle, etc.
As well, I would recommend waiting for confirmation of a trend change when the color changes, since in a range price can cross multiple times before deciding on the right direction.
The slope of the moving average can help too, since in a range the moving average is typically flat.
I would recommend using a fixed risk to reward ratio, to limit emotions. But, this would also help with a trend-following strategy due to the trend filter functionality.
The length of the moving average is adjustable, as well as the RSI period- though I wouldn't recommend selecting an RSI lower than 30 because it will whipsaw more. Disabling the EMA option will give you an SMA that does the same thing as the EMA. You can also disable the RSI filter and simply have a moving average that changes color when the price is above/below- but that's pretty boring, huh?
Anyways, hope this helps, happy trading everybody :)
Cari dalam skrip untuk "信达证券能涨到50元吗"
Price StatsIntroduction
Price Stats is an indicator based on the statistics shown in MarketSmith charting software when viewing the Track Price information, also known as the "yellow box."
The following stats are available for the most recent price bar:
■ High price
■ Low price
■ Last price
■ Percent change in price from prior bar
■ Closing range within the bar
■ Current volume
■ Volume % change relative to the 50-day moving average volume
For daily charts:
■ 21-day EMA and % offset of price
■ 50-day SMA and % offset of price
■ 200-day SMA and % offset of price
Here's how to interpret the moving averages:
In the image below the 50-day SMA is 74.58 (8.04%). 74.58 represents the value of the 50-day SMA. 8.04% indicates that the current price is 8.04% above the SMA. A negative % would indicate the current price is the specified % below the SMA.
Combined Momentum MA (Equal-Length EMA/SMA Crossover)Overview:
This momentum and trend-following strategy captures the majority of any trending move, and works well on high timeframes.
It uses an equal-period EMA and SMA crossover to detect trend acceleration/deceleration, since an EMA places a greater weight and significance on the most recent data.
To reduce noise and optimize entries, we combined this with an overall trend bias for further confluence.
How it works:
Signals are determined by the crossover of an EMA and SMA of the same length, e.g. EMA-50 and SMA-50.
The overall trend bias is determined using a slower SMA golden/death cross, e.g. SMA-50 and SMA-100.
The signal is stronger when it occurs in confluence with the overall trend bias, e.g. when EMA-50 crosses over SMA-50, while above the SMA-100. This is analogous to only opening long positions in a bull market.
Indicator description:
GREEN: Up Trend (EMA is above SMA, while EMA is above BIAS_MA. This shows a bullish confluence.)
YELLOW: No Trend (EMA/SMA crossover and BIAS_MA are not in confluence.)
RED = Down Trend (EMA is below SMA, while EMA is below BIAS_MA. This shows a bearish confluence.)
Equal-Length EMA/SMA Crossover Momentum StrategyOverview:
This momentum and trend-following strategy captures the majority of any trending move, and works well on high timeframes.
It uses an equal-period EMA and SMA crossover to detect trend acceleration/deceleration, since an EMA places a greater weight and significance on the most recent data.
This version is optimized for longs, and designed to cut your losses quickly and let your winners run.
To reduce noise and optimize entries, we combined this with an overall trend bias for further confluence.
How it works:
Signals are determined by the crossover of an EMA and SMA of the same length, e.g. EMA-50 and SMA-50.
The overall trend bias is determined using a slower SMA golden/death cross, e.g. SMA-50 and SMA-100.
The signal is stronger when it occurs in confluence with the overall trend bias, e.g. when EMA-50 crosses over SMA-50, while above the SMA-100. This is analogous to only opening long positions in a bull market.
Signal description:
Trend Buy: EMA crosses above SMA, and overall trend bias is bullish. Buying is in confluence with the overall trend bias.
Risky Buy: EMA crosses above SMA, and overall trend bias is bearish. Buying is early, more risky, and not in confluence with the overall trend bias.
Late Buy: SMA crosses above BIAS_SLOW. This gives further confirmation of bullish trend, but signal comes later.
Sell: EMA crosses under SMA.
Strategy entry and exit conditions:
This version enters a Long when "TREND BUY" is signalled.
This version has Sell/Shorts disabled because UP ONLY.
Long entry: Strategy enters Long when EMA is above SMA, while overall trend bias is bullish.
Long exit: Close long when EMA crosses under SMA.
Equal-Length EMA/SMA Crossover Momentum Signal V1Overview:
This momentum and trend-following strategy captures the majority of any trending move, and works well on high timeframes.
It uses an equal-period EMA and SMA crossover to detect trend acceleration/deceleration, since an EMA places a greater weight and significance on the most recent data.
This version is optimized for longs, and designed to cut your losses quickly and let your winners run.
To reduce noise and optimize entries, we combined this with an overall trend bias for further confluence.
How it works:
Signals are determined by the crossover of an EMA and SMA of the same length, e.g. EMA-50 and SMA-50.
The overall trend bias is determined using a slower SMA golden/death cross, e.g. SMA-50 and SMA-100.
The signal is stronger when it occurs in confluence with the overall trend bias, e.g. when EMA-50 crosses over SMA-50, while above the SMA-100. This is analogous to only opening long positions in a bull market.
Signal description:
Trend Buy: EMA crosses above SMA, and overall trend bias is bullish. Buying is in confluence with the overall trend bias.
Risky Buy: EMA crosses above SMA, and overall trend bias is bearish. Buying is early, more risky, and not in confluence with the overall trend bias.
Late Buy: SMA crosses above BIAS_SLOW. This gives further confirmation of bullish trend, but signal comes later.
Sell: EMA crosses under SMA.
Everything RSIThis indicator includes:
RSI Candles set to the default 14 length (un check Borders in the Style tab to see the candlesticks better)
I like using the wicks as an early warning for a possible trend change, which is generally in the opposite direction of the wicks.
It's also easier for me to draw trend lines using the RSI Candles vs the rsi plot line.
40 ema of the RSI Candles
2nd RSI set to the 20 length , which plots just inside the wicks of the RSI Candles. This RSI also highlights Oversold and Overbought levels.
I sometimes leave the RSI Candle Borders checked and use the 20 RSI plot with the wicks of the RSI Candles
Signals to look for Short or Long opportunities , which use the 5 sma of the RSI Candles crossing under the overbought and over the
oversold levels. If you'd like to plot the 5 sma, remove the // at the beginning of the code on line 72.
3nd RSI set to the default 14 length which can be set to a different timeframe as the current chart. Default setting is the 1h.
This RSI plots a + at the top of the indicator when it's above the 50 level and an x at the bottom of the indicator when it's below the 50 level.
For me, this is just a visual aid when I'm scalping on lower timeframes.
If the 1h RSI is above the 50 level, I focus on long scalps. If the 1h RSI is below the 50 level, I focus on short scalps.
RSI Cloud which is formed by filling in the area between the 14 ema of both the 7 RSI and 28 RSI.
I used part of @FnM_Capital 's Trend-Sniper script for my RSI Candles. Thank you! You're extremely talented and deserve all of the credit for your work.
I'd also like to thank @SeanNance for answering all of my random coding questions!!!
I've added the indicator to the example twice to show a couple of the ways I view the RSI's.
The top indicator shows the RSI Candle Borders "un checked" and without the 2nd RSI plot.
The bottom indicator shows RSI Candle Borders "checked", using 2nd RSI plot with the RSI Candle Wicks.
CyclesThis is a modified Stochastic indicator. Modifications include:
1. The output is now centered on "0" and the scale is from -50 to +50, so that histograms and columns can be used to plot the output.
2. Added visual trade setup triggers. A trigger to the up side is a cycle high and indicates a "sell signal". A trigger to the down side is a cycle low and indicates a "buy" signal.
3. Added an alert trigger to be used to setup alerts. Selecting "Alert" to be Greater Than (>) Value = 0.00 will trigger an alert if either the buy or sell triggers occur.
4. Added a force indicator output. This indicates the rate of change in "D", or mathematically "dD/dt", as was done in the Power Analyzer indicator. When Force and D are in-phase, the maximum power is achieved.
5. Added "Slow Average Momentum" and "Slow Average Force" as was done in the Power Analyzer indicator.
6. Added an internal MACD and EMA as part of the trade setup trigger equation. There is a new input variable for the EMA length.
7. Added an input variable for the "Trigger Threshold", which ranges from -50 to 50, to be used as a screening filter.
BTC Volume Contango IndexBased on my previous script "BTC Contango Index" which was inspired by a Twitter post by Byzantine General:
This is a script that shows the contango between spot and futures volumes of Bitcoin to identify overbought and oversold conditions. When a market is in contango, the volume of a futures contract is higher than the spot volume. Conversely, when a market is in backwardation, the volume of the futures contract is lower than the spot volume.
The aggregate daily volumes on top exchanges are taken to obtain Total Spot Volume and Total Futures Volume. The script then plots (Total Futures Volume/Total Spot Volume) - 1 to illustrate the percent difference (contango) between spot and futures volumes of Bitcoin. This data by itself is useful, but because aggregate futures volumes are so much larger than spot volumes, no negative values are produced. To correct for this, the Z-score of contango is taken. The Z-score (z) of a data item x measures the distance (in standard deviations StdDev) and direction of the item from its mean (U):
Z-score = (x - U) / StDev
A value of zero indicates that the data item x is equal to the mean U, while positive or negative values show that the data item is above or below the mean (x Values of +2 and -2 show that the data item is two standard deviations above or below the chosen mean, respectively, and over 95.5% of all data items are contained within these two horizontal references). We substitute x with volume contango C, the mean U with simple moving average ( SMA ) of n periods (50), and StdDev with the standard deviation of closing contango for n periods (50), so the above formula becomes: Z-score = (C - SMA (50)) / StdDev(C,50).
When in contango, Bitcoin may be overbought.
When in backwardation, Bitcoin may be oversold.
The current bar calculation will always look incorrect due to TV plotting the Z-score before the bar closes.
Bank Nifty VolumeWhy this Script : Nifty 50 does not provide volume and some time it is really useful to understand the volume .
This is the pine script which calculate the nifty 50 volume .
Logic :
Take each stock contribute to nifty 50 and find it's volume .
Multiply the same with contribution percentage of the same on Nifty 50
Add up all of them and find the total volume .
I took the open source code from @daytraderph script called, Custom Volume
I will make sure I will update the contribution percentage of all stocks my self instead o you update using input methods. This is the difference. Some people don't know where to look at this to update the value, so for them this script might be useful. And this is the only difference comparing to Custom Volume script.
Probability: Bull/Bear Dominance | Ratio | Bar CountIntro
What's the probability of the next bar being red? How about green? Well, there are many ways to quantify the probability but I am presenting just one stupidly simple (but generally accurate) way to measure it.
Strangely... no one has done this before that I can find. I try to check if someone else has done it first (Pro Tip: Plz do this. We honestly don't need the 5 trillionth "MTF MAs" script.)
Indicator
Its a basic counting script, but the nice thing about this script is you choose the time range. It starts counting from a specified point of your choosing. It counts up the bull bars and bear bars separately.
Bull Bar = Close > Open
Bear Bar = Open > Close
You can look at them in sum or as a ratio of Green Bars : Red Bars
I know, it's almost too simple. But, here's some interesting food for thought from a layman to fellow laymen.
Analysis/Edge
Between the time of candle open and candle close, the price can do one of three things, close higher, close lower, or close equal to.
'Equal to' is rare on higher timeframes in liquid markets and it provides no useful information. Thus, we'll nix it for purposes of this conversation.
So boil it down. The next candle is going to be a red candle or a green candle.
It is popular to refer to the general probability of most candles as 50/50, with trader's mission in life being to seek an edge that tilts the probabilities slightly in their favor.
The truth is the odds are probably never actually 50/50, but knowing the precisely correct probability is unknowable, just like the accuracy of a weather forecast is inherently unknowable. What we're trying to do as traders is develop systems that give us predictive probabilistic outcomes that correspond with future realities based on various ways of measuring the market (most often heavily dependent on the past).
The reality is that the market can be measured in many, many different ways. The important thing is that you measure it in a way that is accurate, relevant, and universally applicable.
So look at this indicator here:
You start from a point in time on a chosen timeframe and you put red bars in the red column, green in the green column, and count them all up.
Then you make a ratio, in this case, Green : Red.
What the ratio shows you is the percentage of green bars compared to red bars . At the time of this screenshot, the 4h on the SPX starting from the 2020 bottom is showing a ratio of 1.2.
This means there have been 20% more green bars than there have been red bars.
Now there are 1,000 directions you can take this discussion. What is the overall volatility picture, the size of the red bars vs the green bars, what happens if you miss out on the 5 biggest green bars... so many more variables that you would need to take into account to develop a true edge from this idea. But, the bottom line fact (which is what I like about this) is that we can take this data and say with a certain level of confidence that on the SPX you have a 20% better shot at making money (otherwise stated there's a 60/40 chance) if you open a LONG trade at the beginning of a 4h candle than if you open a short.
That's useful information. One could argue that it's not a complete strategy in and of itself (although I bet it could be with a couple of additional parameters). But I can tell you, based on the 4h candles in the 2020 rally if you open a short, the deck is stacked against you from this perspective. And we can actually somewhat demonstrate this to be true for our dataset because we can look at the price history and see who likely made more money. The SPX is up 1000pts off the bottom. So, thus far, for this dataset, it rings true; Bulls have been doing way better in the latter part of 2020 than the bears.
Conclusion
Predictive systems with a small number of variables tend to be more robust than a system with many variables when applied to a complex system. I may keep updating this script if people like it and determine aspects like population vs sample size, confidence intervals, volatility, and exclusion of outliers. For now, this is just an opening foray into the basic idea of how we can establish an edge in the markets. It really can be this simple.
Thanks for Reading.
WR% VARIATIONThis indicator plot the change of the William R%.
We have 3 hlines, 50, 0, -50
You can use this as a confirmation indicator for different entries:
ENTRIES
When change is higher than 50 we have a strong LONG signal
When change is lower than -50 we have a strong SHORT signal
CONTINUATION TRADES
When we are in a Bull Market, candle is red and change crossover the 0 line, we have a LONG continuation trade
When we are in a Bear Market, candle is green and change crossunder the 0 line, we have a SHORT continuation trade
EXITS
When we are in a Bull Market, candle is green and change crossunder the 0 line, we have an Exit, or a Reversal
When we are in a Bear Market, candle is read and change crossover the 0 line, we have an Exit, or a Reversal
RISK-OFF.RISK.ON-ppxdf.v3======================================= RISK-OFF & RISK ON INDEX ================================================
1. Stock Price Momentum: Measuring the Standard & Poor's 500 Index ( S&P 500 ) versus its 125-day moving average (MA)
2. Stock Price Strength: Calculating the number of stocks hitting 52-week highs versus those hitting 52-week lows on the New York Stock Exchange (NYSE)
3. Stock Price Breadth: Analyzing trading volumes in rising stocks against declining stocks
4. Put and Call Options: How much do put options lag behind call options, signifying greed, or surpass them, indicating fear
5. Junk Bond Demand: Gauging appetite for higher risk strategies by measuring the spread between yields on investment-grade bonds and junk bonds
6. Market Volatility: CNN measures the Chicago Board Options Exchange Volatility Index ( VIX ), concentrating on a 50-day MA
7. Safe Haven Demand: The difference in returns for stocks versus treasuries
Each of these seven indicators is measured on a scale from 0 to 100, with the index being computed by taking an equal-weighted average of each of them.
A reading of 50 is deemed NEUTRAL.
Above 50 signals the market with RISK-ON. (GREED)
Below 50, Signals the market with RISK-OFF (FEAR)
8
Ultimate Moving Average Package (17 MA's)Included is the:
VWAP
Current time frame 10 EMA
Current time frame 20 EMA
Current time frame 50 EMA
Current time frame 10 SMA
Current time frame 20 SMA
Current time frame 50 SMA
Daily 10 EMA
Daily 20 EMA
Daily 50 EMA
Daily 50 SMA
Daily 100 SMA
Daily 200 SMA
Weekly 100 SMA
Weekly 200 SMA
Monthly 100 SMA
Monthly 200 SMA
All Daily/Weekly/Monthly MA's can be seen on intraday charts. Current time frame MA's change depending on your time frame. Obviously you dont need all 17 on your chart but you can pick the ones you like and disable the rest.
OVL_Kikoocycle Beta_Pine3This script use :
- A custom Chande Kroll Stop for generate the channel
- Some custom Parabolic S.A.R for generate cycles
This script can be separated into 3 categories:
- Channel Kroll generator : one layer for the actual interval and a layer for a Large Timeframe .(with ratio)
- "Range" generator : one layer for actual Interval and a layer for a Large Timeframe.(with automique ratio)
-Targets generator : one layer for actual interval with different trend.
"Channel Kroll" :
- I "hijack" the Chande Kroll Stop formula with custom parameters for generate this channel. Overall, it works like other types of channels like BB, etc... A midline and two borders. The thickness of the borders are relatively important here. A thick border shows some resistance of the area. And so the probability of seeing the market return to its first contact is stronger. While a very thin and vertical border would rather play the role of a breach, a bit like the idea of gaps. Often the market seems to want to go after several cycles.
You can activate its Large TimeFrame version, its midline is strong and fine borders helps to judge the risk.
SARget + "SAR Limited" :
- (S.A.R + targets) The philosophy of this function is simple... When a small cycle is broken, it creates a mark on a higher cycle. So on until the SAR called "SAR Limited". For simplicity, imagine a fractal image but inverted ... Break the small figure, it will mark the larger figure at this time but to get there you still have to make the way to the small figure.
Targets are : cross ("+") for fast targets(hidden by default because, theire work only on lower interval), squares (for medium trend), Xcross(for large trend) and red cross(they try to find a large contexte). When a target proc, it is for later (market need some cycles for going to, but it is relative to your interval). This gives you speculative goals.
Why 2 targets for a same type and a triangle with a 90deg angle : This give a potential area for management.The triangle help to visualize the SAR and to juge the market reaction. You need to adapte your trade with that...
Targets may be slightly too far because I am a bad coder... Currently the targets appear at the moment of rupture but it would be necessary to wait for the end of the breaking movement. Which can bring a positional error if the break is violent.
RnG and LTF RnG :
- Attempt to generate a Fibo range for each cycle and see interressing areas to enter or exit. This is played with the same philosophy as the Fibo extensions and retracement.
When a new RnG is generated, do not rush. It appears showing 50/50 for both sides. When a new RnG is generated, do not rush. It appears showing 50/50 for both sides. As long as the market is out of the middle zone (the 3 lines) keep in mind the past RnG.
When the market is out of range, you can use the FibRetracement tool for have extensions. One point at each end, as on the presentation graph. (Values 1.14, 1.272, 1.414, 1.618, 1.786, 2, 2.4 and 4 work well.) If too extrem you can active the LTF version.
Never fomo a break, market like to pull a level... Observe and be patient.
It's easier to use than to explain xD
NB : Do not use the LTF as context. For this, it is better to look at a higher interval.
I invite you to look in the style tab of the script and deselect the plots named UNCHECKEME, this will ease your browser.
Amazing Crossover System - 100+ pips per day!I got the main concept for this system on another site. While I have made one important change, I must stress that the heart of this system was created by someone else! We must give credit where credit is due!
Y'all know baby pips. @ForexPhantom published about this system and did both back and forward test around 10 years ago.
I found it on the sit and now I put it to code to see how it performs. I assume 10 points spread for every trade. I use Renesource or AxiTrader to get the low spreads.
There are 2 mods, the single trades and constant trading on the direction.
Main concept
Indicators
5 EMA -- YELLOW
10 EMA -- RED
RSI (10 - Apply to Median Price: HL/2) -- One level at 50.
TIME FRAME
1 Hour Only (very important!)
PAIRS
Virtually any pair seems to work as this is strictly technical analysis.
I recommend sticking to the main currencies and avoiding cross currencies (just his preference).
WHEN TO ENTER A TRADE
Enter LONG when the Yellow EMA crosses the Red EMA from underneath.
RSI must be approaching 50 from the BOTTOM and cross 50 to warrant entry.
Enter SHORT when the Yellow EMA crosses the Red EMA from the top.
RSI must be approaching 50 from the TOP and cross 50 to warrant entry.
I've attached a picture which demonstrates all these conditions.
That's it!
f.bpcdn.co
MFIww MFI/RSI_v2[wozdux]A new version of the indicator Mfi_v2. Added new control parameters.
tt - the averaging period of the volume.
Len - the period for calculating the MPI.
nn-averaging period MFI (blue line). level-critical levels from below and above (black horizontal lines).
Level 0 or 50 - switch between different histogram views with the middle at either level 50 or level 0.
key level-key to remove black critical levels.
key ema (MFI, nn) - key to remove mfi averaging (blue line).
key color-key to remove histogram coloring.
key colomns a-line - key switching modes represent the mfi histrogram or line.
---------------------------
Новая версия индикатора MFIww_v2. Добавлены новые управляющие параметры.
tt- период усреднения объема.
Len - период вычисления MFI.
nn- период усреднения MFI (голубая линия).
level- критические уровни снизу и сверху (черные горизонтальные линии).
Level 0 or 50 - переключение между разными представлениями гистрограммы с серединой либо на уровне 50 , либо на уровне 0.
key level- ключ убрать черные критические уровни.
key ema(mfi,nn) - ключ убрать усреднение mfi (голубая линия).
key color- ключ убрать расцветку гистрограммы.
key colomns-line - ключ переключения режимов представления mfi гистрограммой или линией.
GoTiT|Simple Auto Fib v1.0Simple Auto Fib!
Notes:
1. Always set the trend manually! Don't rely on the auto trend detection.
2. The first parameter Length sets the number of candles back (left) to search for highs and lows from the current candle.
3. The High Offset parameter sets the number of candles back (left) to ignore/skip before searching for highs.
4. The Low Offset parameter sets the number of candles back (left) to ignore/skip before searching for lows.
5. The offset parameters change the behavior of the Length parameter.
Example 1:
Length = 100
High Offset = 0
Low Offset = 0
This is the default behavior, and the search for highs and lows occurs on the last 100 candles.
Example 2:
Length = 50
High Offset = 20 (Ignore the last 20 candles, and search for highs starting at candle 21 to 71 (or 50 candles back)
Low Offset = 15 (Ignore the last 15 candles, and search for lows starting at candle 16 to 66 (or 50 candles back)
In example 2, search starts on candle 21 for highs, and candle 16 for lows and extends 50 candles further back from there.
6. The Trend Detection parameter sets the number of candles back (left) to use in the trend calculations. Larger values give better "marco trend" detection. Smaller values give better "micro trend" detection. See note #1.
7. The white fib line is fib0. Assuming you correctly set the trend manually (or the trend is auto detected correctly), in a downtrend fib0 should be bellow the red fib line, and in an uptrend fib0 should be above the red fib line.
MACD + Stochastic + RSI (Long + Short)My strategy uses a combination of three indicators MACD Stochastic RSI .
The Idea is to GO LONG when ( MACD > Signal and RSI > 50 and Stochastic > 50) occures at the same time
and GO SHORT when ( MACD < Signal and RSI < 50 and Stochastic < 50)
This strategy works well on futures and stocks especially during market breaking up after consolidation
The best results are on Daily charts , so its NOT a scalping strategy. But it can work also on 1H charts.
The strategy does not have any stops and profit targets, so we can take all the market can give us at the moment.
The exit point only when MACD goes under/over Signal line
Its Preformance is quite stable.
So, use it, trade it.
If it will help you to imprive your trading results, please donate me
BTC: 12kd1F8buWisUBdq27BBwRkUvzW7Ey3og5
Trend Lines and MoreMulti-Indicator consisting of several useful indicators in a single package.
TREND LINES
-By default the 20 SMA and 50 SMA are shown.
-Use "MOVING AVERAGE TYPE" to select SMA, EMA, Double-EMA, Triple-EMA, or Hull.
-Use "50 MA TREND COLOR" to have the 50 turn green/red for uptrend/downtrend.
-Use "DAILY SOURCE ONLY" to always show daily averages regardless of timeframe.
-Use "SHOW LONG MA" to also include 100, 150, and 200 moving averages.
-Use "SHOW MARKERS" to show a small colored marker identifying which line is which.
OTHER INDICATORS
-You can show Bollinger Bands and Parabolic SAR.
-You can highlight key reversal times (9:50-10:10 and 14:40-15:00).
-You can show price offset markers, where was the price "n" periods ago.
That last one is useful to show the level of prices which are about to "fall off" the moving average
and be replaced with current price. So for example, if current price is significantly below the
200-days-ago price, you can gauge the difficulty for the 200 MA to start climbing again.
Multi SMA EMA WMA HMA BB (4x3 MAs Bollinger Bands) Pro MTF - RRBMulti SMA EMA WMA HMA 4x3 Moving Averages with Bollinger Bands Pro MTF by RagingRocketBull 2018
Version 1.0
This indicator shows multiple MAs of any type SMA EMA WMA HMA etc with BB and MTF support, can show MAs as dynamically moving levels.
There are 4 MA groups + 1 BB group. You can assign any type/timeframe combo to a group, for example:
- EMAs 50,100,200 x H1, H4, D1, W1 (4 TFs x 3 MAs x 1 type)
- EMAs 8,13,21,55,100,200 x M15, H1 (2 TFs x 6 MAs x 1 type)
- D1 EMAs and SMAs 12,26,50,100,200,400 (1 TF x 6 MAs x 2 types)
- H1 WMAs 7,77,231; H4 HMAs 50,100,200; D1 EMAs 144,169,233; W1 SMAs 50,100,200 (4 TFs x 3 MAs x 4 types)
- +1 extra MA type/timeframe for BB
compile time: 25-30 sec
full redraw time after parameter change in UI: 3 sec
There are several versions: Simple, MTF, Pro MTF, Advanced MTF and Ultimate MTF. This is the Pro MTF version. The Differences are listed below. All versions have BB
- Simple: you have 2 groups of MAs that can be assigned any type (5+5)
- MTF: +2 custom Timeframes for each group (2x5 MTF)
- Pro MTF: +4 custom Timeframes for each group (4x3 MTF), MA levels and show max bars back options
- Advanced MTF: +2 extra MAs/group (4x5 MTF), custom Ticker/Symbol, backreferences for type, TF and MA lengths in UI
- Ultimate MTF: +individual settings for each MA, custom Ticker/Symbols
Features:
- 4x3 = 12 MAs of any type including Hull Moving Average (HMA)
- 4x MTF groups with step line smoothing
- BB +1 extra TF/type for BB MAs
- 12 MA levels with adjustable group offsets, indents and shift
- show max bars back
- you can show/hide both groups of MAs/levels and individual MAs
Notes:
1. based on 3EmaBB, uses plot*, barssince and security functions
2. you can't set certain constants from input due to Pinescript limitations - change the code as needed, recompile and use as a private version
3. Levels = trackprice implementation
4. Show Max Bars Back = show_last implementation
5. uses timeframe textbox instead of input resolution to allow for 120 240 and other custom TFs. Also supports TFs in hours: 2H or H2
6. swma has a fixed length = 4, alma and linreg have additional offset and smoothing params
7. Smoothing is applied by default for visual aesthetics on MTF. To use exact ma mtf values (lines with stair stepping) - disable it
MTF Notes:
- uses simple timeframe textbox instead of input resolution dropdown to allow for 120, 240 and other custom TFs, also supports timeframes in H: 2H, H2
- Groups that are not assigned a Custom TF will use Current Timeframe (0).
- MTF will work for any MA type assigned to the group
- MTF works both ways: you can display a higher TF MA/BB on a lower TF or a lower TF MA/BB on a higher TF.
- MTF MA values are normally aligned at the boundary of their native timeframe. This produces stair stepping when a higher TF MA is viewed on a lower TF.
Therefore X Y Point Density/Smoothing is applied by default on MA MTF for visual aesthetics. Set both to 0 to disable and see exact ma mtf values (lines with stair stepping and original mtf alignment).
- Smoothing is disabled for BB MTF bands because fill doesn't work with smoothed MAs after duplicate values are replaced with na.
- MTF MA Value fluctuation is possible on the current bar due to default security lookahead
Smoothing:
- X,Y == 0 - X,Y smoothing disabled (stair stepping on high TFs)
- X == 0, Y > 0 - X,Y smoothing applied to all TFs
- Y == 0, X > 0 - X smoothing applied to all TFs < deltaX_max_tf, Y smoothing disabled
- X > 0, Y > 0 - Y smoothing applied to all TFs, then X smoothing applied to all TFs < deltaX_max_tf
X Smoothing with Y == 0 - shows only every deltaX-th point starting from the first bar.
X Smoothing with Y > 0 - shows only every deltaX-th point starting from the last shown Y point, essentially filling huge gaps remaining after Y Smoothing with points and preserving the curve's general shape
X Smoothing on high TFs with already scarce points produces weird curve shapes, it works best only on high density lower TFs
Y Smoothing reduces points on all TFs, removes adjacent points with prices within deltaY, while preserving the smaller curve details.
A combination of X,Y produces the most accurate smoothing. Higher delta value - larger range, more points removed.
Show Max Bars Back:
- can't set plot show_last from input -> implemented using a timenow based range check
- you can't delete/modify history once plotted, so essentially it just sets a start point for plotting (from num_bars bars back) that works only in realtime mode (not in replay)
Levels:
You can plot current MA value using plot trackprice=true or by checking Show Price Line in Style. Problem is:
- you can only change color (not the dashed line style, width), have both ma + price line (not just the line), and it's full screen wide
- you can't set plot trackprice from input => implemented using plotshape/plotchar with fixed text labels serving as levels
- there's no other way of creating a dynamic level: hline, plot, offset - nothing else works.
- you can't plot a text var - all text strings must be constants, so you can't change the style, width and text labels without recompiling.
- from input you can only adjust offset, indent and shift for each level group, and change color
- the dot below each level line is the exact MA value. If you want just the line swap plotshape with plotchar, recompile and save as your private version, adjust Y shift.
To speed up redraw times: reduce last_bars to ~2000, recompile and use as your own private version
Pinescript is a rudimentary language (should be called Painscript instead) that can basically only plot data. You can't do much else. Please see the code for tips and hints.
Certain things just can't be done or require shady workarounds and weeks of testing trying to resolve weird node.js compiler errors.
Feel free to learn from/reuse/change the code as needed and use as your own private version. See comments in code. Good Luck!
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
Noro's Double RSI Strategy 1.0Strategy uses only 2 RSI indicators. Slow and fast.
If slow RSI > 50 and fast RSI < 50 - to open a long-position
If slow RSI < 50 and fast RSI > 50 - to open a short-position
If the long-position is open and a candle green - to close a long-position
if the short-position is open and a candle red - to close a short-position
GoldenCross by PuffyThis is a simple trading strategy that seeks the Golden Cross and Death Cross on the 4HR chart. The fast moving indicator in this strategy is the EMA 50 and the slow moving indicator is the EMA 200. When the EMA 50 crosses over the EMA 200 the strategy indicates a buy. When the EMA 50 crosses below the EMA 200 the strategy indicates a sell. This strategy averages trades in the 40 - 50 day range and as such should not be used with heavy leverage.