[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Bugged out (1)



PureBytes Links

Trading Reference Links

Or perhaps better yet?

daten = datenum();

for( i = 1; i < BarCount; i++ )
{
	if (daten[i] ==Status("rangefromdate") AND daten[i]==Status
("rangetodate"))
	{
       AddToComposite(V,"~TICKER1","V",16);
		AddToComposite(IIf(C>Ref(C,-1),1,IIf(C<Ref(C,-1),-
1,0)),"~TICKER1","C",16);
	}
}


--- In amibroker@xxxxxxxxxxxxxxx, "jehmac" <jehmac@xxxx> wrote:
> Not sure what your code is trying to do, but DateNum() returns 
array,
> and as the error says, you cannot compare arrays inside IF 
statement.
> 
> You can try using now(3) function, which returns a number.
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "rlb21079" <rlb21079@xxxx> wrote:
> > Code:
> > -----
> > if (DateNum()==Status("rangefromdate") AND DateNum()==Status
> > ("rangetodate"))
> > {
> > AddToComposite(V,"~TICKER1","V",16);
> > 
> > AddToComposite(IIf(C>Ref(C,-1),1,IIf(C<Ref(C,-1),-
> > 1,0)),"~TICKER1","C",16);
> > }
> > 
> > NumHighest=15;
> > while (NumHighest>0)
> > {
> > NumHighest=NumHighest-1;
> > HoldValue=ValueWhen(Highest(Foreign("~TICKER1","V")),Foreign
> > ("~TICKER1","C"),1);
> > AddToComposite(HoldValue,"~TICKER1","H",16);
> > }
> > 
> > AddColumn(V,"Volume",1.0);
> > AddColumn(C-Ref(C,-1),"Change");
> > AddColumn(IIf(C>Ref(C,-1),1,IIf(C<Ref(C,-1),-1,0)),"ChCount",1.0);
> > Filter=V>3000000;
> > 
> > Error:
> > -----
> > Line 10, Column 10:
> > AddToComposite(IIf(C>Ref(C,-1),1,IIf(C<Ref(C,-1),-
> > 1,0)),"~TICKER1","C",16);
> > 
> > }
> > 
> > NumHighest
> > ---------^
> > 
> > Error 3.
> > Condition in IF, WHILE, FOR statements
> > has to be Numeric or Boolean type.
> > You can not use array here,
> > please use [] (array subscript operator)
> > to access array elements
> > -----
> > 
> > Nothing Happens With This WHen I Run Explore, except the error 
code.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/CNxFAA/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/