PseudoPlotLibrary "PseudoPlot"
PseudoPlot: behave like plot and fill using polyline
This library enables line plotting by polyline like plot() and fill().
The core of polyline() is array of chart.point array, polyline() is called in its method.
Moreover, plotarea() makes a box in main chart, plotting data within the box is enabled.
It works so slowy to manage array of chart.point, so limit the target to visible area of the chart.
Due to polyline specifications, na and expression can not be used for colors.
1. pseudoplot
pseudoplot() behaves like plot().
//use plot()
plot(close)
//use pseudoplot()
pseudoplot(close)
Pseudoplot has label. Label is enabled when title argument is set.
In the example bellow, "close value" label is shown with line.
The label is shown at right of the line when recent bar is visible.
It is shown at 15% from the left of visible area when recent bar is not visible.
Just set "" if you don't need label.
//use plot()
plot(close,"close value")
//use pseudoplot
pseudoplot(close, "close value")
Arguments are designed in an order as similar as possible to plot.
plot(series, title, color, linewidth, style, trackprice, histbase, offset, join, editable, show_last, display, format, precision, force_overlay) → plot
pseudoplot(series, title, ,linecolor ,linewidth, linestyle, labelbg, labeltext, labelsize, shorttitle, format, xpos_from_left, overlay) → pseudo_plot
2. pseudofill
pseudofill() behaves like fill().
The label is shown(text only) at right of the line when recent bar is visible.
It is shown at 10% from the left of visible area when recent bar is not visible.
Just set "" if you don't need label.
//use plot() and fill()
p1=plot(open)
p2=plot(close)
fill(p1,p2)
//use pseudofill()
pseudofill(open,close)
Arguments are designed in an order as similar as possible to fill.
fill(hline1, hline2, color, title, editable, fillgaps, display) → void
pseudofill(series1, series2, fillcolor, title, linecolor, linewidth, linestyle, labeltext, labelsize, shorttitle, format, xpos_from_left, overlay) → pseudo_plot
3. plotarea and its methods
plotarea() makes a box in main chart. You can set the box position to top or bottom, and
the box height in percentage of the range of visible high and low prices.
x-coordinate of the box is from chart.left_visible_bar_time to chart.right_visible_bar_time,
y-coordinate is highest and lowest price of visible bars.
pseudoplot() and pseudofill() work as method of plotarea(box).
Usage is almost same as the function version, just set min and max value, y-coodinate is remapped automatically.
hline() is also available. The y-coordinate of hline is specified as a percentage from the bottom.
plotarea() and its associated methods are overlay=true as default.
Depending on the drawing order of the objects, plot may become invisible, so the bgcolor of plotarea should be na or tranceparent.
//1. make a plotarea
// bgcolor should be na or transparent color.
area=plotarea("bottom",30,"plotarea",bgcolor=na)
//2. plot in a plotarea
//(min=0, max=100 is omitted as it is the default.)
area.pseudoplot(ta.rsi(close,14))
//3. draw hlines
area.hline(30,linestyle="dotted",linewidth=2)
area.hline(70,linestyle="dotted",linewidth=2)
4. Data structure and sub methods
Array management is most imporant part of using polyline.
I don't know the proper way to handle array, so it is managed by array and array as intermediate data.
(type xy_arrays to manage bar_time and price as independent arrays.)
method cparray() pack arrays to array, when array includes both chart.left_visible_bar_time and chart.right_visible_bar.time.
Calling polyline is implemented as methods of array of chart.point.
Method creates polyline object if array is not empty.
method polyline(linecolor, linewidth, linestyle, overlay) → series polyline
method polyline_fill(fillcolor, linecolor, linewidth, linestyle, overlay) → series polyline
Also calling label is implemented as methods of array of chart.point.
Method creates label ofject if array is not empty.
Label is located at right edge of the chart when recent bar is visible, located at left side when recent bar is invisible.
label(title, labelbg, labeltext, labelsize, format, shorttitle, xpos_from_left, overlay) → series label
label_for_fill(title, labeltext, labelsize, format, shorttitle, xpos_from_left, overlay) → series label
visible_xyInit(series)
make arrays of visible x(bar_time) and y(price/value).
Parameters:
series (float) : (float) series variable
Returns: (xy_arrays)
method remap(this, bottom, top, min, max)
Namespace types: xy_arrays
Parameters:
this (xy_arrays)
bottom (float) : (float) bottom price to ajust.
top (float) : (float) top price to ajust.
min (float) : (float) min of src value.
max (float) : (float) max of src value.
Returns: (xy_arrays)
method polyline(this, linecolor, linewidth, linestyle, overlay)
Namespace types: array
Parameters:
this (array)
linecolor (color) : (color) color of polyline.
linewidth (int) : (int) width of polyline.
linestyle (string) : (string) linestyle of polyline. default is line.style_solid("solid"), others line.style_dashed("dashed"), line.style_dotted("dotted").
overlay (bool) : (bool) force_overlay of polyline. default is false.
Returns: (polyline)
method polyline_fill(this, fillcolor, linecolor, linewidth, linestyle, overlay)
Namespace types: array
Parameters:
this (array)
fillcolor (color)
linecolor (color) : (color) color of polyline.
linewidth (int) : (int) width of polyline.
linestyle (string) : (string) linestyle of polyline. default is line.style_solid("solid"), others line.style_dashed("dashed"), line.style_dotted("dotted").
overlay (bool) : (bool) force_overlay of polyline. default is false.
Returns: (polyline)
method label(this, title, labelbg, labeltext, labelsize, format, shorttitle, xpos_from_left, overlay)
Namespace types: array
Parameters:
this (array)
title (string) : (string) label text.
labelbg (color) : (color) color of label bg.
labeltext (color) : (color) color of label text.
labelsize (int) : (int) size of label.
format (string) : (string) textformat of label. default is text.format_none("none"). others text.format_bold("bold"), text.format_italic("italic"), text.format_bold+text.format_italic("bold+italic").
shorttitle (string) : (string) another label text for recent bar is not visible.
xpos_from_left (int) : (int) another label x-position(percentage from left of chart width), when recent bar is not visible. default is 15%.
overlay (bool) : (bool) force_overlay of label. default is false.
Returns: (label)
method label_for_fill(this, title, labeltext, labelsize, format, shorttitle, xpos_from_left, overlay)
Namespace types: array
Parameters:
this (array)
title (string) : (string) label text.
labeltext (color) : (color) color of label text.
labelsize (int) : (int) size of label.
format (string) : (string) textformat of label. default is text.format_none("none"). others text.format_bold("bold"), text.format_italic("italic"), text.format_bold+text.format_italic("bold+italic").
shorttitle (string) : (string) another label text for recent bar is not visible.
xpos_from_left (int) : (int) another label x-position(percentage from left of chart width), when recent bar is not visible. default is 10%.
overlay (bool) : (bool) force_overlay of label. default is false.
Returns: (label)
pseudoplot(series, title, linecolor, linewidth, linestyle, labelbg, labeltext, labelsize, shorttitle, format, xpos_from_left, overlay)
polyline like plot with label
Parameters:
series (float) : (float) series variable to plot.
title (string) : (string) title if need label. default value is ""(disable label).
linecolor (color) : (color) color of line.
linewidth (int) : (int) width of line.
linestyle (string) : (string) style of plotting line. default is "solid", others "dashed", "dotted".
labelbg (color) : (color) color of label bg.
labeltext (color) : (color) color of label text.
labelsize (int) : (int) size of label text.
shorttitle (string) : (string) another label text for recent bar is not visible.
format (string) : (string) textformat of label. default is text.format_none("none"). others text.format_bold("bold"), text.format_italic("italic"), text.format_bold+text.format_italic("bold+italic").
xpos_from_left (int) : (int) another label x-position(percentage from left of chart width), when recent bar is not visible. default is 15%.
overlay (bool) : (bool) force_overlay of polyline and label.
Returns: (pseudo_plot)
method pseudoplot(this, series, title, linecolor, linewidth, linestyle, labelbg, labeltext, labelsize, shorttitle, format, xpos_from_left, min, max, overlay)
Namespace types: series box
Parameters:
this (box)
series (float) : (float) series variable to plot.
title (string) : (string) title if need label. default value is ""(disable label).
linecolor (color) : (color) color of line.
linewidth (int) : (int) width of line.
linestyle (string) : (string) style of plotting line. default is "solid", others "dashed", "dotted".
labelbg (color) : (color) color of label bg.
labeltext (color) : (color) color of label text.
labelsize (int) : (int) size of label text.
shorttitle (string) : (string) another label text for recent bar is not visible.
format (string) : (string) textformat of label. default is text.format_none("none"). others text.format_bold("bold"), text.format_italic("italic"), text.format_bold+text.format_italic("bold+italic").
xpos_from_left (int) : (int) another label x-position(percentage from left of chart width), when recent bar is not visible. default is 15%.
min (float)
max (float)
overlay (bool) : (bool) force_overlay of polyline and label.
Returns: (pseudo_plot)
pseudofill(series1, series2, fillcolor, title, linecolor, linewidth, linestyle, labeltext, labelsize, shorttitle, format, xpos_from_left, overlay)
fill by polyline
Parameters:
series1 (float) : (float) series variable to plot.
series2 (float) : (float) series variable to plot.
fillcolor (color) : (color) color of fill.
title (string)
linecolor (color) : (color) color of line.
linewidth (int) : (int) width of line.
linestyle (string) : (string) style of plotting line. default is "solid", others "dashed", "dotted".
labeltext (color)
labelsize (int)
shorttitle (string)
format (string) : (string) textformat of label. default is text.format_none("none"). others text.format_bold("bold"), text.format_italic("italic"), text.format_bold+text.format_italic("bold+italic").
xpos_from_left (int) : (int) another label x-position(percentage from left of chart width), when recent bar is not visible. default is 15%.
overlay (bool) : (bool) force_overlay of polyline and label.
Returns: (pseudoplot)
method pseudofill(this, series1, series2, fillcolor, title, linecolor, linewidth, linestyle, labeltext, labelsize, shorttitle, format, xpos_from_left, min, max, overlay)
Namespace types: series box
Parameters:
this (box)
series1 (float) : (float) series variable to plot.
series2 (float) : (float) series variable to plot.
fillcolor (color) : (color) color of fill.
title (string)
linecolor (color) : (color) color of line.
linewidth (int) : (int) width of line.
linestyle (string) : (string) style of plotting line. default is "solid", others "dashed", "dotted".
labeltext (color)
labelsize (int)
shorttitle (string)
format (string) : (string) textformat of label. default is text.format_none("none"). others text.format_bold("bold"), text.format_italic("italic"), text.format_bold+text.format_italic("bold+italic").
xpos_from_left (int) : (int) another label x-position(percentage from left of chart width), when recent bar is not visible. default is 15%.
min (float)
max (float)
overlay (bool) : (bool) force_overlay of polyline and label.
Returns: (pseudo_plot)
plotarea(pos, height, title, bordercolor, borderwidth, bgcolor, textsize, textcolor, format, overlay)
subplot area in main chart
Parameters:
pos (string) : (string) position of subplot area, bottom or top.
height (int) : (float) percentage of visible chart heght.
title (string) : (string) text of area box.
bordercolor (color) : (color) color of border.
borderwidth (int) : (int) width of border.
bgcolor (color) : (string) color of area bg.
textsize (int)
textcolor (color)
format (string)
overlay (bool) : (bool) force_overlay of polyline and label.
Returns: (box)
method hline(this, ypos_from_bottom, linecolor, linestyle, linewidth, overlay)
Namespace types: series box
Parameters:
this (box)
ypos_from_bottom (float) : (float) percentage of box height from the bottom of box.(bottom is 0%, top is 100%).
linecolor (color) : (color) color of line.
linestyle (string) : (string) style of line.
linewidth (int) : (int) width of line.
overlay (bool) : (bool) force_overlay of polyline and label.
Returns: (line)
pseudo_plot
polyline and label.
Fields:
p (series polyline)
l (series label)
xy_arrays
x(bartime) and y(price or value) arrays.
Fields:
t (array)
p (array)
FILL
LibyanSatoshi Wick FillThis is an indicator for wick fill strategy, It is an approach that focuses on the movement of price back into the 50% of a previous candle's wick. Here's an overview of this strategy:
The strategy is based on the idea that price often retraces to fill gaps or wicks left by strong moves in the market.
It particularly looks at candles with long wicks, which represent areas where price moved significantly but then reversed.
Long Wick Candles : These are candles where the wick (upper or lower shadow) is significantly longer than the body.
Trading Approach:
Entry: Traders enter a position when price starts moving back into the wick of a previous candle.
Stop Loss: Often placed beyond the end of the wick being filled.
Take Profit: Can be set at the opposite end of the candle whose wick is being filled, or at other significant levels.
Confluence:
Most effective when combined with other technical analysis tools or when the wick coincides with significant support/resistance levels.
Risks:
Not all wicks get filled, and price can reverse before reaching the full extent of the wick.
False signals can occur in choppy or ranging markets.
Benefits:
Provides clear entry and exit points.
Can be an effective way to enter trends or identify potential reversals.
Considerations:
Market sentiment is crucial; wick fills may have different implications in trending vs. ranging markets.
The size of the wick and the time frame it appears on can affect the reliability of the signal.
While the wick fill strategy can be a useful tool in a trader's arsenal, it's important to use it in conjunction with other forms of analysis and proper risk management. As with any trading strategy, it's not foolproof and requires practice and discretion to use effectively.
Will my limit order be filled ?Hi
This is a small script that tries to assess the probability that a limit order sent at x % from the last close will be filled in the next y bars.
It is based on historical data and can be useful to decide where to place your limit orders and to determine how far from the price you can put the limit order to get an X% chance of getting filled.
It displays this result for both long and short entries and you can specify if you want to fill orders with wicks or not.
Composite Cosmetic CandlesThis is effectively version 2 of my script "Candle Fill % Meter", with a few different/more options available in a more compact form. Choose between multiple oscillator sources, # of dividing lines, and solid or gradient candle fill. Once again this script is intended for use with hollow candles! This script enables you to see more information with less screen space taken up, not to mention it looks nice. Labels by last bar also toggleable in the settings.
heikin ashi calculation call with higher timeframe
Hello, guys
This indicater displays the previous value of higher timeframe without request.security() function.
You can change the candle style ( heikinashi or normal) on the set box.
you can choose the higher timeframe also.
I made this to avoid the repainting.
Without Box() function, i only used plotcandle and fill.
It was good fun.
Good luck !!
SUPER Alligator[Gabbo]this indicator serves to differentiate the classic type Line and source of Alligator
There are the classic inputs for the 3 lines ( Jaw , Teeth and Lips ) in addition to the choice of the normal source and the type of line, the choices are:
SMA = Simple moving average
EMA = Exponential moving average
WMA = Weighted moving average
RMA = Rolling moving average
HMA = Hull moving average
JMA = Jurik moving average
DEMA = Double exponential moving average
TEMA = Triple exponential moving average
LSMA = Least squares moving average
VWMA = Volume-weighted moving average
SMMA = Moving average Smoothed
KAMA = Kaufman Moving Average Adaptive
ALMA = Arnaud Legoux moving average
FRAMA = Fractal Adaptive moving average
VIDYA = Variable Index Dynamic Average
There are also Inputs that are valid only for some styles such as:
JMA = "Phase" and "Power"
ALMA = "Offset" and "Sigma"
FRAMA = "Lower shift ( FC )" and "Upper shift ( SC )"
VIDYA = "Fixed CMO Lenght (9)?" and "Calculation Method: CMO/StDev?"
Selecting the input: "Use Different Source ???" you can use a source with multiple elements of your choice:
2 = (Source 1 + Source 2) / 2
3 = (Source 1 + Source 2 + Source 3) / 3
4 = (Source 1 + Source 2 + Source 3 + Source 4) / 4
5 = (Source 1 + Source 2 + Source 3 + Source 4 + Source 5) / 5
These are the editable Inputs for Plots:
"Jaw/ Teeth/ Lips ???" = to arm / disarm the Lines
"Fill Line???" = to insert / de-sensitize the fill of the Long and Short Lines - Long = Lips> Teeth> Jaw - Short = Jaw> Teeth> Jaw - Neutral = rest
"Fill Background???" = to insert / desensit the background of the Long and Short Lines - Long = Lips> Teeth> Jaw - Short = Jaw> Teeth> Jaw - Neutral = rest
Candle Wick Patterns Alerts & Liquidity TargetsCandle wicks provide incredibly useful confluence and confirmation of price action and technical analysis.
Quite simply a wick is formed by price being moved to an extreme by one side, then price being pushed back by the other side.
This can show increased pressure by one side, reduced or increased momentum, or exhaustion by another side.
This indicator while simple, is extremely powerful and versatile and can be set up to recognize numerous types of candle wick and therefore suit numerous trading styles.
The settings as to how wicks are highlighted are:
- Timeframe - view wicks on a higher timeframe while trading on a lower timeframe
- Minimum Wick to Body Ratio - increasing this value will look for wicks who are at least n times larger than the candle body. The most obvious examples here are Doji's - hammer, gravestone, dragonfly, etc. These can indicate trend reversals, indecision and changing momentum.
- Minimum Candle Body as percent of price - this value makes sure that any wick highlighted, belongs to a candle with a body that is at least n% of the price. A higher value is likely to show price momentum is stronger in a particular direction, good for confirming a trend.
- Minimum Candle Wick as percent of price - similar to candle bodies, this value will make sure the candle wick is at least n% of the price. This will identify large fluctuations in price, and if you are familiar with smart money concepts, an increasingly popular strategy is to target 50% of the wick being filled (liquidity).
- Show half fill level of wick - As above, this can provide a good target, which price will be drawn to, depending on the wick.
Finally, the indicator can be used to create alerts when a new wick that meets your settings criteria, is formed.
And don't forget you can add the indicator multiple times, with different settings to cover multiple scenarios and timeframes!
Candle Fill % MeterFor use with Hollow Candles
Fills Candles based on either the value of the RSI or coppock scaled to fit properly between the open and close. Makes for a compact visual with lot's of information given. Toggle bells and whistles in settings such as arrows to indicate the direction of the value being measured, dividing levels, fill from candle open all the time instead of the bottom up and more.
RSI - colour fillThis script showcases the new (overload) feature regarding the fill() function! 🥳
2 plots could be filled before, but with just 1 colour per bar, now the colour can be a gradient type.
In this example we have 2 plots
- rsiPlot , which plots the rsi value
- centerPlot, which plots the value 50 ('centre line')
Explanation of colour fill in the zone 50-80
Default when rsi > 50
- a bottom value is set at 50 (associated with colour aqua)
- and a top value is set at 80 (associated with colour red)
This zone (bottom -> top value) is filled with a gradient colour (50 - aqua -> 80 - red)
When rsi is towards 80, you see a red coloured zone at the rsi value,
while when rsi is around 50, you'll only see the colour aqua
The same principle is applied in the zone 20-50 when rsi < 50
Cheers!
Educational: FillThis script showcases the latest feature of colour fill between lines with gradient
There are 17 ema's, all with adjustable lengths.
In the settings there are 3 options: '1' , '2' , and '1 & 2' :
Option '1'
Here the highest - lowest lines are filled with a gradient colour,
dependable where the 3rd highest/lowest ema is situated in regard of these 2 lines:
Option '2'
Here the colour fill is applied between every ema and the one next to it.
The gradient colour is dependable where the ema is situated in regard of the highest - lowest line:
Option '1 & 2'
A combination of both options:
The setting 'switch colours at ema x' regulates the switch between bullish and bearish colours.
When close is above the chosen ema -> bullish colours, when below -> bearish colours.
Examples of other settings of 'switch colours at ema x' :
Colour switch when close above/below:
ema 14
ema 11
ema 8
ema 5
ema 2
The colours can be set below, both for option '1' and '2'
Cheers!
Moving Averages System - DurbtradeMoving Averages System - Durbtrade
1 indicator... customizable.
Displays up to 4 independent Moving Averages (MA's) at once.
Each MA can be 1 of 6 "MA Types" : SMA, EMA, WMA, VWMA, HMA, or DEMA.
There are 7 individual fills...
4 "MA/Source Fills" and 3 "MA/MA Fills".
The "Source" is selectable,
and there is a "Source Plot" option
to display a plot of the source.
No max value for MA "Length".
Each MA has what I call a "Length Multiplier",
and each MA has its own "Offset".
The colors of each MA,
as well as the Source Plot,
can be up/down "Color-Changing", or solid.
"Line Thickness" is unlimited.
Each of the 3 "MA/MA Fills" allow you to select which 2 of the 4 MA's to fill between!
All 7 fills are customizable by above/below colors, and opacity.
All 7 fills include a "Color Swap" option,
in the case that you need to switch the display of the above-color to the below-color,
and the below-color to the above-color!
All plots are scripted to be drawn visually in front of all fills!
Lastly, you can turn off the display of the MA plots and the Source Plot...
allowing the display of only fills!
--------------------------------------------
--------------------------------------------
Let's take a more detailed look!
First, let's go through the settings, and how to use the Moving Averages System.
You can divide the Inputs tab of the indicator settings into 3 main sections...
1 - Moving Averages
2 - Source Plot, and MA/Source Fills
3 - MA/MA fills
Let's discuss the first section, which is where we set up our MA's.
Here, we see the parameters for our 4 Moving Averages :
All 4 MA's can be customized here in the following ways...
- Toggle ON/OFF by checking the checkbox
- Length
- Length Multiplier
- Type (SMA, EMA, WMA, VWMA, HMA, or DEMA)
- Up/Down Color Change ON/OFF
- Line Thickness
- Offset
(The Plot Styles, Up/Down/Solid Colors, and Opacities of all 4 MA's
are customizable under the Style tab of the indicator settings)
There are no maximum value limitations for Length, Line Thickness, and Offset.
Of note, the "Length Multiplier" multiplies the "Length" value by a chosen integer.
This can be used to incrementally scan a wide spectrum of lengths very quickly.
Or it can be used to maintain ratios while increasing the MA display lengths...
just multiply all lengths by the same number.
It can also be used to easily create a moving average ribbon
by using multiple Moving Average Systems all at once.
Or, it can be another method to set up higher-timeframe MA's on a lower-timeframe chart...
for example, if both the chart and indicator are on the 1Hour timeframe,
you can multiply all of your set lengths by 24
to see the 1Day MA's of those same lengths on the 1Hour chart.
Next, lets look at the second section of the Inputs tab of the indicator settings,
where we edit the "Source Plot" and "MA/Source Fills".
We can turn ON/OFF the "Source Plot" -
which plots a line of the "Source" that you have selected -
and edit the parameters :
Checking the "Source Plot" box turns the "Source Plot" ON/OFF.
You can turn Up/Down Color Change ON/OFF,
and adjust Line Thickness and Offset.
(The Plot Style, Up/Down/Solid Colors, and all Opacities of the Source Plot
are customizable under the Style tab of the indicator settings.)
Next is where you can turn ON/OFF and edit each "MA/Source Fill".
Checking the "MA#1/Source Fill" box turns on the fill between MA#1 and the source.
You can choose the color and opacity for the above-color and the below-color.
Need to switch the display of the two colors?... turn on "Color Swap" to easily do just that.
The remaining 3 MA/Source Fills work in the same exact way...
turning on a fill between the associated MA#, and the source.
In total, there are 4 MA/Source Fills... 1 for each MA.
Note that neither the Source Plot, nor any of the MA's, need to be turned on
in order to use the MA/Source Fills.
Finally, lets look at the third section of the Inputs tab of the indicator settings.
This is where we can edit the 3 "MA/MA Fills".
An MA/MA Fill allows you to select any 2 of the 4 MA's that you have set,
and fill the space between them with color :
Checking the MA/MA Fill box turns ON/OFF the associated MA/MA Fill.
Below each ON/OFF switch are 2 boxes where you can select the 2 MA's that you want to fill between.
Select the 2 MA's that you want to use according to their MA#'s.
Next, you have the Above/Below Color/Opacity for the associated MA/MA Fill,
and lastly, the Color Swap option.
The numerical order of the MA#'s that you select here is of no concern,
because each MA/MA Fill has that "Color Swap" option...
and, as before, this swaps the display of the above-color and the below-color.
Note that the MA's do not need to be turned on
in order to use the MA/MA Fills.
--------------------------------------------
Additional Notes :
All colors and opacities of this indicator can be customized.
All fills can have above/below colors, and all plots can have up/down colors.
All fills and plots can be one static color, too.
All plots can be 1 of 10 plot styles:
Line, Line with Breaks, Step Line, Step Line with Diamonds, Histogram,
Cross, Area, Area with Breaks, Columns, or Circles.
All plots use the same single "Source", which is selectable.
And don't forget... you can try applying this indicator to other indicators!
--------------------------------------------
Now, let's take a look at some examples of the Durbtrade Moving Averages System in action!
All 4 MA's plots on, MA Type is SMA, color-changing on, lengths 50, 100, 150, and 200 :
Add the Source Plot, and all 4 MA/Source Fills :
Add the 3 MA/MA fills :
Turn off candles visibility, and turn off MA color-change :
Turn off the MA plots :
Turn off the Source Plot :
...
Here are some other images using the Multi Moving Average Tool :
Here it is on the 1Second :
Here it is on the 3Day :
Here is your 1Day SMA DeathCross :
Use 3 Moving Average Systems at once to build your own EMA Ribbon :
Compare 4 different MA types, all with the same length :
--------------------------------------------
Script Stats :
Pinescript Version : 5
Code Length : 149 Lines
Total Plots : 16
- Visible Plots : 5 (4 MA Plots, 1 Source Plot)
- Invisible Plots : 11 (4 MA Plots, 1 Source Plot, 6 MA/MA Fill Plots)
Total Fills : 7 (4 MA/Source Fills, 3 MA/MA Fills)
Total Colors/Opacities : 29
Total Unique Variables : 92
- Input Variables : 69
- Unique Output Variables : 23
--------------------------------------------
Final Thoughts :
I'm excited to share the Durbtrade Moving Averages System!
I think that this indicator has a wide range of MA-related applications,
an easy-to-use interface with maximum customization, and unique fill features...
all in one indicator.
I feel that it is a quick and useful tool
whether you are just plotting a few moving averages...
or you are creating intense kaleidoscopic tidal waves of colored data!
Either way, I think it is pretty awesome,
and so, I wanted to share it with you...
I hope that you enjoy it and find it useful!
- Please feel free to comment your thoughts, critiques, or suggestions. They are all very helpful!
- Also, please feel free to comment any positive feedback, or awesome screencaps/ideas of the indicator in action!
- Check out my other Pinescript indicators if you like this one... they work well together.
- I hope that you find this script useful.
- Enjoy!
--------------------------------------------
// Durbtrade
MTF Custom Moving AveragesThis user-friendly indicator allows up to 8 moving averages ( EMA or SMA ) from any timeframe, on any time frame. There are plenty of other MTF MA indicators, each with their own pros and cons. I wanted to make one without the cons:
- Independently set each MA to Exponential or Simple
- No preset lengths
- No preset timeframes
- Optional labels to help keep track of the period/length/type of each plot
- Clean, intuitive input layout
- More than enough MAs available to use one indicator for several use cases... just check/uncheck the ones that are relevant to each chart
Watch for death crosses on the 4hr while monitoring the "Bull Market Support band" (Weekly 21 EMA and 20 SMA ) and checking the Monthly 10 EMA for major support or resistance. Toggle between half of the available MAs for long term BTC trends and use the others for your alts. Use this one indicator to support multiple strategies.
Please leave a comment if you find it useful or have suggestions!
Inspired by the first MTF indicator I found: Weekly Moving Average by TommyTompsen.
Gap Absorption StrategyLike the nature, markets don't like the void, and this is something we can take advantage of by trading gaps on some markets.
This technique is well known, so I wanted to write a tiny script based on this strategy to get a bit more comfortable with it.
IMPORTANT: Default parameters wont give you good trades on every markets, you need to modify these parameters to see which proportions correspond to the stock you're trading.
This script triggers signals on predefined variation of a stock price after a gap, and allows its user to configure TP and SL prices corresponding to a specific percentage of this gap movement.
Note: We can observe that opening gaps are often the most interesting.
Options
Trigger: the price variation you want to trigger on (in % of the price)
Stop Loss : in % of the gap
Take profit : in % of the gap
A small table is displayed in the top right corner of the chart to give you TP/SL/Signal prices for each opportunity
SL (red line) and TP (green line) are also displayed on the chart when a signal is triggered
Information concerning the current opportunity is given at the bottom of the chart
Note: This script is based on the Gap-Size-Indicator that I published a few weeks ago.
FILL - SimpleFill might flip you a lot of signals close on transitions involving high volatility having wide price swings within settings sensitive intervals. In other words, the script redraws like crazy, so alerts set to 'once per bar' are reset on redraw to view the bar as just having started again.
So, if you do webhook with this, you might find it the easier way to deal with the behaviour; using a personal alert-handling API and programmatic access to an Exchange trading account, filtering and checking that alerts are treated on volatility, volume and velocity, missing ingredients in this particular implementation.
The script is about 20 lines long with declarations and horizontal line decorations included in that number.
Alerts may not work as expected.
Enjoy.
REDWOOD King Bishop MA'sREDWOOD King Bishop MA's
This indicator is based around moving averages to show short term and long term trends and possible trend reversals.
There are a lot of factors in this indicator so I will explain how best to take trades depending on your trading strategy.
Default MA settings are set and are one of the 2 recommended settings (other recommended settings are in the inputs for this indicator)
These show short term swings and changes, while coloring the fill with the short and long term trends.
Default labels show the Buy and Sell labels, along with the Strong Buy and Strong Sell labels. Buy labels should be taken as a tell that we could be reversing the trend, these labels will also allow you to get into trades earlier before a major trend change.
For the most part I recommend trading on the Strong Buy and Sell labels, these are telling you the strong trend changes that are taking affect, giving the "last call" for good entry or sell signals.
There is a long MA (Black) plot that is used as a support and resistance and when it is in the middle of the fill, this is telling you we are in the midst of the bull or bear run the indicator is showing. Times it is above or below the fast or slow MAs is taken as risky entries. you should only trade on these if other indicators are showing a reversal or entry themselves along with this indicator.
I recommend using this indicator with the RSI or MacD, specifically the REDWOOD MTF MacD or REDWOOD Stochastic RSI.
All MA fills are colored to show what is happening in the short term and also the long overall trend. A color change of the fast ma's while the overall trend is stable, lets you know of potential dips or exit positions.
There are lots of settings that you can utilize with this indicator and they are as follows..
You can customize all MA lengths
There are Scalp labels you can toggle on to show good scalp entries on both long and short sides. These are risky and only to be taken as potential exits or entries
You can toggle all labels, buy/sell, StrongBuy/StrongSell, Bullish, Bearish, Pivots, and Scalp
Pivot labels with this indicator are very risky, but can give you the best entries on a reversing market. These work best with a confirming indicator working along with these labels.
Bullish and Bearish labels show when the overall trend has crossed the support or resistance, these are good trades to take if you are swing trading or want to see or be alerted of a change of overall trend.
By default, which you can turn off, Bars are colored with the trend of the market, blocking out candles that could be opposite of the trend, reassuring a position.
---------------------
Swing Trading : Buy on Strong Buy signals and Sell on Strong Sell signals
Alternate Strategy : Buy on Bullish signals and Sell on Bearish signals
MacD or RSI or Stoch RSI confirming the trend change on these will give you the best entries and exits possible.
Scalp Trading : Buy and Sell on Scalp signals after turning them on.
Alternate Strategy : Buy when the 2 Fast Ma's cross changing the color on the fill lime, and Sell when the Fast Ma's cross and change the fill color red.
Alternate Strategy : Buy on Scalp on Buy or Sell Scalp signals and sell when Fast Ma's cross and change opposite your position, bullish or bearish.
Again, a confirming indicator will help with entries and exits.
Day Trading : Buy on Buy labels and Sell on Sell Labels
Again, a confirming indicator will help with entries and exits.
----------------------
All settings, colors, and plots can be customized, and all are labeled to make it easy for you.
Alerts for each label or trend change has been incorporated, so you never miss a trade opportunity!
This can be a very useful indicator, and I'm sure some may find settings that work even better
than the default or recommended settings.
This indicator works on all markets, forex, cryptocurrency, and stocks.
For access to this and all indicators available, please DM me here or See profile.
We are here to help each other succeed! The more one succeeds the more we all succeed! We are all in this
together and every person deserves to be financially independent and confident when taking trades
and investing.
Fill Strength Gradient [BigBitsIO]This script plots two moving averages but is mostly designed to highlight a fill strength gradient. The fill strength gradient shows a more opaque fill based on the current percentage difference of the current difference to the maximum difference in two MAs in a trend.
Citation: PinceCoders - Slight modification on color functions
GapGap
I've seen many trade decisions based on the CME Bitcoin Futures gap, so this indicator will let you know if that strategy is good or not, so use it as another confirmation 👍🏻.
- Shows when a gap is created, when it is filled and if not filled if a new gap is created.
- You can also use another security as a reference.
- Multi Timeframe , by default it will search the daily gaps.
Triple Moving Average HeatmapHi everyone
I didn't publish on Friday because I was working on an Expert Advisor in MT4. The day I don't publish, some scripts spamming guys published many (not useful) scripts the same to kick me out of the TOP #1 ranking.
So what I'm going to do about it? crying or sharing more quality scripts than before? :)
I guess you know the answer :) I'm gonna share a few quality scripts that I have in my library. I noticed that you guys tend to like more the scripts useful for your trading actually making you money rather than a copy-paste (of another copy-paste)
Alright, enough for the trolling now let's introduce the Three MA heatmap which is an upgrade of that script : MA-heatmap-Double-cross-edition/
The challenge was to keep the heatmap not rolling and to make it match with the MA cross. I did it using this
```
since_ma_buy = barssince(macrossover)
since_ma_sell = barssince(macrossunder)
heatmap_color() =>
since_ma_buy < since_ma_sell ? color.new(color.green, 20) : since_ma_buy > since_ma_sell ? color.new(color.red, 20) : na
```
This is a technique that I found after drinking three glasses of red wine (#french) to keep the heatmap stable and not rolling.
To get what I'm saying I invite you to replace the piece of code above by what everyone would normally do
```
heatmap_color() =>
macrossunder() ? color.new(color.green, 20) : macrossover() ? color.new(color.red, 20) : na
```
Ah and I'm not done sharing for the day, a few scripts are coming also after that one and tonight !!!!! I want to live in a world where you guys can enjoy quality scripts (mostly) :)
PS
____________________________________________________________
Feel free to hit the thumbs up as it shows me that I'm not doing this for nothing and will motivate to deliver more quality content in the future.
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
MA heatmap (Double cross edition)Hello my friends
Sorry yesterday I couldn't post an indicator because I was travelling. So here's the today indicator inspired from that one Moving-Average-Heatmap-Visualization/
This will gives an interesting representation of a Double Moving Average cross
That's all for me
Let's resume the free indicators publishing next Monday with the MA heatmap (Triple cross edition) and then the 4 cross ... until the 100 cross edition .... "wait are you joking sir ?"... Totally YES :)
But the Triple cross edition will be released as it's interesting from a Pine script perspective
Enjoy your weekend and stay safe
Dave
EMA ZoneIndicator to fill the ZONE between two EMAs (9 and 21 is the default)
RULES of completion:
CLOSE above "EMAs" and "EMA SLOW", and "EMA FAST" > "EMA SLOW" = green fill
CLOSE below "EMAs" and "EMA SLOW" ,and "EMA FAST" < "EMA SLOW" = red fill
CLOSE between EMAs = white fill
Moving Average Shaded Fill Area Crossover EMA Color - EditableMoving Average Shaded Fill Area Crossover EMA Color with option to change EMA value