The Extract Function can be used data series of as System object or Instrument Object process. In order for Extract to work, it must be used with a data series that has not been disabled.
When used with an instrument object, it will export to a file the value for each series and indicator for that instrument, for each day in the test.
When used with a system object, it will export for all instrument in the system.
We recommend only running this once per instrument per test run, as a file is created each time the function is called.
By default, the extra file name will be “Daily Extract XXX.csv” where XXX is the symbol, and the extract will contain all available dates that have been loaded.
The file is placed at the top level of the Trading Blox Builder installation directory.
Be careful with the system.Extract because each symbol in the portfolio will create an export file.
When there are many symbols in a portfolio file, the Extract function will create a file for each symbol, which might be more than what you intended.
Syntax: |
---|
' Export optional parameters instrument.extract([ExtractedFileName] [,StartingDate] [,EndingDate ])
OR ' Use default settings
OR ' Export all series data between 19990101 and 20060101, and use the default file name:
OR ' Create a file named “My Custom Name XXX.csv” for each instrument, |
Parameter: |
Description: |
---|---|
[ExtractedFileName] |
Optional: Default file-name field is used when field is left empty. |
[,StartingDate] |
Optional: Beginning data date when start-date field is left empty. |
[,EndingDate ] |
Optional: Ending data date when end-date field is left empty. |
Example: |
---|
' Typical usage in the After Test script:
OR system.Extract()
OR inst.LoadSymbol(“GC”) |
Returns: |
---|
The return value is TRUE if successful and FALSE if not. In this example, we output to a custom folder within the Trading Blox install directory. If this folder does not exist, the function will fail. |
Links: |
---|
|
See Also: |
Edit Time: 1/7/2021 3:59:55 PM |
Topic ID#: 333 |