Difference between revisions of "Limit Order Execution Assumptions"

From MultiCharts
Jump to navigation Jump to search
 
Line 12: Line 12:
 
# Chart resolution is '''not''' 1 tick and Bar Magnifier is not enabled. Backtesting Assumptions is set to '''Fill limit order when trade price goes beyond limit price by 3 points'''.<div style="background-color: #E5F6FF;">'''Example''': Generated order: sellshort limit @ 121; order is filled @ 124 if 124 price is between High and Low; order is not filled at all if there is not 124 price between High and Low of the bar.
 
# Chart resolution is '''not''' 1 tick and Bar Magnifier is not enabled. Backtesting Assumptions is set to '''Fill limit order when trade price goes beyond limit price by 3 points'''.<div style="background-color: #E5F6FF;">'''Example''': Generated order: sellshort limit @ 121; order is filled @ 124 if 124 price is between High and Low; order is not filled at all if there is not 124 price between High and Low of the bar.
  
Since '''MultiCharts 10''' it is possible to specify '''TIF''' (time in force) for '''Backtesting Assumptions'''. At the moment only 2 TIFs are available: '''GTC''' and '''DAY'''.
+
TIF (time in force) is specified by default depending on the selected option.  
  
To specify the TIF open [[Strategy Properties]]. Then go to Backtesting tab and select '''Fill limit order when trade price goes beyond limit price by points''', and then the selection of TIFs will be activated.
+
When '''Fill limit order when trade takes place at limit price or better''' option is selected, GTC (Good-Till-Canceled) will be set. <br>
 +
When '''Fill limit order when trade price goes beyond limit price by X points''' option is selected, DAY time in force will be used.
  
This setting doesn’t influence autotrading. With '''GTC''' backtesting works as always. With '''DAY''' – '''Session Break''' is taken into consideration: all active price orders (Limit and Stop Limit) “forget” their statuses and on the new bar opening are considered to be newly placed, which leads to the situation when there’s a gap and the order is guaranteed to be executed, the orders are filled on the bar Open, and not on the Limit price.
+
For other backtesting orders GTC is used by default.
  
This mode does not influence orders with special state (BreakEven, PercentTrailing, Dollartrailing).
 
  
 
[[Category:Backtesting]]
 
[[Category:Backtesting]]

Latest revision as of 13:26, 3 August 2021

Limit orders are filled at a specific price or better (for long better = lower, for short better = higher). In backtesting MultiCharts works:

Limit order execution behavior for backtesting can be modified in the Backtesting tab of Strategy Properties window.

There are 4 different variants:

  1. Chart resolution is 1 tick or Bar Magnifier of any resolution is enabled. Backtesting Assumptions is set to Fill limit order when trade takes place at limit price or better.
    Example: Generated order: sellshort limit @ 121; available prices: 120, 122, 125, ...; order is filled @ 122.
  2. Chart resolution is 1 tick or Bar Magnifier of any resolution is enabled. Backtesting Assumptions is set to Fill limit order when trade price goes beyond limit price by 3 points.
    Example: Generated order: sellshort limit @ 121; available prices: 120, 122, 125, ...; order is filled @ 125.
  3. Chart resolution is not 1 tick and Bar Magnifier is not enabled. Backtesting Assumptions is set to Fill limit order when trade takes place at limit price or better.
    Example: Generated order: sellshort limit @ 121; order is filled @ 121 or better if 121 (or better) is between High and Low of the bar.
  4. Chart resolution is not 1 tick and Bar Magnifier is not enabled. Backtesting Assumptions is set to Fill limit order when trade price goes beyond limit price by 3 points.
    Example: Generated order: sellshort limit @ 121; order is filled @ 124 if 124 price is between High and Low; order is not filled at all if there is not 124 price between High and Low of the bar.

TIF (time in force) is specified by default depending on the selected option.

When Fill limit order when trade takes place at limit price or better option is selected, GTC (Good-Till-Canceled) will be set.
When Fill limit order when trade price goes beyond limit price by X points option is selected, DAY time in force will be used.

For other backtesting orders GTC is used by default.