PINE LIBRARY
已更新 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.
發行說明
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.
發行說明
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.
------------------------------------------------------------------
發行說明
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.
發行說明
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).
Pine腳本庫
秉持TradingView一貫精神,作者已將此Pine代碼以開源函式庫形式發佈,方便我們社群中的其他Pine程式設計師重複使用。向作者致敬!您可以在私人專案或其他開源發表中使用此函式庫,但在公開發表中重用此代碼須遵守社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
Pine腳本庫
秉持TradingView一貫精神,作者已將此Pine代碼以開源函式庫形式發佈,方便我們社群中的其他Pine程式設計師重複使用。向作者致敬!您可以在私人專案或其他開源發表中使用此函式庫,但在公開發表中重用此代碼須遵守社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。