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

[amibroker] Buy on close, sell next day's (bar) open



PureBytes Links

Trading Reference Links

Hi everybody,

I'm trying to code a very simple system:

Buy any day on close; Sell on next day open.


I've tried simple code like

		Buy = 1;
		BuyPrice = Close;


		Sell = Ref(Buy, -1); 
		SellPrice = Open; 

and also some loops without success.


According to what I see, problem is : If a close a long position at 
Open, I'm nor able to re-buy  at the close of the bar.  So I open a 
long position only every two days.

Any suggestion?

 

PS I also tried to check the box "allow same day exit" I do trade 
every day, but I get nonsense results.






Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.23/591 - Release Date: 12/17/2006 3:17 PM