Buy at close and sell on open

Questions about MultiCharts and user contributed studies.
rkhan
Posts: 65
Joined: 16 Mar 2014
Has thanked: 1 time
Been thanked: 2 times

Buy at close and sell on open

Postby rkhan » 27 Jun 2014

I would like to buy at the close of the day and sell at the open of the next day

If i write the code below, it seems to be doing what i want in the backtest, but will this work with live trading?

Or should i be trying to do this on an intraday chart?
Currently I'm using a daily chart, and the backtest is working, but i'm affraid it might not work in real, and it might actully just try and buy the next day

Code: Select all


Buy ("Night") this bar at close;
Sell("Sell") next bar at open;


hendrix
Posts: 54
Joined: 27 Dec 2013
Has thanked: 21 times
Been thanked: 5 times

Re: Buy at close and sell on open

Postby hendrix » 27 Jun 2014

Hello

you buy the close market (close of last bar of the day) and you sell the open market (open of firest bar of the day)?

so...your strategy plays with gap-up only?

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Buy at close and sell on open

Postby TJ » 27 Jun 2014

I would like to buy at the close of the day and sell at the open of the next day
If i write the code below, it seems to be doing what i want in the backtest, but will this work with live trading?
Or should i be trying to do this on an intraday chart?
Currently I'm using a daily chart, and the backtest is working, but i'm affraid it might not work in real, and it might actully just try and buy the next day

Code: Select all

Buy ("Night") this bar at close;
Sell("Sell") next bar at open;
See post #7
[FAQ] This Bar on Close
viewtopic.php?f=16&t=10811

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Buy at close and sell on open

Postby MAtricks » 27 Jun 2014

So you're placing a market order at the second that the market has closed? :D

Depending on the market that you're trading, there are ways to trade the close, but not like this and not at the prices of a daily bar...


Return to “MultiCharts”