I'm trying to make an algorithm using forex tradebars, but I keep getting an error. the curious thing is that when I use the exact same algorithm for equities, it works perfectly.

The line that causes the error is:


The error message is " Runtime Error: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the Add method. Please checkout the API documentation. "


I can't attach the backtest with the error, so I am attaching the backtest that works. I have commented out the adding of the forex symbol and replaced it with SPY.  But if you use the forex symbol you can reproduce the error.

self.aaa = self.AddSecurity(SecurityType.Equity, "SPY", Resolution.Minute)
#self.aaa = self.AddForex("EURUSD", Resolution.Minute)


Thank you in advance for the help.