Markets

Array of Market objects in Multi Market Strategies that reveals information about all selected markets.

In Multi Markets Strategy, Markets is a property of type Market[] containing all the selected markets. You can access a concrete market with array index operator - Markets[0] for first selected market, Markets[1] for second etc. as you can see in the editor's sidebar.

// Write current price of the first market in the list of selected markets to the logs
Log("Current price of " + Markets[0].Asset + " on " + Markets[0].Exchange + ": " + Markets[0].CurrentPrice);

// Write current price of the second market in the list of selected markets to the logs
Log("Current price of " + Markets[1].Asset + " on " + Markets[1].Exchange + ": " + Markets[1].CurrentPrice);

Last updated