Any difference for these two orders?

Questions about MultiCharts and user contributed studies.
Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Any difference for these two orders?

Postby Spaceant » 07 Sep 2009

Any difference between the two:

Buy this bar on close;

Buy next bar at market;


The first statement is not really a limit order. I wonder if there is any difference between the two???

Sa

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 10 Sep 2009

Could anyone give me a hand?

Sa

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 10 Sep 2009

Dear Spaceant,

These are both market orders.

The only difference is that there are chances that you may have Buy this bar on close; unexecuted due to the session end.

You may set your session to end a little bit earlier than actual one.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 10 Sep 2009

Dear Spaceant,

These are both market orders.

The only difference is that there are chances that you may have Buy this bar on close; unexecuted due to the session end.

You may set your session to end a little bit earlier than actual one.


Andrew,

Thanks, but I am getting confused!

1) What do you mean by "unexcuted due to the session end"?

2) To me, a market order is a market order, i.e. it will send the order, to buy the quantity specified, without considering the price. So, the order won't be unexecuted.

3) If both are market orders and there is a chance that the order will be unexecuted as you said. Does it mean that "Buy next bar at market" (Order 1) is superior than "Buy this bar at close" (Order 2)?

Or..... this is my guess:-

Order 2 will send the order 1 second quicker: it send the order at 59 second, before the balose, in order to try to capture the close of the current bar, while Order 1 send the order at 00 when the bar completes. Am I right??

If the above is not right, in what sense does Order 2 superior than Order 1? ... it should have, otherwise, there is no need to have two type of orders.

4) Does it have the same understanding for both IOG disabled or enabled?

5) I know that the difference of the above two orders in Portfolio Backtester - Order 2 uses bar close while Order Order 1 uses next bar open for calculation. It makes sense to me.

6) BTY, what type of order of the above or others can be used as MOC (market on close) order?

Can Strategy "SetExitonClose" can be use for real trading (haven't test it)? ......MOC order. Or it just can be used for backtesting~!


Regards,

Sa

User avatar
TJ
Posts: 6571
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 968 times
Been thanked: 1899 times

Postby TJ » 10 Sep 2009

I think he is referring to unexecuted due to the session end.

because you will need some time for your order to get to the exchange.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 10 Sep 2009

I think he is referring to unexecuted due to the session end.

because you will need some time for your order to get to the exchange.


If thisis right, should Andrew mean:

The only difference is that there are chances that you may have Buy next bar at Market; unexecuted due to the session end.
????

Sa

User avatar
TJ
Posts: 6571
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 968 times
Been thanked: 1899 times

Postby TJ » 10 Sep 2009

if the signal is triggered at the last bar of the trading session,

the order for next bar at market will never be sent... thus it will never get unexecuted.

however, the order for this bar on close will be sent... but never arrived at the exchange. Thus the caution.


He meant well; this is not a programming language issue, but an operational issue.

Spaceant
Posts: 252
Joined: 30 May 2009
Has thanked: 1 time
Been thanked: 3 times

Postby Spaceant » 10 Sep 2009

Thanks TJ!

Just to clarify again:

1) Does Order 2 (Buy this bar at Close) send order a little bit faster than Order 1 (Buy next bar at market)??

..... if so, Order 2 is superior than Order 1 in terms of timing to send order.

2) None of them is recommended for MOC order, right?

Regards,

Sa

User avatar
TJ
Posts: 6571
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 968 times
Been thanked: 1899 times

Postby TJ » 11 Sep 2009

if you trade ES (emini sp500), you will notice the day's volume is 1.5 million contracts. Do you think it will make a difference?

you can do this test to find out:

Code: Select all

if barstatus = 2 then
print("c=", text(currenttime_s));

if barstatus = 0 then
print("0=", text(currenttime_s));



There is a ONE tick difference,
you will be the judge on whether the time difference is important.
Last edited by TJ on 11 Sep 2009, edited 3 times in total.

User avatar
TJ
Posts: 6571
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 968 times
Been thanked: 1899 times

Postby TJ » 11 Sep 2009

...
2) None of them is recommended for MOC order, right?

Regards,

Sa



MOC orders require 3 minutes lead time prior to closing.


Return to “MultiCharts”