INCLUDETODAY

Top  Previous  Next

Keyword Description

Include trades previously entered today in each new initial sizing calculation

Class

Directive

Where Legal

Resources

Entry Logic

Exit Logic

Initial Size

Resize

(Pre-Category)

Resize

(Category-Level)

 

 

 

l

 

 

Syntax

INCLUDETODAY

 

Example

Sample code

INCLUDETODAY = TRUE  ' simulate a trader watching the markets

 

Light Bulb

Use this technique with care because it alters the behavior of Category-related keywords.

INCLUDETODAY = FALSE is the default

INCLUDETODAY = TRUE attempts to simulate what a trader might do as he watches the markets open, and sizes new positions throughout the day with knowledge of trades previously entered (and sized) during the same day. As the day goes on any previously entered positions will be known to and included in subsequent Initial Size calculations.

In historical testing with INCLUDETODAY=TRUE, Mechanica keeps track of positions put on during the day.If you want the option of INCLUDETODAY=TRUE, it is suggested that you do it from the code, instead of from the menu pick.

Be aware that when you use this technique for actual trading Mechanica cannot know the order in which the trades are actually entered during the day. So after the markets close and you've downloaded your data and run orders for the next session, it is likely that you will be holding positions that are sized differently from what Mechanica has. Edit your position sizes in Order Manager to bring Mechanica's portfolio in line with what you actually hold. Then re-run Sizing Rules to update your orders.