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

[amibroker] Re: Trying to code buy stop



PureBytes Links

Trading Reference Links

Let's define the problem precisely, first.  If today's high is higher 
than yesterday's close by .03, "buy."  Is that it? If so, I think this 
gets you there.

Buystop=Filter AND (H>Ref(C,-1)+.03);
Buy=Buystop and Ref(Buystop,-1)==0;

In your original example you used "Buystop" to define a true/false 
condition and a price value in the same statement.  Can't do that.:)  
This way, when your filter and the price condition are both 
met "Buystop" becomes a "true" statement.  Then you get your "buy" 
signal when your conditions are true today and weren't true before.

Takes a bit to "get your mind right" on these concepts, but you'll get 
there.:)


Luck,

Sebastian


--- In amibroker@xxxxxxxxxxxxxxx, "kevinoversby" <kevinoversby@xxxx> 
wrote:
>
> I have a filter set up and my delay is set to 1 to enter next day. 
> However, entry need to be between 3 cents and 3% above previous 
close.
>  I found info on buystops in the manual but can't get it to work yet.
>  Please could someone point me in the right direction? 
> 
> // 3 cent condition
> 
> Buystop = Filter AND C + .03;
>  Buy = Cross( H, BuyStop );
> 
> Thanks
> 
> Kevin
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/