Topics
Replies
defontein93
20 Sep 2020, 16:32
RE: RE:
firemyst said:
In your bot get the MACD based on the 1 hour time frame data instead of the 15 minute data.
Sample code off the top of my head:
var _macd = Indicators.MacdCrossOver(MarketData.GetBars(TimeFrame.Hour, Symbol.Name), MACDLongPeriod, MACDShortPeriod, MACDSignalPeriod);
You have to fill in the MACD Long/Short/Signal period variable values are per what you want them to be.
Good luck :-)
Dear firemyst,
Thank you for responding :-)
I have tried your suggestions and the following error codes show up :
Error CS1502: The best overloaded method match for 'cAlgo.API.Internals.IIndicatorsAccessor.MacdCrossOver(cAlgo.API.DataSeries, int, int, int)' has some invalid arguments
Error CS1503: Argument 1: cannot convert from 'cAlgo.API.Bars' to 'cAlgo.API.DataSeries'
Unlike EMA / RSI / ATR, it seems that for MacdCrossOver (the same goes for MacdHistogram), format DataSeries is needed, so it cannot be filled with MarketData.GetBars(TimeFrame.Hour) ?
Any ideas for a workaround or maybe other suggestions ?
@defontein93
defontein93
21 Sep 2020, 17:11
RE: RE: RE: RE:
firemyst said:
I think I got it. Thanks very much :-)
@defontein93