Missing commands I guess
Missing commands I guess
06 Apr 2021, 22:46
double OpenPrice = MarketSeries.Open.Last(BarsAgo);
double ClosePrice = MarketSeries.Close.Last(BarsAgo);
double HighPrice = MarketSeries.High.Last(BarsAgo);
double LowPrice = MarketSeries.Low.Last(BarsAgo);
So there is obviously these commands. But I need this data for 1min/4min/15min/1hr candles all in the same code. Is there a way to make them time specific. So like a command that would read me previous hour/15min/4min/1min candle high/low/open/close all in one cAlgo bot.
Replies
animate44x
07 Apr 2021, 11:00
RE:
amusleh said:
Hi,
Not sure what do you mean by command, but you can access other time frames data from current or other symbols, here is a sample:
Once you got the bars then you can access the open/high/clow/close prices.
Thank you, that is what I was looking for. Could not find how to specify timeframe with the bars syntax.
@animate44x
amusleh
07 Apr 2021, 11:10
RE: RE:
animate44x said:
amusleh said:
Hi,
Not sure what do you mean by command, but you can access other time frames data from current or other symbols, here is a sample:
Once you got the bars then you can access the open/high/clow/close prices.
Thank you, that is what I was looking for. Could not find how to specify timeframe with the bars syntax.
The first parameter of MarketData.GetBars method is time frame, its in the sample if you check the code.
@amusleh
amusleh
07 Apr 2021, 09:25
Hi,
Not sure what do you mean by command, but you can access other time frames data from current or other symbols, here is a sample:
Once you got the bars then you can access the open/high/clow/close prices.
@amusleh