trade29.sc.SCBridge.set_data_file#
- SCBridge.set_data_file(key: str, filename: str, return_after_reload: bool = True) SetDataFileResponse #
Set chart data file. A convenient way to change the symbol of the chart
SC docs: https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Variables_And_Arrays.html#scDataFile
For intraday charts, set the suffix to .scid, for example NQM25.scid For historical charts, set the suffix to .dly, for example NQM25.dly
- Parameters:
- keystr
The key of the SC-dX study applied to the target chart.
- filenamestr
the new file name, see sc docs for more
- return_after_reload: bool
wait for the chart to fully change the symbol, download any data and reload before returning
- Returns:
Examples
The following snippet changes chart es_2 to an NQ intraday chart.
from trade29.sc.bridge import SCBridge bridge = SCBridge() ret = bridge.set_data_file("xx", "NQM25-CME.scid", True) print(ret.rdata)