Put call ratio indicator

#1
// Fast and Slow PCRI
PCRatio = Foreign("$PC-ST", "C" );
PCRatio = Min( 0.9, Max( 0.45, PCRatio ) );
temav = Param("TEMA avg PCRatio", 5, 1, 100 );
PCTema = TEMA( PCRatio, temav );
tma = PCTema;
rnbw = 0;

for( i = 0; i < 10; i++ )
{
tma = WMA( tma, 2 );
rnbw += tma;
}
rainb = rnbw / 10;
RSIper = Param("PC ratio RSI period", 5, 2, 100 );
RSIav = Param("PCRI Indicator avg", 5, 1, 100 );
pcri = WMA( RSIa( rainb, RSIper ), RSIav );
pcriup = MA( pcri, 200 ) + 1.3 * StDev( pcri, 200 );
pcridn = MA( pcri, 200 ) - 1.3 * StDev( pcri, 200 );

Plot( pcri, "PCRI Fast", colorBlue, styleThick );
Plot( pcriup, "", colorLightBlue, styleDashed );
Plot( pcridn, "", colorLightBlue, styleDashed );
Plot( 50, "", colorLightBlue, styleDashed );
mova = Param("PCRI smoothing", 30, 1, 100 );
Plot( WMA( rainb, mova ), "PCRI Slow", colorRed, styleThick | styleOwnScale );


it is not working even i changed foriegn to nifty
 

Similar threads