| PureBytes Links Trading Reference Links | | 
 Just fooling around with a very simple idea, but can't get the code to
work.
 The idea is to sell at close of every day, hold over night, and sell at
open the following day.
 Code below sorta works, but skips every other day.  For example:
 Day 1, buy on close; Day2, sell on open.
 Day 3, buy on close; Day4, sell on open.
 etc.
 But I can't make it buy on close of days 2, 4, etc.
 Tried "Allow same bar exit" in settings, but that makes it sell the
same day that it buys, which is wrong.
 
 
 // BuyClose SellOpen Daily.afl
SetTradeDelays(0,1,0,0);  // has no effect
 Buy = Close;
 BuyPrice
= Close;
 Sell =
Open;
 SellPrice = Open;
 Short
= Cover
= False;
// long only strategy
 Buy = ExRem(Buy, Sell);  // has no effect
 Sell =
ExRem(Sell, Buy);  // has no effect
 Well?
 -- Keith
 
 
 __._,_.___
 
 **** IMPORTANT PLEASE READ ****
 This group is for the discussion between users only.
 This is *NOT* technical support channel.
 
 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com
 
 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)
 
 For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
 http://www.amibroker.com/devlog/
 
 
 
 
 ![]()  
 
 __,_._,___
 | 
 |