Edit: Also referring to post # 3 and 6
Hi!
I am wondering if someone have the Composite Index indicator by Constance Brown for NT (Described in her chapter in "Breakthroughs in Technical Analysis")?
If not, could someone please give it a try?
Thanks.
Laurus12
---------------------------
The formula for TradeStation with some guides is:
-Create two functions in EasyLanguage first. The first is a 9-period momentum study of RSI. This can be written as:
RSIDelta = MOMENTUM(RSI(CLOSE,14),9)
-Then a smoothed short period RSI is created,
RSIsma = AVERAGE(RSI(CLOSE,3)3)
-The indicator can then be created:
INDICATOR: COMPOSITE INDEX
Plot1(RSIdelta+RSIsma,"Plot1");
Plot2(average((plot1),13),"Plot2");
Plot3(average((plot1),33),"Plot3");
---------------------------
The MetaStock Format is:
A = RSI(14)-Ref(RSI(14),-9)+Mov(RSI(3),3,S);
Plot1 = Mov(A,13,S);
Plot2 = Mov(A,33,S);
A;Plot1;Plot2;
---------------------------
For MetaTrader 4 is:
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Black
#property indicator_color2 SeaGreen
#property indicator_color3 Teal
#property indicator_level1 0
#property indicator_levelcolor Silver
#property indicator_levelstyle 2
#property indicator_level2 50
#property indicator_levelcolor Silver
#property indicator_levelstyle 2
#property indicator_level3 100
#property indicator_levelcolor Silver
#property indicator_levelstyle 2
//
//
//
//
//
extern int RSI.Price = PRICE_CLOSE;
extern int RSI.SlowLength = 14;
extern int RSI.FastLength = 3;
extern int Momentum.Length = 9;
extern int SMA.Length1 = 3;
extern int SMA.Length2 = 13;
extern int SMA.Length3 = 33;
//
//
//
//
//
double buffer1[];
double buffer2[];
double buffer3[];
double working[][3];
//+----------------------------------------------------------------------------------+
//| |
//+----------------------------------------------------------------------------------+
//
//
//
//
//
int init()
{
SetIndexBuffer(0,buffer1);
SetIndexBuffer(1,buffer2);
SetIndexBuffer(2,buffer3);
return(0);
}
int deinit()
{
return(0);
}
//+----------------------------------------------------------------------------------+
//| |
//+----------------------------------------------------------------------------------+
//
//
//
//
//
#define __slowRSI 0
#define __fastRSI 1
#define __composite 2
//
//
//
//
//
int start()
{
int counted_bars=IndicatorCounted();
int i,r,limit;
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit = Bars-counted_bars;
if (ArrayRange(working,0) != Bars) ArrayResize(working,Bars);
//
//
//
//
//
for(i=limit, r=Bars-i-1; i >= 0; i--,r++)
{
working[r][__slowRSI] = iRSI(NULL,0,RSI.SlowLength,RSI.Price,i);
working[r][__fastRSI] = iRSI(NULL,0,RSI.FastLength,RSI.Price,i);
double RSIDelta = working[r][__slowRSI]-working[r-Momentum.Length][__slowRSI];
double RSIsma = iSma(__fastRSI,SMA.Length1,r);
working[r][__composite] = RSIDelta+RSIsma;
//
//
//
//
//
buffer1[i] = working[r][__composite];
buffer2[i] = iSma(__composite,SMA.Length2,r);
buffer3[i] = iSma(__composite,SMA.Length3,r);
}
return(0);
}
//+----------------------------------------------------------------------------------+
//| |
//+----------------------------------------------------------------------------------+
//
//
//
//
//
double iSma(int forBuffer,int period, int shift)
{
double sum =0;
if (shift>=period)
{
for (int i=0; i<period; i++) sum += working[shift-i][forBuffer];
return(sum/period);
}
else return(working[shift][forBuffer]);
}
Comment