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

[amibroker] Re: Trying to duplicate Excel "IF" statement in Amibroker using "IIF"



PureBytes Links

Trading Reference Links


Never mind, I figured it out.:)

In my previous code (with the false short signals) I added "AND 
BarsSince(Cond2)>0" to my "short" rule.  At the "0" default in the 
beginning of FLIP(Cond1,Cond2), Cond2 has never been true so 
BarsSince has to be 0.


Luck, and thanks for the help,

Sebastian 


--- In amibroker@xxxxxxxxxxxxxxx, "sebastiandanconia" 
<sebastiandanconia@xxxx> wrote:
> 
> No apologies necessary, Terry.  I appreciate your effort and 
> patience, and hope to be able to contribute to the 
group...someday.:)
> 
> The only rub now is that the operation was a success but the 
patient 
> died.:)  I have working, error-free code that doesn't solve the 
> difficulty I was trying to get around.
> 
> I have "buy/sell" and "short/cover" rules that refer to my trend-
> following indicator's binary signal, "1" for "uptrend" and "0" 
> for "downtrend."  The problem is that the FLIP() function starts 
> at "0" by default until the first array (Cond1) is initialized.  
> There may or may not actually be a downtrend during this period, so 
I 
> get false "short" signals at the beginning of any data I'm 
testing.  
> After the first condition is initialized, though, everything works 
> perfectly.
> 
> I'm simply trying to get rid of the false signals, with no trades 
> taken until one or the other of the arrays is initialized.
> 
> 
> Luck,
> 
> Sebastian   
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> >





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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