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

RE: [amibroker] Re: Help with code!



PureBytes Links

Trading Reference Links

Cliff,

Worked like a charm! Thanks a bunch! I knew it had to be somthing simple!

Thanks and have a great day!

Jeff G.


-----Original Message-----
From: cliffelion@xxxx [mailto:cliffelion@x...]
Sent: Monday, July 16, 2001 9:57 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Help with code!


Hi Jeff,

Please try

e3=IIF(b1==1 and d3==1,10,-10);

instead of:

> e3=IIF(b1=d3=1,10,-10);

the '==' checks equivalence, while the '=' is for assignment. ie in 
your equation you are assigning to b1 and d3 the value of 1.

I'm not sure if you need the 'and' I havent tested it, but I would 
use it just to be sure.

Cliff Elion

--- In amibroker@xxxx, "Jeff Gholson" <jgholson@xxxx> wrote:
> Ok...I've looked at this thing until I'm cross-eyed. It seems like 
it
> should function properly but it doesn't for me...sometimes it helps 
to have
> others to look at it so here it goes...
> 
> b1=IIF(close>ref(close, -1),1,-1);
> f1=IIF(close>ma(close,10),2,-2);
> d2=IIF(close>ma(close,20),3,-3);
> e2=IIF(ma(close,10)>ma(close,20),1,-1);
> d3=IIF(volume>ma(volume,20),1,-1);
> 
> e3=IIF(b1=d3=1,10,-10);
> 
> graph0=e3;
> 
> 
> The problem is the e3! It will not change! It remains at +10. I 
have
> manually ran this against price data that should turn it to -10,but 
it won't
> change in the program. When the e3 IIF statement is introduced b1 
and d3
> "magically" always read the same. However, when the e3 IIF is 
removed, b1
> and d3,read the way they are supposed too. Sometimes they are equal
> sometimes not, which is supposed to change the e3 IIF when in the 
AFL...
> 
> So I leave this problem to the AFL Gods...and may the FORCE BE WITH 
YOU!
> 
> 
> 
> Thanks




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/