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

Re: [amibroker] cannot buy on open



PureBytes Links

Trading Reference Links

Yuki,

Please READ
"Tutorial: Backtesting your trading ideas"

Quotes from the manual:
"buy - "true" or 1 value opens long trade"

"AmiBroker now provides 4 new reserved variables for specifying the price at which buy, sell, short and cover orders are executed.
These arrays have the following names: buyprice, sellprice, shortprice and coverprice."

There is a clearly stated difference between
BUY variable (that defines buy RULE, NOT price !!!! )
and
BUYPRICE ( that defines buy PRICE ).

The BUY RULE has to be TRUE on bars when you
want to BUY and FALSE otherwise.

The buy PRICE is controlled by BUYPRICE.

It is good to read the manual.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Yuki Taga" <yukitaga@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, February 23, 2003 2:18 AM
Subject: [amibroker] cannot buy on open


> Sometimes the apparently simplest things are not, in AB.
>
> I cannot seem to make it buy on the open and sell on the close the
> same day, no matter what formula I enter.  Everything is done on the
> close.  This is regardless of what I have in 'settings', and
> regardless of what I write in code to control those settings.
>
> Even a brain-dead:
>
> Buy = Open; //nothing more, we'd buy every open and sell every close
>
> Sell = Close;
>
> SetTradeDelays(0,0,0,0);
>
> BuyPrice = Open;
>
> SellPrice = Close;
>
> results in all buys and sells taking place on the close, at the same
> price, of course. Can someone explain why I cannot control this?
>
> Yuki ^_^
>
> mailto:yukitaga@xxxxxxxxxxxxx
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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