I had this on my chart before the upgrade and after I went to 5.0, it doesn't recognize the 'IFF' in the code. Anyone have any idea why this would change and what I can do to fix it?
thx
S
{Renko-Adaptive signal (based on ATR) Written by konkop 07.03.2002.
edited by sevensa
*********************
Attention: set MaxBarsBack (f.e. =30) in this study according with
MaxBarsBack value in the Renko_Adaptive indicator for correct
step-by-step calculations of the buy/sell levels
*********************}
Inputs: K(1), Smooth(10), ShortTrades(false);
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;
{Trade Rules with or without short trades}
If ShortTrades = false then
begin
If Up > Up[1] then buy this bar at C;
If Dn < Dn[1] then sell this bar at C;
End;
If ShortTrades = true then
begin
If Up > Up[1] then buy this bar at C;
If Dn < Dn[1] then sell this bar at C;
End;
End;