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

Re: [amibroker] cannot buy on open



PureBytes Links

Trading Reference Links

Hi William,

Does not work for me.

This code:

Buy = 1;

Sell= 1;

SetTradeDelays(0,0,0,0);

BuyPrice = Open;

SellPrice = Close;

results in every buy and every sell done at the same price, on the
close.

Yuki

Sunday, February 23, 2003, 2:04:53 PM, you wrote:


WP> Yuki,

WP> You could code it like this:

WP> Buy = 1;
WP> Sell = 1;
WP> SetTradeDelays(0,0,0,0);
WP> BuyPrice = Open;
WP> SellPrice = Close;

WP> Regards,
WP> William



WP> -----Original Message-----
WP> From: Yuki Taga [mailto:yukitaga@xxxxxxxxxxxxx]
WP> Sent: Saturday 22 February, 2003 5:18 PM
WP> To: amibroker@xxxxxxxxxxxxxxx
WP> Subject: [amibroker] cannot buy on open


WP> Sometimes the apparently simplest things are not, in AB.

WP> I cannot seem to make it buy on the open and sell on the close the
WP> same day, no matter what formula I enter.  Everything is done on the
WP> close.  This is regardless of what I have in 'settings', and
WP> regardless of what I write in code to control those settings.

WP> Even a brain-dead:

WP> Buy = Open; //nothing more, we'd buy every open and sell every close

WP> Sell = Close;

WP> SetTradeDelays(0,0,0,0);

WP> BuyPrice = Open;

WP> SellPrice = Close;

WP> results in all buys and sells taking place on the close, at the same
WP> price, of course. Can someone explain why I cannot control this?

WP> Yuki ^_^

WP> 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/