Bill, Thanks.
 
Close, but this is what was trying and got an error with this "test"
 

Test = WriteVal(IIf(StrFind(Name() == "JPY"), (TimeFrameExpand( Daily_50EMA,inDaily), 3.2 ), (TimeFrameExpand( Daily_50EMA,inDaily), 1.4 )));

 

So if the symbolname has jpy in it, then I want the Daily_50EMA value written in 3.2 format. If the symbol does not have JPY in it, then I want the Daily_50EMA to be written in 1.4 format.

USDJPY   Daily_50EMA=115.62

EUR A0-FX Daily_50EMA=1.2614

Appreciate if you can help.

 

Thanks.

 

Cheers,Padhu

----- Original Message -----
Sent: Sunday, September 17, 2006 12:49 AM
Subject: Re: [amibroker-afl] Writeval using conditions

Does this do what you want?
 
daily_50dayema = writeval(iif(name() ==  "JPY"), (.....), (...)));
 
Bill
----- Original Message -----
From: Padhu
Sent: Sunday, September 17, 2006 12:58 AM
Subject: [amibroker-afl] Writeval using conditions

Hello,
 

Daily_50Dayema=WriteVal(TimeFrameExpand( Daily_50EMA,inDaily), 1.4 );

buffer = IIf( StrFind(Name(), "JPY"), 0.3, 0.003);

In the above code, I would like to modify such that

Daily_50Dayema=WriteVal(TimeFrameExpand( Daily_50EMA,inDaily), 1.4 ); if symbolname string DOES NOT contain  "JPY"

When symbolname contains JPY then I would like Daily_50Dayema=WriteVal(TimeFrameExpand( Daily_50EMA,inDaily), 3.2 );

How can combine this into a single statement to compute Daily_50Dayema?. Thanks.

I am running AB 4.6

Cheers,Padhu


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: 9/15/2006

__._,_.___

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






SPONSORED LINKS
Software support Small business finance Business finance online
Business finance training Business finance course

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to