PureBytes Links
Trading Reference Links
|
Hi
This seems to work, I assume you only wanted this as a simple test
to figure out how to use if then else.
Aa=DayOfWeek();
for( i = 0; i < BarCount; i++ )
{
if ( Aa[ i ]==1)
bb[ i ] = 1000;
else
bb[ i ] = 0;
}
Buy=Filter=1;
AddColumn(Aa,"datenumber");
AddColumn(bb,"mydate");
The value of 1000 is just to make it more obvious, for testing when
running an exploration.
Peter.
--- In amibroker@xxxxxxxxxxxxxxx, "kk12338" <kk2628@xxxx> wrote:
> Hi,
>
> The following code still return 1 to tday irregardless DayofWeek
cud
> be 2 or 3 or 4 or 5, is my coding wrong ?
>
> if (dayofweek()==1)
> tday=1;
> else
> tday=0;
>
> Thanks
> KK
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/nCdp4D/OC5FAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|