PureBytes Links
Trading Reference Links
|
Ernie --
Assuming you want just a buy-on-stop and not a limit-buy-on-stop:
SetTradeDelays(0,0,0,0);
Buy = High>Ref(High,-1);
slippage = 0: // a bit optimistic, but you decide
BuyPrice = IIf(Open>Ref(High,-1), Open, Ref(High,-1)+ slippage);
The limit-buy-on-stop can only be for sure if the close is less than
the limit price, so your code would have to reflect this. I wouldn't
bother with it, but instead, if I planned to use a limit above the
stop price, just add that into the slippage.
-- Keith
--- In amibroker@xxxxxxxxxxxxxxx, "Ernie Newman" <ewn87544@xxxx>
wrote:
>
> I would like to buy tomorrow at todays high price on a stop.
> What is the code for this. If tomorrows price is not greater than
or
> equal to todays high then do not buy. I can''t seem to to able to
make
> amibroker buy at a price other than open or close.
> THANKS
> Ernie
>
------------------------ 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/
|