Reversing -- separate orders combined

Questions about MultiCharts .NET and user contributed studies.
hoimlet
Posts: 8
Joined: 23 Sep 2015
Has thanked: 4 times
Been thanked: 1 time

Reversing -- separate orders combined

Postby hoimlet » 17 Feb 2016

In my MC .NET code, when I want to reverse, I have something like this:

myLongExitOrder.Send();
myShortEntryOrder.Send();

These get called in the same call to CalcBar().

Multicharts, however, does not send two orders to our (custom) broker plugin. Instead it sends a single sell order. For example, if I was long 100 shares, it will send a single order to sell 200 shares instead of two orders to sell 100 shares.

My question: is there a way to get Multicharts to keep the orders separate-- to submit the orders like they are coded?

If you are curious why anyone would care: combining is a problem with stocks, as ultimately the short sale order must be separate and marked appropriately. (I know, retail broker x does not require you to do this. However, under the covers they have to do this.) Since our broker requires us to separate the orders, we need to do it in the plug-in or somehow get Multicharts to submit the orders separately.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Reversing -- separate orders combined

Postby JoshM » 18 Feb 2016

My question: is there a way to get Multicharts to keep the orders separate-- to submit the orders like they are coded?
In this thread from a while ago Andrew posted a registry change for switching between combining positions or treating them individually.

It's not a clear thread to me so I'm not really sure if this also applies to your usage case of an automated trading strategy, but it might be worth to explore this further. Perhaps MultiCharts Support knows best about whether such a registry change helps in your case.

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

Re: Reversing -- separate orders combined

Postby Henry MultiСharts » 21 Mar 2016

Hello hoimlet,

That is expected behavior. If you want to have separate orders then you need to close the open position first and then place the entry orders.


Return to “MultiCharts .NET”