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.





Reply via email to