Different data series
Created at 16 Oct 2014, 13:50
Different data series
16 Oct 2014, 13:50
Hello,
I would like to use 2 different dataseries in cBot.
I'll explain: I would like to calculate 2 different EMA of 2 different time frames of the same symbol. So, when the cBot starts on the 1H TimeFrame, I can log the a certain ema in 15min timeframe.
Who can help me with that?
Thanks!
Replies
TAlgo
16 Oct 2014, 14:14
RE:
Spotware said:
You can obtain market series for specific timeframe using MarketData.GetSeries method:
var marketSeries = MarketData.GetSeries(TimeFrame.Hour);Than you can create EMA over series from marketSeries:
var ems = Indicators.ExponentialMovingAverage(marketSeries.Close, 14);
Yeah, Got IT!
I was missing the ".Close" at the end of the statement.
Thank you!
@TAlgo
Spotware
16 Oct 2014, 14:10
You can obtain market series for specific timeframe using MarketData.GetSeries method:
Then you can create EMA over series from marketSeries:
@Spotware