HPotter

Commodity Selection Index

The Commodity Selection Index ("CSI") is a momentum indicator. It was
developed by Welles Wilder and is presented in his book New Concepts in
Technical Trading Systems. The name of the index reflects its primary purpose.
That is, to help select commodities suitable for short-term trading.
A high CSI rating indicates that the commodity has strong trending and volatility
characteristics. The trending characteristics are brought out by the Directional
Movement factor in the calculation--the volatility characteristic by the Average
True Range factor.
Wilder's approach is to trade commodities with high CSI values (relative to other
commodities). Because these commodities are highly volatile, they have the potential
to make the "most money in the shortest period of time." High CSI values imply
trending characteristics which make it easier to trade the security.
The Commodity Selection Index is designed for short-term traders who can handle
the risks associated with highly volatile markets.

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 18/04/2014
// The Commodity Selection Index ("CSI") is a momentum indicator. It was 
// developed by Welles Wilder and is presented in his book New Concepts in 
// Technical Trading Systems. The name of the index reflects its primary purpose. 
// That is, to help select commodities suitable for short-term trading.
// A high CSI rating indicates that the commodity has strong trending and volatility 
// characteristics. The trending characteristics are brought out by the Directional 
// Movement factor in the calculation--the volatility characteristic by the Average 
// True Range factor.
// Wilder's approach is to trade commodities with high CSI values (relative to other 
// commodities). Because these commodities are highly volatile, they have the potential 
// to make the "most money in the shortest period of time." High CSI values imply 
// trending characteristics which make it easier to trade the security.
// The Commodity Selection Index is designed for short-term traders who can handle 
// the risks associated with highly volatile markets.
////////////////////////////////////////////////////////////
fADX(Len) =>
    up = change(high)
    down = -change(low)
    trur = rma(tr, Len)
    plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, Len) / trur)
    minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, Len) / trur)
    sum = plus + minus 
    100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), Len)

study(title="Commodity Selection Index", shorttitle="CSI")
PointValue = input(50)
Margin = input(3000)
Commission = input(10)
Length = input(14)
K = 100 * ((PointValue / sqrt(Margin) / (150 + Commission)))
xATR = atr(Length)
xADX = fADX(Length)
nADXR = (xADX + xADX[Length]) * 0.5
xCSI = K * xATR * nADXR
plot(xCSI, color=green, title="Commodity Selection Index")