I really like Renko Charts to filter out a lot of the noise out of the price action but I would like to see the price action on the same window and plot the a red and green bars on the bottom of the chart as a type of oscillator indicator like Renko Binary Wave System or better as a line on top of the price action.
I think this is the code:
Inputs: K(1),
Smooth(10);
vars:Brick(0) ,DN(0), UP(0), BricksUp(0), BricksDn(0);
Value1 = AvgTrueRange(Smooth);
If BarNumber = 1 Then Begin
Up = H;
Dn = L;
Brick = K*(H - L);
End;
If BarNumber > 1 then begin
If C > UP + Brick Then begin
BricksUp = IFF(Brick = 0, 0, Floor((C - Up)/Brick)*Brick);
UP = Up + BricksUp;
Brick = K*Value1;
DN = Up - Brick;
BricksDn = 0;
End;
If C < Dn - Brick Then begin
BricksDn = IFF(Brick = 0, 0, Floor((Dn - C)/Brick)*Brick);
Dn = Dn - BricksDn;
Brick = K*Value1;
Up = Dn + Brick;
BricksUp = 0;
End;
End;
Plot1(UP, "Up");
Plot2(DN, "Dn");
{***************end of code****************}
thanks.
this is a link to a chart with it.
Thanks, for your help.
ChonWayne
Comment