Command to close alls limit orders at broker?

Questions about MultiCharts and user contributed studies.
Gaempi
Posts: 60
Joined: 27 Jul 2010
Location: Switzerland
Has thanked: 3 times
Been thanked: 8 times

Command to close alls limit orders at broker?

Postby Gaempi » 31 Jul 2014

Is there a command or a way to close all limit orders at the broker after a specific time?

The problem: MC sends from my trading systems limit orders to the broker (IB) in the official session. That's ok. But there is a after session market with low liquidity. It happens in after session time that open limit order are executed, but not in the tradings systems at the official market session at the next day. So i have a mismatch in the trading positions.

I want to trade with my systems only in the official session and to cancel all orders in the after session automatically.

How can i do this?

Thanks

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: Command to close alls limit orders at broker?

Postby Smoky » 31 Jul 2014


With the new backtesting/auto trading engine more order control will be provided to the user. This functionality is coming with the next major platform update: https://www.multicharts.com/pm/viewissu ... no=MC-1497

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

Re: Command to close alls limit orders at broker?

Postby JoshM » 31 Jul 2014

I want to trade with my systems only in the official session and to cancel all orders in the after session automatically.
Open orders are automatically cancelled in MultiCharts as long as they are not resubmitted again. So if your strategy stops sending those limit orders just a moment before the close of trading, they will be cancelled and not executed after hours.

Helpful links:
How signals are calculated
IOG with real-time data
IntraBarOrderGeneration

Gaempi
Posts: 60
Joined: 27 Jul 2010
Location: Switzerland
Has thanked: 3 times
Been thanked: 8 times

Re: Command to close alls limit orders at broker?

Postby Gaempi » 31 Jul 2014

Thank you JoshM

I limit the orders in my trading systems by time. All orders can only be sent before the close of trading session. But this is not the problem. The problems are the open limit orders (sent during the official trading session) in the after trading. If official trading session is over, all at the broker placed orders should be cancelled 1 minute after normal trading session. Theres should be no open orders after normal trading time.

Is there a command to cancel a order after e specific time?

User avatar
Smoky
Posts: 507
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 97 times
Been thanked: 115 times

Re: Command to close alls limit orders at broker?

Postby Smoky » 31 Jul 2014

Gaempi,

if you'll want to use " SendCancelOrder(Id) or SendCancelOrder("Lmt 1") "

Please Vote for MC 1497 ...

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

Re: Command to close alls limit orders at broker?

Postby JoshM » 31 Jul 2014

I limit the orders in my trading systems by time. All orders can only be sent before the close of trading session. But this is not the problem. The problems are the open limit orders (sent during the official trading session) in the after trading. If official trading session is over, all at the broker placed orders should be cancelled 1 minute after normal trading session. Theres should be no open orders after normal trading time.
Does your chart stop updating after the official trading session? If so, that might explain why the open orders are not cancelled because the strategy is not recalculated again on new price bars (and there is thus no option to stop sending the open orders).

I suppose that 'All orders can only be sent before the close of trading session' means that your orders are sent up to the close of the trading session? What happens when you stop sending the limit orders 1 minute prior to the close? That would likely circumvent the problem in the paragraph above.

With the new backtesting/auto trading engine more order control will be provided to the user. This functionality is coming with the next major platform update: https://www.multicharts.com/pm/viewissu ... no=MC-1497
if you'll want to use " SendCancelOrder(Id) or SendCancelOrder("Lmt 1") "

Please Vote for MC 1497 ...
I think its a great feature request and look forward to these new capabilities of MultiCharts. That being said, the next major version of MultiCharts can still easily take a half year or more (the current major version is still in beta). So currently it's not a solution for this topic, I think.


Return to “MultiCharts”