[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cannot implicitly convert Numerical to TrueFalse ?



PureBytes Links

Trading Reference Links

O-list:

I'm working with a "contrary" index and I need to use the following strategy --- any help getting this error message to stop coming up and this code to verify is appreciated.

{Error on condition3: cannot implicitly convert Numerical to TrueFalse.}


if time>1300 and time <=1500 then begin

Inputs: RL(7), BZ(5), SZ(2);

condition1=RateOfChange(Close Data2, RL) 1 bar ago <15; 
condition2=RateOfChange(Close Data2, RL) 1 bar ago >5;
condition3=RateOfChange(Close Data2, RL) current bar <BZ;

condition4=RateOfChange(Close Data2, RL) 1 bar ago >-12;
condition5=RateOfChange(Close Data2, RL) 1 bar ago <2; 
condition6=RateOfChange(Close Data2, RL) current bar >SZ; 


If condition1 and condition2 and condition3 then BUY; 
If condition4 and condition5 and condition6 then SELL;

end;

{end of code}