Auto Trading: Difference between revisions
From MultiCharts
m
→Cancel Expired Market Orders After X Seconds
No edit summary |
|||
(10 intermediate revisions by 3 users not shown) | |||
Line 18: | Line 18: | ||
=== Replace to Market Partially Filled Orders === | === Replace to Market Partially Filled Orders === | ||
<div style="background-color: #E3FBE5;">'''Note''': Since Multicharts 11 Beta 1 this option has been replaced with the [[Auto_Trading#Partially_Filled_Orders_Replacement|"Partially Filled Orders Replacement"]] controls.</div> | |||
When this option is turned on, the unfilled part of partially filled price order will be cancelled and the remainder will be converted into market order only when the order is no longer generated by the strategy or the set of orders generated by the strategy changes. It means if conditions for order generation are met on the next calculation, the unfilled part of the order will not be converted into market one, it will be sent as original order but with number of remained unfilled contracts. | When this option is turned on, the unfilled part of partially filled price order will be cancelled and the remainder will be converted into market order only when the order is no longer generated by the strategy or the set of orders generated by the strategy changes. It means if conditions for order generation are met on the next calculation, the unfilled part of the order will not be converted into market one, it will be sent as original order but with number of remained unfilled contracts. | ||
<br> | <br> | ||
Line 32: | Line 32: | ||
=== Optimize Order Flow === | === Optimize Order Flow === | ||
If One-Cancel-Others group is emulated in MultiCharts the situation when more than one order is filled is possible | If One-Cancel-Others group is emulated in MultiCharts the situation when more than one order is filled is possible. | ||
One Cancels Other (OCO) orders are the price orders sent in a group. When any of OCO orders is filled or partially filled, the system cancels or reduces size of other orders in this OCO-group. | One Cancels Other (OCO) orders are the price orders sent in a group. When any of OCO orders is filled or partially filled, the system cancels or reduces size of other orders in this OCO-group. | ||
Line 61: | Line 61: | ||
<br> | <br> | ||
=== Cancel Market Orders | === Cancel Expired Market Orders After X Seconds === | ||
This option sets the timeout to cancel market orders not filled within specified time. If the option is not enabled any market order will be cancelled in 40+ seconds automatically. | This option, formerly known as "Cancel Market Orders as Obsolete If not Filled Within X Seconds", sets the timeout to cancel market orders not filled within specified time. If the option is not enabled any market order will be cancelled in 40+ seconds automatically. | ||
<div style="background-color: #E5F6FF;">'''Example''': the feature is not enabled;<br>12:00:00 Strategy Calculation at close of bar # 51 - place market order to buy at open of next bar;<br>12:00:01 Strategy Calculation at open of bar # 52 - market order to buy is placed at broker;<br>12:00:10 Strategy Calculation at close of bar # 52 - no market order to buy at open of next bar should be placed;<br>Default 40 seconds countdown has been started:<br>12:00:50 - market order is cancelled.</div> | <div style="background-color: #E5F6FF;">'''Example''': the feature is not enabled;<br>12:00:00 Strategy Calculation at close of bar # 51 - place market order to buy at open of next bar;<br>12:00:01 Strategy Calculation at open of bar # 52 - market order to buy is placed at broker;<br>12:00:10 Strategy Calculation at close of bar # 52 - no market order to buy at open of next bar should be placed;<br>Default 40 seconds countdown has been started:<br>12:00:50 - market order is cancelled.</div> | ||
<br> | <br> | ||
Line 88: | Line 88: | ||
<br> | <br> | ||
=== | === Price Order Emulation === | ||
Since '''MultiCharts 12''' it is possible to switch between native and emulated Stop, Limit and Stop-Limit orders in both auto trading and manual trading. This feature requires realtime data subscription on your broker account. When a Stop/Limit order is emulated - once the Stop/Limit price level is reached by the corresponding Ask/Bid or Trade prices, a market/limit order is sent to the broker correspondingly. When a Stop-Limit order is emulated - once the Stop price level is reached by the corresponding Ask/Bid or Trade prices, a Limit order is sent to the broker. In case Stop, Limit and/or Stop-Limit order emulation is enabled - the emulated OCO group is used, disregard the broker profile/autotrading broker plugin settings. | |||
When | |||
In case Stop and/or Stop-Limit order emulation is enabled - the emulated OCO group is used, disregard the broker profile/autotrading plugin settings. | |||
To enable the Stop, Limit or Stop-Limit order emulation for automated trading select '''Emulate locally using Bid/Ask''' or '''Emulate locally using Trade''' from the dropdown list next to the corresponding order type. Leave the settings to '''Use native''' if using price order emulation is undesirable. | |||
In order to apply the changes one needs to disconnect the broker profile and reconnect it. | |||
<br> | <br> | ||
Line 108: | Line 100: | ||
With the help of these options one can have unexecuted entry/exit price orders converted into market orders when the specified timeout is exceeded or upon bar close. | With the help of these options one can have unexecuted entry/exit price orders converted into market orders when the specified timeout is exceeded or upon bar close. | ||
The timer is launched depending on the option “Get realtime data from”: | The timer is launched depending on the option “Get realtime data from”: | ||
* when set to “Broker”, the timer starts when the price at the broker touches the order’s price; | * when set to “Broker”, the timer starts when the '''price at the broker''' touches the order’s price; | ||
* when set to “Chart”, the timer starts when the order price is hit on a chart. | * when set to “Chart”, the timer starts when the order price is hit '''on a chart'''. | ||
Operation of these options depends on the [[Signal Settings#Intra-Bar Order Generation|Intra-Bar Order Generation (IOG)]]: | Operation of these options depends on the [[Signal Settings#Intra-Bar Order Generation|Intra-Bar Order Generation (IOG)]]: | ||
# IOG disabled - if the timer has started but the bar closed faster than timeout exceeded, then the price order is converted into a market order without waiting for the timeout to exceed; | # IOG disabled - if the timer has started but the bar closed faster than timeout exceeded, then the price order is converted into a market order without waiting for the timeout to exceed; | ||
#IOG enabled - each new tick is considered to be bar close. If the order’s price is touched and new tick comes in – the price order will be converted into market order at once without waiting for the timeout to exceed. | #IOG enabled - each new tick is considered to be bar close. If the order’s price is touched and new tick comes in – the price order will be converted into market order at once without waiting for the timeout to exceed. | ||
<div style="background-color: #E3FBE5;">'''Note''': If the order price is not hit at broker/chart then the order will not be converted.</div> | <div style="background-color: #E3FBE5;">'''Note''': If the order price is not hit at broker/chart then the order will not be converted.</div> | ||
<br> | |||
=== Partially Filled Orders Replacement === | |||
<div style="background-color: #E3FBE5;">'''Note''': Available since Multicharts 11 Beta 1, replaces “Replace to Market Partially Filled Orders” option.</div> | |||
When these options are enabled the unfilled part of partially filled price order will be cancelled and the remainder will be converted into a market order when the specified timeout is exceeded, or upon bar close. The timer is launched on the first partial fill event. | |||
<div style="background-color: #E3FBE5;">'''Note''': When timeout is set to 0, the order will be cancelled and replaced with a market order once partial fill event occurs.</div> | |||
<br> | <br> | ||
Line 127: | Line 126: | ||
=== Get Real-Time Data from === | === Get Real-Time Data from === | ||
This option affects special orders monitoring and defining the moment to convert price orders into market ones. | This option affects special orders monitoring and defining the moment to convert price orders into market ones. | ||
<div style="background-color: #E3FBE5;">'''Note''': Special trailing stop order ('' | <div style="background-color: #E3FBE5;">'''Note''': Special trailing stop order (''SetDollarTrailing'') will be calculated based on the distance from the entry price order to the real-time price. The entry price is defined by the broker. In MC this price is the real price of order fill. It doesn't depend on trading mode or the source of real time.<br>''i_OpenEquity'', ''OpenPositionProfit'' keywords are not affected by this option, they are always calculated from chart prices.</div> | ||
<div style="background-color: #E5F6FF;">'''Example''': | <div style="background-color: #E5F6FF;">'''Example''': | ||
Line 218: | Line 217: | ||
* Any strategy parameters are changed | * Any strategy parameters are changed | ||
* Any Auto Trading parameters are changed | * Any Auto Trading parameters are changed | ||
* Connectivity between MultiCharts and the execution gateway has been lost and the disconnection time exceeded the specified acceptable level. | * Connectivity between MultiCharts and the execution gateway has been lost and the disconnection time (of the broker profile) exceeded the specified acceptable level. | ||
* [[Auto_Trading#Stop_auto-trading_if_final_status_of_an_order_is_not_received|"Stop auto-trading if final status of an order is not received"]] option has come into effect | |||
* [[Auto_Trading#Stop_auto-trading_after_X_rejected_orders|"Stop auto-trading after X rejected orders"]] option has come into effect | |||
<br> | |||
=== Pending Order Cancellation upon Termination of Auto Trading === | === Pending Order Cancellation upon Termination of Auto Trading === | ||