HPotter

CMOabsav

Hi
Let me introduce my CMOabsav Oscillator script.
This indicator plots the absolute value of CMO averaged over three
different lengths. This indicator plots a classical-looking oscillator,
which is really an averaged value based on three different periods.

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

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

כתב ויתור

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

רוצה להשתמש בסקריפ זה בגרף?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 18/04/2014
//    This indicator plots the absolute value of CMO averaged over three 
//    different lengths. This indicator plots a classical-looking oscillator, 
//    which is really an averaged value based on three different periods.
////////////////////////////////////////////////////////////
study(title="CMOabsav", shorttitle="CMOabsav")
Length1 = input(5, minval=1)
Length2 = input(10, minval=1)
Length3 = input(20, minval=1)
TopBand = input(70, minval=1)
LowBand = input(20, minval=0)
hline(0, color=green, linestyle=dashed)
hline(TopBand, color=purple, linestyle=line)
hline(LowBand, color=red, linestyle=line)
xMom = close - close[1]
xMomabs = abs(close - close[1])
nSum1 = sum(xMom, Length1)
nSumAbs1 = sum(xMomabs, Length1)
nSum2 = sum(xMom, Length2)
nSumAbs2 = sum(xMomabs, Length2)
nSum3 = sum(xMom, Length3)
nSumAbs3 = sum(xMomabs, Length3)
nRes = abs(100 * (nSum1 / nSumAbs1 + nSum2 / nSumAbs2 + nSum3 / nSumAbs3 ) / 3)
plot(nRes, color=blue, title="CMOabsav")