everget / tradingview-pinescript-indicators Goto Github PK
View Code? Open in Web Editor NEWA collection of the various technical indicators implemented in Pine Script Language
A collection of the various technical indicators implemented in Pine Script Language
For the last few days, I've been trying to plot specific information on the chart but it did not go through well.. I would be grateful if anyone could help me with that...
I am trying to spot the highest bar within the completed MACD histogram(above 0), and the lowest bar within the completed MACD histogram(below 0). I have attached a screenshot for reference. After spotting the last 2 highest(or lowest), I would draw a trend line of them..
/////The code is here. I have separated the +,- histogram, and put dots above and below of +,- histogram
//@Version=4
study(title="My MACD", shorttitle="My MACD", overlay=true)
// Getting inputs
fast_length = input(title="Fast Length",
type=input.integer, defval=12)
slow_length = input(title="Slow Length",
type=input.integer, defval=26)
src = input(title="Source", type=input.source,
defval=close)
signal_length = input(title="Signal Smoothing",
type=input.integer, defval = 9)
// Calculating
fast_ma = ema(src, fast_length)
slow_ma = ema(src, slow_length)
macd = fast_ma - slow_ma
signal = ema(macd, signal_length)
hist = macd - signal
// Plot colors
col_grow_above = #26A69A
col_grow_below = #FFCDD2
col_fall_above = #B2DFDB
col_fall_below = #EF5350
col_macd = #0094ff
col_signal = #ff6a00
//////////////////////////////////////// Plot ////////////////////////////////////////////////////
// Dots(+histogram and -histogram)
plotshape(hist>=0, "Dots histogram +", color=color.green, style=shape.cross, location=location.top)
plotshape(hist<=0, "Dots histogram -", color=color.red, style=shape.cross, location=location.bottom)
// +Histogram and -histogram
plot(hist, title="Histogram +", style=plot.style_columns, color=(hist>=0 ? (hist[1] < hist ? col_grow_above : col_fall_above) : na), transp=0 )
plot(hist, title="Histogram -", style=plot.style_columns, color=(hist<=0 ? (hist[1] < hist ? col_grow_below : col_fall_below) : na), transp=0 )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.