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

[amibroker] Re: How to initiate a binary signal?



PureBytes Links

Trading Reference Links


Thank-you, sir, that did it.:)

Here's the finished product, for any other newbies trying to 
accomplish something similar:

Cond1= C > Ref(HHV(C,20), -1 );
Cond2= C < Ref(LLV(C,20), -1 );

Cond3=Flip(Cond1,Cond2);

Buy=Cond3 == 1;
Sell=Cond3 == 0;


Luck,

Sebastian 

--- In amibroker@xxxxxxxxxxxxxxx, "hairy_mug" <WSCHWARZ@xxxx> wrote:
> 
> Sebastian,
> 
> take a look at the "flip" function...
> 
> Walt
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "sebastiandanconia" 
> <sebastiandanconia@xxxx> wrote:
> > 
> > I have a trend-following formula where I only want unique signals 
> for 
> > long and short and not multiple signals within the same trend.  
> This 
> > is where I'm at, but of course it doesn't generate any signals 
> since 
> > a "Buy" binary signal today is dependent upon a "Sell" binary 
> signal 
> > from the day before, and vice versa.
> > 
> > Cond1= C > Ref(HHV(C,20), -1 );
> > Cond2= C < Ref(LLV(C,20), -1 );
> > 
> > Buy=Cond1==1 AND Ref(Cond2,-1)==1;
> > Sell=Cond2==1 AND Ref(Cond1,-1)==1;
> > 
> > What I need (I think) is a "false" initiating signal that will be 
> > dropped off as soon as its used, allowing Cond1 and Cond2 to run 
on 
> > their own afterwards, I just don't know how to do it.  I'm new.:)
> > 
> > TIA for any suggestions.
> > 
> > 
> > Luck to all,
> > 
> > Sebastian





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/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/