Hello,
My algorithm is returned this error, which I can not fix.
20241115 10:07:50.170 TRACE:: BrokerageMultiWebSocketSubscriptionManager.GetWebSocketForSymbol(): added symbol: BTCUSDT 18R to websocket: 65721624 - Count: 1
20241115 10:07:50.179 TRACE:: DataManager.AddSubscription(): Added BTCUSDT,#0,BTCUSDT,Minute,TradeBar,Trade,Adjusted,OpenInterest,Internal. Start: 11/15/2024 10:06:00 AM. End: 12/31/2050 5:00:00 AM
20241115 10:07:50.179 TRACE:: UniverseSelection.AddPendingInternalDataFeeds(): Adding internal benchmark data feed BTCUSDT,#0,BTCUSDT,Minute,TradeBar,Trade,Adjusted,OpenInterest,Internal
20241115 10:07:50.192 TRACE:: LiveTradingDataFeed.HandleUnsupportedConfigurationEvent(): detected unsupported configuration: BTCUSDT,#0,BTCUSDT,Minute,TradeBar,Trade,Adjusted,OpenInterest,Internal
20241115 10:07:50.193 TRACE:: DataManager.AddSubscription(): Added BTCUSDT,#0,BTCUSDT,Minute,TradeBar,Trade,Adjusted,OpenInterest,Internal. Start: 11/15/2024 10:07:49 AM. End: 12/31/2050 5:00:00 AM
20241115 10:07:50.196 TRACE:: DataManager.RemoveSubscription(): Removed BTCUSDT,#0,BTCUSDT,Minute,TradeBar,Trade,Adjusted,OpenInterest,Internal
20241115 10:07:50.485 TRACE:: Debug: binance account base currency: USD
20241115 10:07:50.485 TRACE:: Debug: Changing account currency from USD to USDT...
20241115 10:07:50.486 TRACE:: Debug: Accurate daily end-times now enabled by default. See more at https://qnt.co/3YHaWHL. To disable it and use legacy daily bars set self.settings.daily_precise_end_time = False.
20241115 10:07:50.486 TRACE:: Debug: Warning: binance Crypto TradeBar data not supported. Please consider reviewing the data providers selection.
20241115 10:08:48.541 TRACE:: Isolator.ExecuteWithTimeLimit(): Used: 24, Sample: 165, App: 1592, CurrentTimeStepElapsed: 00:00.000. CPU: 5%
My code is the follow:
def initialize(self):
self.set_start_date(2024, 1, 1) # Set Start Date
self.set_end_date(2024, 1, 15)
self.set_account_currency("USDT")
self.set_cash(1000)
self.rsi_hold_period = int(self.get_parameter("rsi_hold_period"))
self.top_profit_pct = float(self.get_parameter("top_profit_pct"))
# universe settings
self.universe_settings.asynchronous = True
self.universe_settings.resolution = Resolution.HOUR
self.universe_settings.minimum_time_in_universe = timedelta(days=360)
self.settings.minimum_order_margin_portfolio_percentage = self.order_size
self.settings.automatic_indicator_warm_up = True
self.set_brokerage_model(BrokerageName.BINANCE_FUTURES, AccountType.MARGIN)
self.add_universe(CryptoUniverse.binance(self._select_assets))
self.set_portfolio_construction(
AccumulativeInsightPortfolioConstructionModel(percent=self.order_size))
self.add_risk_management(
MaximumTopPercentPerSecurity(maximum_top_percent=self.top_profit_pct))
self.set_execution(ImmediateExecutionModel())
def _select_assets(self, data):
selected = sorted(
[x for x in data if x.volume_in_usd],
key=lambda x: x.volume_in_usd
)[-50:]
return [x.symbol for x in selected]
def on_securities_changed(self, changes: SecurityChanges) -> None:
# Create and register indicator for each security in the universe
security_by_symbol = {}
for security in changes.added_securities:
security_by_symbol[security.symbol] = security
# Create an indicator that automatically updates each month
security.indicator = self.rsi(security.symbol, self.lookback_months, MovingAverageType.SIMPLE,
Resolution.HOUR)
# security.indicator_mom = self.mom(security.symbol, period=20, resolution=Resolution.DAILY)
self._register_indicator(security)
self.securities_list.append(security)
def _register_indicator(self, security):
security.consolidator = TradeBarConsolidator(Resolution.DAILY)
self.subscription_manager.add_consolidator(security.symbol, security.consolidator)
security.indicator.updated += self.update_event_handler
What am I doing wrong that complains about TradeBar and does not sync with Binance? when I do the backtesting it works properly only happens in LiveMode
Mia Alissi
Sources: Time Period Consolidators - QuantConnect.com, Requesting Data - QuantConnect.com, Bybit Crypto Futures Regression Algorithm, Binance Crypto Price Data - QuantConnect.com, Futures Fast Trend Following, with Trend Strength
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Ruben Fanjul
from where are comming those logs
I am not using Resolution.Mininute anywhere
Ruben Fanjul
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!