Navigation: Realtest Script Language > Script Sections >

Include Section





Though this appears as an outer-level "script section", Include is just a simple statement to allow a script to include other scripts. This capability is provided to make it easier to maintain common elements that several scripts share. Examples would be common Data Section items, a frequently used Import definition, or even a Strategy (e.g. an index benchmark) that you often add to other strategies in a script.


Several of the Example Scripts that are based on mr_sample.rts illustrate the use of Include:



This example includes the entire original script and then adds a SPY benchmark to it.

Note that the script being included must consist of one or more entire script sections.

For example, it would not work to combine a set of strategy entry formulas from one script with exit formulas for a different script by including both scripts. It would, however, work to include a Template section that various strategies share.

You can combine items of the same section if that section supports multiple instances. This is the case for Data, Library and Parameters, so Include can be used to share common subsets of those sections among various scripts if desired.

Finally, if you have certain elements that you want to include in every script in a folder, RealTest supports automatic inclusion of any script named autoinclude.rts in the same folder as the script being run. If this special script is found, it is included at the top of any other script from the same folder.




Copyright © 2020-2024 Systematic Solutions, LLC