Access bars and ticks from multiple symbols

Questions about MultiCharts .NET and user contributed studies.
jinjer
Posts: 3
Joined: 12 Apr 2013
Has thanked: 1 time

Access bars and ticks from multiple symbols

Postby jinjer » 29 Apr 2013

Brief question: How do I access bars and ticks (specially ticks) from multiple instruments in the same strategy/indicator?

Long version: I would like to port to multicharts a strategy that needs multi time frame bars from several instruments and which decides entries and exits based on tick data for 2 or more instruments.

Bar data is used to calculate levels for the strategy (think of it as pivot points on multiple instruments). Tick data is used to follow market action and decide whether to enter or exit the trade at the above calculated levels.

Thank you.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Access bars and ticks from multiple symbols

Postby Henry MultiСharts » 29 Apr 2013

Hello jinjer,

There are two ways to get the data:
1) You can plot this data on the chart, then reference it from the code for calculation with the help of BarsOfData() method.
2) Use IDataLoader to load the data you need, process and use it from the code directly.

For more details and examples please refer to MultiCharts.NET-Programming Guide:
4.2 Data Access
4.7.4 Receiving the data for any symbol and any resolution. DataLoader.

Another IDataLoader example can be found here.

Please refer to our TradeManager example to learn how to place orders for an instrument different from your main data series symbol.
For more information on MultiCharts .Net programming please refer to our MultiCharts .Net programming guide


Return to “MultiCharts .NET”