I'm still trying to learn the QC api, but I get the same or very similar error codes no matter what I change. I'm mostly just trying to build an algo ‘from scratch’ that runs, as opposed to a viable/profitable algo. Thanks


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 'float'>) method. Please checkout the API documentation.
at OnData
marketOrderTicket = self.StopMarketOrder(self.btcbusd in main.py: line 23 (Open Stacktrace)

 

class RetrospectiveMagentaAlbatross(QCAlgorithm):

   def Initialize(self):
       self.SetStartDate(2017, 8, 24)  
       self.SetCash(100000)
       self.AddCrypto("BTCBUSD", Resolution.Minute, Market.Binance)
       self.SetBrokerageModel(BrokerageName.Binance, AccountType.Margin)
       
       self.rsi = self.RSI("BTCBUSD", 14, MovingAverageType.Simple)
       self.btcbusd = self.AddCrypto("BTCBUSD", Resolution.Minute, Market.Binance)
       


   def OnData(self, data):
       
       if not self.rsi is ready:
           return
       
       profitTargetPercent = 1.01
       stopLossPercent = 0.997
       
       
       if self.rsi.Current.Value > 72:
           self.SetHoldings(self.btcbusd, 0.1)
           
       
       marketOrderTicket = self.StopMarketOrder(self.btcbusd, -1.0, stopLossPercent)
       limitOrderTicket = self.LimitOrder(self.btcbusd, -1.0, profitTargetPercent)