confirmation of filled order from the broker  [SOLVED]

Questions about MultiCharts and user contributed studies.
kernel
Posts: 91
Joined: 19 Feb 2013
Has thanked: 21 times
Been thanked: 4 times

confirmation of filled order from the broker

Postby kernel » 19 Nov 2015

Hi,

Wonder if there's a way to retrieve the confirmation info from your broker that your order gets filled?

One way workaround that I can think of is to monitor my position change in code. However, market is unpredictable , plus the complexity of your code on handling stop loss, profit target, scale-in/out, any order sent to the broker may or may not get filled, or get partially filled at any moment. To make it worse, if you turn IOG on and work on tick-level instead of bar level, chances of your orders not getting filled increase greatly, especially during slow market or speedy market....

All boils down to another simpler solution, being able to retrieve confirmation message (feedback or echo msg) on whether or not your order has been filled in live market...however, the catch is, you may not be able to backtest or not even in replay mode....which, I wasn't able to get to work with my IOG code anyway after all.

Thanks,

-kernel

tony
Posts: 420
Joined: 14 Jun 2013
Has thanked: 30 times
Been thanked: 81 times
Contact:

Re: confirmation of filled order from the broker

Postby tony » 19 Nov 2015

Hi,

Wonder if there's a way to retrieve the confirmation info from your broker that your order gets filled?

One way workaround that I can think of is to monitor my position change in code. However, market is unpredictable , plus the complexity of your code on handling stop loss, profit target, scale-in/out, any order sent to the broker may or may not get filled, or get partially filled at any moment. To make it worse, if you turn IOG on and work on tick-level instead of bar level, chances of your orders not getting filled increase greatly, especially during slow market or speedy market....

All boils down to another simpler solution, being able to retrieve confirmation message (feedback or echo msg) on whether or not your order has been filled in live market...however, the catch is, you may not be able to backtest or not even in replay mode....which, I wasn't able to get to work with my IOG code anyway after all.

Thanks,

-kernel
Whether you trade in IOG mode or not, your fills are a function of the instrument being traded and the type of orders you are sending to market. If you are trying to fill via limit, then fills may not happen and it has nothing to do with whether you generate on the next tick or the next bar. If you are not filling when you want to then I would switch to market orders which you will fill 100% of the time. If you trade a really slow instrument combined with limit orders then it will be really tough to fill unless price flows through you. And you need to write your code so limit orders are not cancelled if conditions change.

If you are trying to determine if you filled, just check the order and position tracker window. You have milllisecond time stamps on fills, rejections, etc.

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

Re: confirmation of filled order from the broker  [SOLVED]

Postby Henry MultiСharts » 19 Nov 2015

Hello gztanwei,

At the moment there is no way to directly check if an order was filled or not. You can do that implicitly by implementing a logic that utilizes market position keywords and currentcontracts. You can also find useful the Strategy Position Trades‎ commands.

We are going to improve the algorithms of order handling in backtesting and auto trading in the new Auto Trading and Backtesting engine that is coming in one of the future versions of MultiCharts. Please see the corresponding PM entry.


Return to “MultiCharts”