PureBytes Links
Trading Reference Links
|
Hello,
Advice: never use == operator with fractional numbers.
Your formula should be rewritten to avoid fractionals and corresponding
problems this way:
Buy = ( Year() % 10)==6 ;
% is MODULO operator (the reminder from division)
http://www.amibroker.com/guide/a_language.html
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Tomasz Janeczko" <amibroker@xxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, January 22, 2005 4:09 PM
Subject: Re: [amibroker] Strange AB formula
>
> Hello,
>
> Short story:
> 0.6 has infinite representation on any binary computer (using binary arithmetic),
> the same way as 1/3 has infinite representation in decimal system, while 0.5 has finite representation
> in binary arithmetic. That's why.
>
> Long story:
> Mailing list archive:
>
> http://groups.yahoo.com/group/amibroker/message/37782
>
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "dbirru" <dbjunk@xxxxxxxxxxxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Saturday, January 22, 2005 3:16 PM
> Subject: [amibroker] Strange AB formula
>
>
>>
>>
>> Can some one tell me why the following formula does not generate any
>> trade? It is supposed to generate a buy signal on all years that end
>> with the 6th. I have tried all other years. The only that works is
>> with 0.5.
>>
>> Buy = (frac(Year()/10)==0.6) ;
>>
>>
>>
>>
>>
>>
>>
>> Check AmiBroker web page at:
>> http://www.amibroker.com/
>>
>> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
|