need help to fix error in my coding, only 4 same errors, but seems like there is no solution for it, help me
need help to fix error in my coding, only 4 same errors, but seems like there is no solution for it, help me
11 Nov 2023, 19:25
this is the part where it has error and i cant manage to fix it
protected override void OnStart()
{
dailyStoch = Indicators.StochasticOscillator(MarketData.GetSymbol("XAUUSD"), TimeFrame.Daily, 7, 14, 5);
fourHourStoch = Indicators.StochasticOscillator(MarketData.GetSymbol("XAUUSD"), TimeFrame.Hour4, 7, 14, 5);
oneHourStoch = Indicators.StochasticOscillator(MarketData.GetSymbol("XAUUSD"), TimeFrame.Hour, 7, 14, 5);
fifteenMinuteStoch = Indicators.StochasticOscillator(MarketData.GetSymbol("XAUUSD"), TimeFrame.Minute15, 7, 7, 5);
it stated that XAUUSD is not in context.
PanagiotisCharalampous
12 Nov 2023, 06:25
Hi there,
You need to pass bars to the indicator constructor, not a symbol. Check GetBars method.
Best regards,
Panagiotis
@PanagiotisCharalampous