Access to Close bar of another instrument

Questions about MultiCharts .NET and user contributed studies.
arnaudforex
Posts: 3
Joined: 29 Nov 2012

Access to Close bar of another instrument

Postby arnaudforex » 29 Nov 2012

Hello,

I have trouble to access to the close[1] of a instrument that i want to choose in parameter.

Let say, I put "EUR/AUD" when i launch the strategy on a EUR/USD graph. My strategy need to get the close of EUR/AUD even if it is on EUR/USD.

How to do it?

Thanks a lot!!

Arnaud

arnaudforex
Posts: 3
Joined: 29 Nov 2012

Re: Access to Close bar of another instrument

Postby arnaudforex » 29 Nov 2012

No ideas about it?

I know Bar.close[] but i would like to remplace "bar" but something which corresponds to another instrument. All methods are welcome! I really need to go on ...

Regards,

Arnaud

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

Re: Access to Close bar of another instrument

Postby Henry MultiСharts » 29 Nov 2012

Hello arnaudforex,

If you want to transfer instrument through a parameter you can use the iDataLoader interface.
iDataLoader interface example.

You can also get access to the data of the certain dataseries you have plotted on the chart using BarsOfData(x). With IInstrument you can get all of the information regarding this data series.

arnaudforex
Posts: 3
Joined: 29 Nov 2012

Re: Access to Close bar of another instrument

Postby arnaudforex » 29 Nov 2012

Thanks for your reply.

I tried with iDataLoader and succeed to get information from another instrument than the one on the graph where the signal was put. But i didnt succeed to get the price (close high,...).

I mean, i can have

si2.symbol.PriceScale or whatever but not something like:

si2.symbol.Close[1]

What is the way to get it?

Thanks a lot,

Arnaud

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

Re: Access to Close bar of another instrument

Postby Henry MultiСharts » 29 Nov 2012

You need to use IDataLoaderResult Members


Return to “MultiCharts .NET”