saveStatus(string name)

loadStatus(string name)

Saves and loads the current trading status to the .trd file in the Data folder that contains the open trades, the status of the sliders, and component specific variables (AlgoVar).

Parameters:

name

Name and path of the file, or 0 for a default name like "Data\\scriptname.trd".

Remarks:

Example:

function run()
{
  if(Bar >= 1) { // default asset is selected after first run
    AlgoVar[0] = 123;
    SaveMode = SV_ALGOVARS; 
    saveStatus("Data\\Test.trd");
    AlgoVar[0] = 456;
    printf("\n %.0f",AlgoVar[0]);
    loadStatus("Data\\Test.trd");
    printf("\n %.0f",AlgoVar[0]);
    quit("ok!");
  }
}

See also:

SaveMode, AlgoVar, assetHistory, Trading

► latest version online