Order Management  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Order Management

Postby MAtricks » 16 Jan 2014

I am wondering if we have a bit more control with the orders than I believe we do.

If I put an order buy 1 @ 100 and sellshort 1 @ 200, once one fills, the other turns into a buytocover/sell contract plus the buy/sellshort contract so you're going to reverse your position once price gets to that point. This is a nice feature for the most part, but I'd like more control.

Is there any way to turn off this feature? I'd like the ability to specify my position size. If I place a long order and a short order, I'd like the ability to specify whether the built in Order Management changes the number of these contracts once one is filled.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Order Management

Postby Henry MultiСharts » 17 Jan 2014

Hello MAtricks,

Buy and SellShort commands are for opening a position. Sell and BuyToCover are for closing a position. When only Buy and SellShort commands are used in your strategy - this is a reverse strategy and there is no way to make these commands function differently.
I'd like the ability to specify my position size. If I place a long order and a short order, I'd like the ability to specify whether the built in Order Management changes the number of these contracts once one is filled.
Please describe the exact difficulty you have and provide the sample code you are using.

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

Re: Order Management

Postby MAtricks » 17 Jan 2014

Thanks for the reply.

I understand the difference between sell, sellshort, buy, and buytocover. I'm trying to dumb MC down a little...

If we're investing in the ES, in essence, we're placing a +1 ES and/or a -1 ES on the exchange. I'd like the control to turn off the Multicharts order management which will change the number of contracts to +2 or -2 once the other is filled.

Is there any way to place orders to buy 1 and sell 1 at the same time and once one gets filled, have the other stay as 1 contract? I believe that we can do this in MC.net with unmanaged orders.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Order Management

Postby Andrew MultiCharts » 22 Jan 2014

Hello MAtricks,

Code: Select all

buy 1 contract next bar at X limit;
sellshort 1 contract next bar at Y limit;
IOG = OFF, no pyramiding.

I am sure the following example will explain how it works in details:
  1. Close of bar 1, calculation 1: conditions are met for the orders to be sent at open of next bar;
  2. Open of bar 2, no calculation: orders are sent;
  3. Broker receives an order to buy 1 contract and an order to sell 1 contract at specified prices;
  4. Close of bar 2, calculation 2: conditions are met for the orders to be sent at open of next bar;
  5. Open of bar 3, no calculation: orders maintained;
  6. The order to buy 1 contract is filled, market position is +1;
  7. MultiCharts cancels the order to sell 1 contract;
  8. No order is pending at broker;
  9. Close of bar 3, calculation 2: conditions are met for the orders to be sent at open of next bar;
  10. Open of bar 4, no calculation: only short (reverse) entry order is sent;
  11. Broker receives an order to sell 2 contracts at specified price to end up with market position = -1;
*If the broker is IB the points 7 and 8 are performed on their end and it should be faster.

If you want at point 11 the broker to receive an order to sell 1 contract at specified price to end up with market position = 0, here an example of code:

Code: Select all

if marketposition = 0 then buy 1 contract next bar at X limit;
if marketposition = 0 then sellshort 1 contract next bar at Y limit;
sell 1 contract next bar at A limit;
buytocover 1 contract next bar at B limit;

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

Re: Order Management

Postby MAtricks » 22 Jan 2014

What I want:

Simultaneously place (same bar)-
+1 contracts Limit
-1 contracts Limit

Once one is filled, I do not want the other to turn into +/- 2 contracts Limit.

Is there a way to control the MC order management to disallow this action?

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Order Management

Postby Andrew MultiCharts » 22 Jan 2014

MAtricks, once 1 order is filled, the other is cancelled anyway. Then new order(s) is/are sent if your code generate them.

The code i have provided in the end of my last post will do what you want but if 1 of the 2 initial entry orders is filled, the other one is cancelled and there is no way to manage that in current MC version.

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

Re: Order Management

Postby MAtricks » 22 Jan 2014

This is what I want:

Code: Select all

+1 contract next bar X limit ;
-1 contract next bar Y limit ;

//I want these placed at the same time, 1 contract each, never changed, never added to, nor removed
Not this:

Code: Select all

if marketposition = 0 then buy 1 contract next bar at X limit;
if marketposition = 0 then sellshort 1 contract next bar at Y limit;
sell 1 contract next bar at A limit;
buytocover 1 contract next bar at B limit;
Other platforms give you unmanaged control over your orders and I was hoping that MC had a way to do this. We've read that MC.net has this ability (not confirmed personally).

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Order Management  [SOLVED]

Postby Andrew MultiCharts » 23 Jan 2014

Yes, it possible to do this with unmanaged order in MC .NET.

I left the feature request for our developers, the will consider it for future versions of MC.

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

Re: Order Management

Postby MAtricks » 23 Jan 2014

Thank you!

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

Re: Order Management

Postby MAtricks » 27 May 2014

Any word from the developers on this idea? It would be amazing if we had more order control instead of being restricted to Buy, SellShort, Buytocover, and Sell.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Order Management

Postby Andrew MultiCharts » 28 May 2014

At the moment is expected in MC 9.1, but not yet confirmed 100%.


Return to “MultiCharts”