MarketSeries Ticks Timeframe

Created at 02 Apr 2016, 14:28
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
YI

yisrgg

Joined 02.04.2016

MarketSeries Ticks Timeframe
02 Apr 2016, 14:28


Hello, everyone. I have just started programming in cAlgo and C#. I have previosly programmed in MQL4, but I find cTrader much better. I have this two lines of code:

MarketSeries EURUSD = MarketData.GetSeries("EURUSD", TimeFrame.Minute);
MarketSeries USDCHF = MarketData.GetSeries("USDCHF", TimeFrame.Minute);

I would like to get the MarketSeries of the current chart timeframe, or at least I would like to get the "TimeFrame.t1", or ".t3". How could I do that?

Thank you very much in advance.


@yisrgg
Replies

Waxy
06 Apr 2016, 21:13

Hello fcomanjoncabeza

Even easier, just do:

var _CurrentTF = MarketSeries.TimeFrame;

 


@Waxy

yisrgg
07 Apr 2016, 10:32

RE:

Waxy said:

Hello fcomanjoncabeza

Even easier, just do:

var _CurrentTF = MarketSeries.TimeFrame;

 

Hello Waxy. Thank you ver much for your help. The problem with your answer is, that I can only use one symbol. The symbol of the chart. But I would like to use/write two symbols. That's why I use "MarketData.GetSeries". I can choose a Symbol for that MarketSeries, but I must also choose a timeframe, and the timeframes I am allowed to choose between do not include tick charts.

Do you understand what I mean?

Thank you very much for your help.


@yisrgg

Waxy
12 Apr 2016, 00:28

I'm sorry, but you asked for this:

I would like to get the MarketSeries of the current chart timeframe

Also about GetSeries, I think it's not possible to get timeframe tick data.


@Waxy

yisrgg
12 Apr 2016, 21:05

RE:

Waxy said:

I'm sorry, but you asked for this:

I would like to get the MarketSeries of the current chart timeframe

Also about GetSeries, I think it's not possible to get timeframe tick data.

Any idea how to get close and open prices from different pairs. I need to programm a multi-pair robot.

Thank you very much in advance.


@yisrgg

Waxy
14 Apr 2016, 19:52

As you said: 

MarketSeries EURUSD = MarketData.GetSeries("EURUSD", TimeFrame.Minute);

Then:

double _open = EURUS.Open.Last(_numberofbarsago);

 


@Waxy