Buying Stock on Close - Or as close to it as possible

Questions about MultiCharts and user contributed studies.
trader0311
Posts: 50
Joined: 28 Sep 2014
Has thanked: 7 times

Buying Stock on Close - Or as close to it as possible

Postby trader0311 » 11 Mar 2015

Hi,

I have a strategy that trades stocks at the end of the day (in this case SPY). I have tested the strategy on daily bars. When I take the strategies that trade on the close and change the chart type to a 389 minute bar which will have a custom close time of 3:59PM. In this situation, my trade would be placed at 3:59 instead of 4PM. My broker is Interactive brokers and they do let me trade after 4PM, but I believe they will only allow limit orders after 4PM.

When I switch the strategies from a daily close to a close of 3:59, the performance degrades slightly. The strategy still looks great, but it tells me there is some extra money to be made if I continue to let the market sell off in that final minute.

My question is.....What options do I have to place my order closer to the close of the bar or even trading in the after hours session? My thoughts are the following:
1) Can I send an order a couple seconds before the actual close of the bar instead of using a custom session? If so, would I use intrabar order generation as well as a qualifying statement saying that "if my signal is hit and the time is >= 3:59:55
2)Can I send my order to buy the close using a limit order that would most likely fill seconds after the market closes? If this is possible, I believe the order needs to be a GTC order as well as a limit order. How do you send a GTC order with Powerlanguage and what settings do I need to set at Interactive Brokers? This of course puts me in a situation where I might not get a fill. Are there any settings that I should select to inform me of mismatches in the strategy position and the position at the broker?
3) I really don't want to do a market on close order because I want my signal to be generated just before the end of the day.

Is there anything I am not thinking of? I am moving towards having this automated and need to work through these details. Any best practices from people who have been in the same or similar position would be greatly appreciated.

Thanks

Jeremy

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

Re: Buying Stock on Close - Or as close to it as possible

Postby TJ » 11 Mar 2015

When dealing with time, you are at the mercy of internet latency.
One of a thousand things can happen between you, your router, the internet provider, and the broker;
Your transmission can be delayed at the most inopportune time. (take heed to Murphy's law)

Some brokers require the last order be submitted at least 3 minutes before close, otherwise they commit no guarantee in processing the order. Please check your broker to be sure.

The question is not about the extra potential profit,
but "What If"... what if your order is not filled.

If you can carry your position overnight, then by all means...
If you can manually change the unfilled order to limit order for after hours, then by all means...

YMMV

trader0311
Posts: 50
Joined: 28 Sep 2014
Has thanked: 7 times

Re: Buying Stock on Close - Or as close to it as possible

Postby trader0311 » 12 Mar 2015

I am thinking that I could still use daily bars and use intrabar order execution to send a market order at 3:59:45. Has anyone done this??

TCust
Posts: 249
Joined: 01 Sep 2011
Has thanked: 6 times
Been thanked: 26 times

Re: Buying Stock on Close - Or as close to it as possible

Postby TCust » 23 Mar 2015

trader0311 - correct answer -> Multicharts not have fundamental order Market on Close (MOC)

https://www.interactivebrokers.com/en/? ... %2Fmoc.php

Only this order give Auction Close Price, and true history price.

All other speaking about send order before 3 min session end, for child.

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

Re: Buying Stock on Close - Or as close to it as possible

Postby TJ » 23 Mar 2015

trader0311 - correct answer -> Multicharts not have fundamental order Market on Close (MOC)
https://www.interactivebrokers.com/en/? ... %2Fmoc.php
Only this order give Auction Close Price, and true history price.
All other speaking about send order before 3 min session end, for child.
Can you tell me, other than NYSC and AMEX, how many exchanges support MOC orders?



And for those who trade those exchanges,
how many people use MOC orders?

Bear in mind the order is a Market order, at the mercy of market price at the closing time. And the order must be submitted by 15:45 !!! And no changes or cancellations are allowed after 15:45 !!!

TCust
Posts: 249
Joined: 01 Sep 2011
Has thanked: 6 times
Been thanked: 26 times

Re: Buying Stock on Close - Or as close to it as possible

Postby TCust » 23 Mar 2015

TJ I do not mean to offend you, but All Stock Exchange in World

https://www.interactivebrokers.com/en/? ... 3Fot%3Dmoc

*Problem that MC not understand this, not in your 3 min

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

Re: Buying Stock on Close - Or as close to it as possible

Postby TJ » 23 Mar 2015

TJ I do not mean to offend you, but All Stock Exchange in World
https://www.interactivebrokers.com/en/? ... 3Fot%3Dmoc
*Problem that MC not understand this, not in your 3 min
I can see a handful, out of hundreds.

TCust
Posts: 249
Joined: 01 Sep 2011
Has thanked: 6 times
Been thanked: 26 times

Re: Buying Stock on Close - Or as close to it as possible

Postby TCust » 23 Mar 2015

With 90% market volume.

Who use this order ? -> who understand how market's work.


Return to “MultiCharts”