saveStatus(string name)

loadStatus(string name)

Saves and loads the current trading status to a .trd file, containing 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 "Log\\scriptname.trd".

Remarks:

Example:

function run()
{
  if(Bar >= 1) {
    AlgoVar[0] = 123;
    SaveMode = SV_ALGOVARS; 
    saveStatus("Log\\Test.trd");
    AlgoVar[0] = 456;
    printf("\n %.0f",AlgoVar[0]);
    loadStatus("Log\\Test.trd");
    printf("\n %.0f",AlgoVar[0]);
    quit();
  }
}

See also:

SaveMode, AlgoVar, loadHistory, Trading

► latest version online