I want to place RSI and OBV on "transparent" layers.

KelvinHand

Well-Known Member
#11
Hi Happy

Thanks for this code.

just see the below thing
it takes us to oscillator

it is not correct. some error may be there
the oscp(r1,r2) is not working here.
no idea why.

My idea is present rsi and obv as like price oscillator or like MACD
NOT OK YET
regards
ford
HTML:
SetChartOptions(0,0,chartGrid30|chartGrid70);
P	=	Param( "Periods",15, 1, 200, 1);
HiOBV 		=	HHV(OBV(),P*10);
LoOBV 		= 	LLV(OBV(),P*10);
StochOBV 	= 	((OBV() - LoOBV)/(HiOBV - LoOBV))*100;	
R			=	RSI(P);
//Plot(R,"RSI",colorBlue,styleThick);
//Plot(StochOBV ,"OBV",colorRed,styleThick);
_SECTION_END();
r1=StochOBV ;
r2 =RSI(P) ;
//r1=MA(StochOBV,10) ;
//r2 =MA(RSI(P),10) ;


RATIO = (r2-r1)/r2 ;
BARCOLOR =IIf(r1>r2,colorBrightGreen,colorRed);

Plot(RATIO,"RATIO",BARCOLOR,styleHistogram);
//Plot( OscP( r1,r2), _DEFAULT_NAME(), BARCOLOR, styleHistogram );//not ok
//Plot( abs(OscP( r1,r2)), _DEFAULT_NAME(), BARCOLOR, styleHistogram );//as per subroto
_SECTION_END();
OscP() take numeric input not array
 

mastermind007

Well-Known Member
#13
Hi Happy
Thanks for the code.
I feel this way-sorry cant put it exactly what it is.
but,we need to have this combination like an oscillator.
say keeping RSI steady,project OBV spikes more visibly.

may be keep RSI (OR Rsi =50 )as zero base and project obv spikes above and below it like.
ford
Code:
periods = Param( "Periods", 15, 1, 200, 1 );

cRSI = RSI(periods);
cOBV = ROC(OBV());

pOBV = ROC(cOBV + 50 - cRSI);
pRSI = 50;

Plot(pRSI, "RSI",ParamColor("RSI Color",colorCycle),styleThick);
Plot(pOBV,"OBV",ParamColor("OBV Color",colorCycle),styleThick);
 

mastermind007

Well-Known Member
#14
bharatk8

please check your email. The file you sent me is not complete ...
 

Similar threads