PureBytes Links
Trading Reference Links
|
to start with compare the basic statement construction with those in
the help files
for( Value3 = 0.2; Value3 > 0.002; Length = Length - 2 )
This should have the same variable in each part
you cannot mix Value3 and length, so which one should it be?
Then insode the loop the variables need to be identified against the
basic for variable
Perhaps you should explain what exactly you are trying to achieve with
the code so we can help with creating it
On 7/4/05, pakaypakay <pakaypakay@xxxxxxxxx> wrote:
> Does anyone know how to work around this problem? Since the loop
> statement does not allow array type variables (Value3), this code
> will not work.
>
>
> Price = ( H + L ) /2;
> Smooth = (Price + 2 * Ref( Price, -1 ) + 2 * Ref( Price, -2 ) + Ref(
> Price, -3 ) )/6;
>
>
> Length = 39;
>
> for( Value3 = 0.2; Value3 > 0.002; Length = Length - 2 )
> {
> alpha = 2 / ( Length + 1 );
>
> Value1 = Median( Smooth, Length );
> Value2 = AMA( Smooth, alpha );
>
> Value3 = Nz( abs( Value1 - Value2 )/Value1 );
>
> }
>
> AvgLength = IIf( Length < 3, 3, Length );
> AvgAlpha = 2 / (AvgLength + 1);
>
> Filt = AMA( Smooth, AvgAlpha);
>
> Plot( C, "Price", colorBlack, styleBar );
> Plot( Filt, "Filt", colorRed, styleThick );[/code]
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
--
Cheers
Graham
http://e-wire.net.au/~eb_kavan/
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|