Hi everyone
What does the exclamation mean when used in the following way
CondC = BarsSince(!RSI()>70) >4;
What the AFL help files says that != means 'not equal too' does that mean the RSI is not greater than 70?
cheers
Hi everyone
What does the exclamation mean when used in the following way
CondC = BarsSince(!RSI()>70) >4;
What the AFL help files says that != means 'not equal too' does that mean the RSI is not greater than 70?
cheers
!
(exclamation sign) is equal to NOT
and is logical Not operator.
CondC = BarsSince(! (RSI()>70)) >4;
Or
CondC = BarsSince(NOT (RSI()>70)) >4;
Or
CondC = BarsSince(RSI()<=70) >4;
@Tomasz, I see that this "C" way to write the logical NOT is not cited in this document: AFL Reference Manual (same for &&
and ||
)
I know that the explicit NOT
, AND
and OR
are the recommended operators to use. Still, adding a short note about the alternatives will be a useful addition to the documentation.
This can avoid confusion for people unfamiliar with those "C" language operators, which, although rare, are sometimes used in formulas or code examples.
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.