Automated trading with MultiCharts – what can go wrong?

Questions about MultiCharts and user contributed studies.
User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Automated trading with MultiCharts – what can go wrong?

Postby JoshM » 01 Apr 2012

I was wondering what technical and software risks there are with automated trading with MultiCharts, so that these can be accounted for in an automated strategy. I’m not talking here about general risks like a power outage or Windows crash or programming errors, but the risks inherent in the MultiCharts software and way of behaving. Especially the 'little quirks' that might not be directly obvious to beginners.

So far, I’ve come up with the following (some taken from the wiki article Trading Risks):
  • A mismatch between the broker position and MultiCharts,
  • Turning off of a signal (due to a data feed loss, or a user who accidentally recompiles part of a strategy),
  • Strategy isn’t turned on before the session starts (actually a user risk, but also a risk related with MultiCharts since the signals don't remember their active state if MC is closed and restarted),
  • Data feed stops updating (without a loss of connectivity),
  • OCO orders aren't cancelled in time when these are kept by MC (so that both orders are filled),
  • Simulated stop orders can be rejected by the broker if these are directly executable at the moment they are received.
I'd like to know more things that (theoretically) can go wrong with MultiCharts because I assume that at some point, they will go wrong. Better plan in advance than being unpleasantly surprised.

Which risks/errors am I missing? :)

NW27
Posts: 177
Joined: 25 Dec 2010
Has thanked: 40 times
Been thanked: 85 times

Re: Automated trading with MultiCharts – what can go wrong?

Postby NW27 » 02 Apr 2012

Hi
One of the issues I have with regard to auto trading as opposed to mc chart trading, is that auto trading places multiple live orders at the broker. where as chart trading only has one order. say you were long and had a stoploss and a trailing stop. These would appear as two orders at the broker.
So when there is a loss of connection between you and the broker for what ever reason, you are covered by your trailing stop order, so this closes you out of your trade but now the lower stoploss order puts you back into a trade :(

Neil

Dru
Posts: 107
Joined: 28 Aug 2007
Has thanked: 4 times
Been thanked: 171 times

Re: Automated trading with MultiCharts – what can go wrong?

Postby Dru » 05 Apr 2012

Hi
One of the issues I have with regard to auto trading as opposed to mc chart trading, is that auto trading places multiple live orders at the broker. where as chart trading only has one order. say you were long and had a stoploss and a trailing stop. These would appear as two orders at the broker.
So when there is a loss of connection between you and the broker for what ever reason, you are covered by your trailing stop order, so this closes you out of your trade but now the lower stoploss order puts you back into a trade :(

Neil
In this situation the new AT option "Optimized order flow" can help.

NW27
Posts: 177
Joined: 25 Dec 2010
Has thanked: 40 times
Been thanked: 85 times

Re: Automated trading with MultiCharts – what can go wrong?

Postby NW27 » 05 Apr 2012

Neil[/quote]
In this situation the new AT option "Optimized order flow" can help.[/quote]

OK, so where do I find information on "Optimized order flow", what it is and how to use it ?

Neil.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Automated trading with MultiCharts – what can go wrong?

Postby arjfca » 05 Apr 2012

I was wondering what technical and software risks there are with automated trading with MultiCharts, so that these can be accounted for in an automated strategy. I’m not talking here about general risks like a power outage or Windows crash or programming errors, but the risks inherent in the MultiCharts software and way of behaving. Especially the 'little quirks' that might not be directly obvious to beginners.

So far, I’ve come up with the following (some taken from the wiki article Trading Risks):
  • A mismatch between the broker position and MultiCharts,
  • Turning off of a signal (due to a data feed loss, or a user who accidentally recompiles part of a strategy),
  • Strategy isn’t turned on before the session starts (actually a user risk, but also a risk related with MultiCharts since the signals don't remember their active state if MC is closed and restarted),
  • Data feed stops updating (without a loss of connectivity),
  • OCO orders aren't cancelled in time when these are kept by MC (so that both orders are filled),
  • Simulated stop orders can be rejected by the broker if these are directly executable at the moment they are received.
I'd like to know more things that (theoretically) can go wrong with MultiCharts because I assume that at some point, they will go wrong. Better plan in advance than being unpleasantly surprised.

Which risks/errors am I missing? :)
Hello John

Edit: After reading back your post, I realized that I did not answered your initial interrogation

I don't use MC to control my trade so my point could be only thoritical.

If you use a software to control & send order, this software and computer should be secured and be used only for this purpose.

Ideally, you could outsource your PC by having a virtual one on a server near your broker.

Using this, You would eliminate some potential problems

The following is appliable only if your brooker is IB:
Using a software like TWSLINK and some code, you could have MC to control your trades, but IB server to maintain and control your entry, exit stop directly . Once a position is decided, IB managed it. You want to modify your stop, let IB do it. Give them the parameter and close your PC ( if you want). It will be managed as you planned it.

I use TWSLINK to send my orders from Excel. All my order are managed by me, but they are triggered directly from IB server. One there, I could close my PC and stop loss won't be affected. I did code also a time of validity. If my stop entry is not triggered during the validity time, order are automaticaly closed. Again, this is controlled on IB server. TWSLINK is not free, but this is a great tool if you want full control over your trade.

Sure MC is a great tool, but I don't like the idea that my money is on the edge with a PC or software failure of any source.

Martin

User avatar
furytrader
Posts: 354
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 155 times
Been thanked: 217 times

Re: Automated trading with MultiCharts – what can go wrong?

Postby furytrader » 05 Apr 2012

This is not an "error" but I think it's something you should be aware of - depending on how your code is written, it's possible that MC will rapidly enter and cancel orders (limit and stop orders) if you're using IntraBarOrderGeneration - even if the orders are at the same price. This will happen if the most recent tick causes your conditions to be met, and then the next tick does not.

Again, MC is doing what it is instructed, but this causes you to lose your place in the order queue. When you develop your program, you should be mindful of taking steps to cancel open orders only when you have to, lest you needlessly introduce more risk / slippage into your trading campaign.

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

Re: Automated trading with MultiCharts – what can go wrong?

Postby TJ » 05 Apr 2012

IntraBarOrderGeneration was originally (and architecturally) designed to be used with market orders -- the intention was to get an order filled immediately instead of waiting until the next bar.

Although it works with limit order, it was not the original intent, the limit order has to work inside the "intrabar" order generation process, thus you see the order cancel and re-submit.

If you do not need a fill immediately, and prefer to use limit orders, I would suggest you to change the bar interval to a shorter time frame, so that you can have a faster submit of orders, and at the same time avoid using IntraBarOrderGeneration.

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

Re: Automated trading with MultiCharts – what can go wrong?

Postby JoshM » 19 Apr 2012

The following is appliable only if your brooker is IB:
Using a software like TWSLINK and some code, you could have MC to control your trades, but IB server to maintain and control your entry, exit stop directly . Once a position is decided, IB managed it. You want to modify your stop, let IB do it. Give them the parameter and close your PC ( if you want). It will be managed as you planned it.

I use TWSLINK to send my orders from Excel. All my order are managed by me, but they are triggered directly from IB server. One there, I could close my PC and stop loss won't be affected. I did code also a time of validity. If my stop entry is not triggered during the validity time, order are automaticaly closed. Again, this is controlled on IB server. TWSLINK is not free, but this is a great tool if you want full control over your trade.
Thanks Martin, this is an important point. I looked into this somewhat further, and according the the Supported Brokers page, a 'Stp' order is tracked by Interactive Brokers, while a 'Stop loss' is tracked by MultiCharts. I suppose that means that entry stops are managed by the broker, and exit stops by MultiCharts.

MC Support, is that correct? And why does MultiCharts manages these orders, and not the broker? According to NT, all their orders (with the exeception of simulated stop orders) are directly submitted to the broker, and not kept by NT. So, technically it seems possible to remove this additional risk by letting the orders reside on the broker server.
This is not an "error" but I think it's something you should be aware of - depending on how your code is written, it's possible that MC will rapidly enter and cancel orders (limit and stop orders) if you're using IntraBarOrderGeneration - even if the orders are at the same price. This will happen if the most recent tick causes your conditions to be met, and then the next tick does not.
Thanks FuryTrader, that's a good point to take into consideration.
IntraBarOrderGeneration was originally (and architecturally) designed to be used with market orders -- the intention was to get an order filled immediately instead of waiting until the next bar.

Although it works with limit order, it was not the original intent, the limit order has to work inside the "intrabar" order generation process, thus you see the order cancel and re-submit.
I suppose that now, given that IntraBarOrderGeneration is already quite 'old', there shouldn't be a difference in how orders are filled. Is that correct MC Support?

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

Re: Automated trading with MultiCharts – what can go wrong?

Postby Henry MultiСharts » 24 Apr 2012

Thanks Martin, this is an important point. I looked into this somewhat further, and according the the Supported Brokers page, a 'Stp' order is tracked by Interactive Brokers, while a 'Stop loss' is tracked by MultiCharts. I suppose that means that entry stops are managed by the broker, and exit stops by MultiCharts.
MC Support, is that correct?
That is not correct. This page will be updated with the correct information.
With Interactive Brokers MultiCharts monitors only SetDollarTrailing, SetPercentTrailing and SetBreakEven orders on its end. All other orders are tracked by the broker.
I suppose that now, given that IntraBarOrderGeneration is already quite 'old', there shouldn't be a difference in how orders are filled. Is that correct MC Support?
What exactly do you mean by “there shouldn't be a difference in how orders are filled”?

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

Re: Automated trading with MultiCharts – what can go wrong?

Postby JoshM » 26 Apr 2012

With Interactive Brokers MultiCharts monitors only SetDollarTrailing, SetPercentTrailing and SetBreakEven orders on its end. All other orders are tracked by the broker.
Excellent! That's very good news. :)
I suppose that now, given that IntraBarOrderGeneration is already quite 'old', there shouldn't be a difference in how orders are filled. Is that correct MC Support?
What exactly do you mean by “there shouldn't be a difference in how orders are filled”?
I was referring to a comment a TJ regarding IntraBarOrderGeneration:
IntraBarOrderGeneration was originally (and architecturally) designed to be used with market orders -- the intention was to get an order filled immediately instead of waiting until the next bar.

Although it works with limit order, it was not the original intent, the limit order has to work inside the "intrabar" order generation process, thus you see the order cancel and re-submit.

If you do not need a fill immediately, and prefer to use limit orders, I would suggest you to change the bar interval to a shorter time frame, so that you can have a faster submit of orders, and at the same time avoid using IntraBarOrderGeneration.
As I read it, he suggests that IOG was designed for market orders, and as something that should be 'avoided' if one wants to use limit orders. I read that as a difference in the way how orders are executed with IOG on versus off and Limit orders versus market orders.

Since IntraBarOrderGeneration is already around some time, I suppose that any differences between the execution of market and limits orders are already removed? Or do you think that it's a good idea to not use IOG with limit orders?

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

Re: Automated trading with MultiCharts – what can go wrong?

Postby Henry MultiСharts » 27 Apr 2012

Since IntraBarOrderGeneration is already around some time, I suppose that any differences between the execution of market and limits orders are already removed? Or do you think that it's a good idea to not use IOG with limit orders?
Without IOG the script is calculated on the bar close, with IOG enabled the script is calculated every tick.

With IOG enabled: if the condition is met and the same price order with the same parameters is generated every tick-it should not be cancelled and resubmitted. It should continue to work on the broker.
If the condition is met on tick #1 and not met on tick #2 - that is expected that the order will be cancelled. If the condition is met again on tick #3 - the order will be sent to the broker again.
Some brokers support order modification. That means you can modify order parameters (adjusting price level and changing the quantity of the order that has not been filled yet) without cancelling and resubmitting it.

With IOG disabled: condition is checked on the close of the bar, if it is met-the order remains active, if it is not met-the order is cancelled.

Market order is sent once. It is not sent on each tick or each bar close.


Return to “MultiCharts”