×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

Global Variables

655 bytes added, 17:38, 1 April 2022
Global Variables is an external .dll file that can be used to pass values between strategies on separate charts and third party applications.
The information is stored in a shared memory space. External processes can access the data in the memory for further operations.<br> From MultichartsMultiCharts, the Global Variables functionality is accessed by PowerLanguage functions:<syntaxhighlight>AccuracyGetNamedDoubleAccuracyGetNamedIntAccuracySetNamedDoubleAccuracySetNamedInt</syntaxhighlight>'''Example'''<br>All global variables use the same principle – it is required to specify the name that is attached to a value to get this value. <br><syntaxhighlight>value1 = AccuracyGetNamedDouble("Double_VariableName");value2 = AccuracyGetNamedInt("Int_VariableName");</syntaxhighlight> In order to remember a value, one needs to assign a name and associate the value with this name:<br><syntaxhighlight>AccuracySetNamedDouble("Double_VariableName", 0.05);AccuracySetNamedInt("Int_VariableName", 50);</syntaxhighlight>  
When a customer uses Global Variables it is important to determine the read-write action time because the actions are performed in the script calculation.
<br>

Navigation menu