ScanExpert User Guide

MultiTimeframe

Top  Previous  Next

ScanExpert can access alternate bar intervals for securities in the Active Portfolio and these alternate bar intervals can be used as input to study formulas or simply for display purposes.

 

MultiTimeFrame1

Portfolio of 5-min symbols with stochastic calculated on several different bar intervals

 

The selection of alternate bar intervals is handled in the ScanExpert Wizard. Every formula study available in the Wizard has an "inv" (i.e., "interval") parameter where you can specify the bar interval to be used for purposes of calculating that particular study formula.

 

MultiTimeFrame2

Wizard profile used to create the grid display above

 

When the "inv" parameter is left blank (the default value) then that study will use the bar interval defined in the Active Portfolio for that particular security. To select a different bar interval, simply type in the desired interval in the Parameter Dialog.

 

MultiTimeFrame3

Setting the interval in Parameter Dialog

 

You can select any valid bar interval (tick intervals are NOT supported):

 

'D' for Daily
'W' for Weekly
'M' for Monthly
Any positive integer value (for intraday intervals).

 

 

The Wizard Study Selection box includes a special section called "MultiTimeFrame" which contains two  formula studies, called "interval" and "symInterval" respectively.

 

The "interval" study can be used to convert a standard data point (i.e., Open, High, Low, Close, etc.) to a different bar interval, either for display purposes or for purposes of creating a custom study that will use price/volume data from more than one bar interval in its calculation.

 

The "symInterval" study can be used to convert a standard data point (i.e., Open, High, Low, Close, etc.) to a different symbol and bar interval, either for display purposes or for purposes of creating a custom study that will use price/volume data from more than one symbol in its calculation.

 

MultiTimeFrame4

"interval" study in Wizard

 

The "interval" and "symInterval" studies can only be applied to a standard data point. To change the interval for an entire study, use the method discussed at the top of this page.

 

MultiTimeFrame5

"interval"  and "symInterval" studies applied to a standard data point in the Wizard

 

Using the "interval" study formula, you can create custom formulas that take input from multiple timeframes. A simple example would be a percent change calculation where you would divide the current bar price (close in the current bar interval) by the close of the prior daily bar.

 

The "symInterval" study formula is used when you want to perform calculations that use price/volume data from each of your portfolio symbols in conjunction with price/volume data from a specific symbol, such as an index. A simple example would be a formula that compares the percent change of each of your portfolio symbols to the percent change of a specific index, such as $SPX.

 

 

MultiTimeframe Considerations

 

Whenever you select an alternate interval using the "inv" parameter or the "interval" study formula, that bar interval will inherit the Session settings associated with the Active Portfolio security that the interval is based on. So if you create an Active Portfolio of securities using a 5-min bar interval, a Session Start time of 09:30 and a Session End time of 16:00, then any alternate intervals that you request will also have a Session Start time of 09:30 and a Session End time of 16:00. The only exception would be Daily, Weekly and Monthly intervals which are ALWAYS based on a 24-hour session. The reverse is also true. If your Active Portfolio is based on a 24-hour session then any alternate intervals requested will also be based on a 24-hour session.

 

Keep this in mind when you use an Active Portfolio based on Daily, Weekly, or Monthly intervals. Since D,W,M are always based on a 24-hour session, then any alternate bar intervals you happen to request along with that portfolio will also be based on a 24-hour session.

 

The "symInterval" function has parameters for symbol, bar interval, session-start, session-end, and source so, with this particular study formula, you will always specify the session times to be used for the external symbol that you wish to access. Just remember that the session-end time must be after the session-start time, unless you are requesting a 24-hour session. In the case of a 24-hour session both the start-session and end-session parameters would be set to '0:00'.

 

Note: Study formulas that use an input source created with the "symInterval" function may not always appear to update correctly in the ScanExpert Viewer grid when used during off-hours. This is because the portfolio symbol drives the grid update while, in this case, some of the information required to complete the calculation comes from a completely different symbol. If you encounter this problem, select the Refresh Script option from the Grid menu which will force a complete recalculation of the entire grid. You should not have this problem when running in realtime.

 

See also:

 

ScanExpert Wizard