40_Flax
November 8, 2021, 6:58pm
#1
Hello,
I am trying to put Keltner Channel (upper and lower band) around the OBV Indicator.
The idea is to use the OBV has the centerline. I am not sure if it is my formula or my ploting that is not correct. Any help would be greatly appreciated. Thanks
CenterLine = OBV();
KTop2 = CenterLine + 2*ATR(21);
KBot2 = CenterLine - 2*ATR(21);
Plot( KTop2, "KBTop2", colorRed, styleLine );
Plot( KBot2, "KBBot2", colorRed, StyleLine );
fxshrat
November 8, 2021, 9:08pm
#2
OBV uses Volume while ATR uses H, L and Close price arrays.
So it's apples vs. oranges.
If it makes you feel better:
CenterLine = OBV();
H = L = C = V;
KTop2 = CenterLine + 2*ATR(21);
KBot2 = CenterLine - 2*ATR(21);
RestorePriceArrays();
Plot( KTop2, "KBTop2", colorRed, styleLine );
Plot( KBot2, "KBBot2", colorRed, StyleLine );
2 Likes
40_Flax
November 10, 2021, 3:03pm
#3
Thank you but in your formula the OBV is always within the bands, i was trying to capture when the OBV moves outside the bands.
fxshrat
November 10, 2021, 3:40pm
#5
First of all again:
OBV uses Volume .
Result is single cummulated value at each bar.
There is not High/Low per bar.
See here .
ATR uses H,L,C prices .
Please read:
40_Flax:
CenterLine = OBV();
But also Keltner uses MA as center line:
array = OBV();
Periods = 20;
CenterLine = MA( array, Periods );
H = L = C = V;
KTop2 = CenterLine + 2*ATR(21);
KBot2 = CenterLine - 2*ATR(21);
RestorePriceArrays();
Plot( array, "OBV", colorDefault );
Plot( KTop2, "KBTop2", colorRed, styleLine );
Plot( KBot2, "KBBot2", colorRed, StyleLine );
Then you should get your overlaps.
system
Closed
February 18, 2022, 3:41pm
#6
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.