PureBytes Links
Trading Reference Links
|
The IIf statement you wrote will return an array of 0's or 1's. So sf
is really a boolean array and not a single 0 or 1.
The if statements are good for reacting to ParamToggle variable
assignments for example. They are also useful within looping
structures when dealing with the individual elements of an array.
Review the user manual again for examples of if vs. IIf and look at
tutorial, especially the section regarding How AFL Works.
JD
--- In amibroker@xxxxxxxxxxxxxxx, "Gerald Monks" <glmonks@xxx> wrote:
>
> sf = IIf(av > mv AND Close[BarCount - 1] >= pl AND Close[BarCount - 1]
> <= ph, 1, 0);
>
> if(sf)
> {
> statements...
> }
>
> I'm getting the dreaded Error 6. The if condition should not be
> receiving an array pointer, only the "0" or "1" numeric value. It's
> getting really tiresome dancing around the if statement in AFL to make
> things work. I'm finding the if statement pretty much useless.
>
> Any suggestions?
>
> Thanks
>
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.12/653 - Release Date: 1/26/2007 11:11 AM
|