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

Re: [amibroker] iif help



PureBytes Links

Trading Reference Links


David,
 
This could be accomplished without 
IIFs.
 
buy = ref( filter1, -1 ) and filter2;
 
this would generate a "buy" if filter1 wasTRUE 
yesterday and filter2 is TRUE today.
 
 
but your filter2 should give TRUE or 
FALSE
so for example
filter2 = <FONT face=Arial 
size=2>EMA(Close,130)+2* ATR(10)<H;
 
Best regards,
Tomasz Janeczko
amibroker.com
 
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
David 
Holzgrefe 
To: <A 
href="" 
title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
Sent: Wednesday, November 07, 20017:21 
AM
Subject: [amibroker] iif help

Hi ALL hopefully someone will help me with this problemI just 
don't seem to grasp how to use the iif statement despite reading the help 
notes 1,000,000 times :)
what I would like is that buy to be signaled if filter1is 
true then buy when filter2 is ALSO true 
 
filter1= H<FONT 
size=1> >EMA<FONT 
size=1>(Close,130<FONT 
size=1>) and EMA<FONT 
size=1>(Close,250<FONT 
size=1>) > Ref<FONT 
size=1>(EMA<FONT 
size=1>(Close,250<FONT 
size=1>),-10<FONT 
size=1>);
filter2 = EMA<FONT 
size=1>(Close,130<FONT 
size=1>)* ATR<FONT 
size=1>(10<FONT 
size=1>);
if  filter1 true then buy next bar that filter2 is also true 

 
Thanks David Your use of Yahoo! Groups is subject to 
the Yahoo! Terms of 
Service. 



  • References: