PINE LIBRARY
Aggiornato cloudTheory

Library "cloudTheory"
// OBJECTTIVE: A Combination of EMA to Draw Cloud Pattern on Chart
//
// The "2-EMA Line System" is one of the most oldest and durable
// frameworks in technical analysis where we plot one "fast" (short)
// and one "slow" (long) exponential moving average line on the same
// chart and their relationships determine the state of the security.
drawCloud(fastLength, slowLength, src)
Parameters:
fastLength (simple int): - Fast EMA Length, the shorter length which
typically determines the current rhythm of the security.
slowLength (simple int): - Slow EMA Length, the longer length which
determines the underlying drift of the security.
src (float): - Which value of the candle should be used to calculate
the moving average; defaults to candle close value.
Returns: [emaFast, emaSlow, isBullish, isBearish, isNeutral] - EMA
Values and the flags to determine the current sentiment.
// OBJECTTIVE: A Combination of EMA to Draw Cloud Pattern on Chart
//
// The "2-EMA Line System" is one of the most oldest and durable
// frameworks in technical analysis where we plot one "fast" (short)
// and one "slow" (long) exponential moving average line on the same
// chart and their relationships determine the state of the security.
drawCloud(fastLength, slowLength, src)
Parameters:
fastLength (simple int): - Fast EMA Length, the shorter length which
typically determines the current rhythm of the security.
slowLength (simple int): - Slow EMA Length, the longer length which
determines the underlying drift of the security.
src (float): - Which value of the candle should be used to calculate
the moving average; defaults to candle close value.
Returns: [emaFast, emaSlow, isBullish, isBearish, isNeutral] - EMA
Values and the flags to determine the current sentiment.
Note di rilascio
Updated:drawCloud(fastLength, slowLength, src)
Parameters:
fastLength (simple int): - Fast EMA Length, the shorter length which
typically determines the current rhythm of the security.
slowLength (simple int): - Slow EMA Length, the longer length which
determines the underlying drift of the security.
src (float): - Which value of the candle should be used to calculate
the moving average; defaults to candle close value.
Returns: [emaFast, emaSlow, mktSentiment] - EMA Values and a flag
to determine the market sentiment. The sentiment flag can be read
as: (I) '1' the security is bullish, (II) '-1' the security is
bearish and (III) '0' denotes the security is neutral.
Note di rilascio
v3Added:
priceAction(fastLength, slowLength, src, atrLength)
Parameters:
fastLength (simple int)
slowLength (simple int)
src (float)
atrLength (simple int)
Updated:
drawCloud(fastLength, slowLength, src)
Parameters:
fastLength (simple int): - Fast EMA Length, the shorter length which
typically determines the current rhythm of the security.
slowLength (simple int): - Slow EMA Length, the longer length which
determines the underlying drift of the security.
src (float): - Which value of the candle should be used to calculate
the moving average; defaults to candle close value.
Returns: [emaFast, emaSlow, mktSentiment, *Cross] - EMA Values and
a flag to determine the market sentiment. The sentiment flag can be
read as: (I) '1' the security is bullish, (II) '-1' the security is
bearish and (III) '0' denotes the security is neutral. The last two
values returned are the "EMA Cross" points. These values can be
directly used to determine the trend and set and altert.
------------------------------------------------------------------
Note di rilascio
v4Updated calculation of Price Action Values (experimental), now in bounded range of [-1, 1] which denotes the bearish to bullish market sentiment for the clouds. Recommend values are [-1, -0.25) can be considered as bearish, (-0.25, 0.25) as neutral market action while (0.25, 1] can be considered as bullish price action.
Note di rilascio
cloudTheory is a visualization extension of "2-EMA Line System", which can be used to provide visual confirmation based on the price action of the underlying. In addition, the library provides methods for calculating momentum using (I) the traditional method, and (II) Baz et al. CTA method.✨ Getting Started
The public (open-source) library is available at TradingView, and a rich documentation and usage guide is available at blog website. Import the library as below:
Then you can directly create editable fields and value control fields to implement the logic. To design the color schemes, it is recommended to use a three-toned system, and cross-over markings can be implemented as follows:
🔮 Drawing EMA Cloud
Use the function drawCloud() that returns the value of slow and fast moving averages along with the market sentiment and up/down crossing points.
📊 Price Action Value
The movement indicator and a tentative indication of the movement and entry point can be calculated using priceAction() function (check the function documentation for details).
Libreria Pine
Nello spirito di TradingView, l'autore ha pubblicato questo codice Pine come libreria open source affinché altri programmatori della nostra community possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open source, ma il riutilizzo di questo codice nelle pubblicazioni è soggetto al Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Libreria Pine
Nello spirito di TradingView, l'autore ha pubblicato questo codice Pine come libreria open source affinché altri programmatori della nostra community possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open source, ma il riutilizzo di questo codice nelle pubblicazioni è soggetto al Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.