I Have a bot on the cloud that already worked live on the quantconnect site and placed already many trades. Without any errors ec.
So I tried to this on the local with Lean CLI but from te moment I run the bot live I get 2 errors.
Select a brokerage:
1) Paper Trading
2) Interactive Brokers
3) Tradier
4) OANDA
5) Bitfinex
6) Coinbase Pro
7) Binance
8) Zerodha
9) Bloomberg
10) Atreyu
11) Trading Technologies
Enter an option: 7
Create an API key by logging in and accessing the Binance API Management page
(https://www.binance.com/en/my/settings/api-management).
API key [1ieXMy57CDESqRfMF5loycbtXxr6q456WSVZPTG37iN23ZxRifPHhHclejTwP6HW]:
API secret [****************************************************************]:
Select a data feed:
1) Binance
2) IQFeed
Enter an option: 1
←[?1h←=←[?1h←=Microsoft (R) Build Engine version 16.10.1+2fd48ab73 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
Restored /LeanCLI/My First Project.csproj (in 101 ms).
/LeanCLI/Main.cs(202,14): error CS0246: The type or namespace name 'Cash' could not be found (are you
missing a using directive or an assembly reference?) [/LeanCLI/My First Project.csproj]
/LeanCLI/Main.cs(14,14): error CS0246: The type or namespace name 'Dictionary<,>' could not be found
(are you missing a using directive or an assembly reference?) [/LeanCLI/My First Project.csproj]
Build FAILED.
/LeanCLI/Main.cs(202,14): error CS0246: The type or namespace name 'Cash' could not be found (are you
missing a using directive or an assembly reference?) [/LeanCLI/My First Project.csproj]
/LeanCLI/Main.cs(14,14): error CS0246: The type or namespace name 'Dictionary<,>' could not be found (are you missing a
using directive or an assembly reference?) [/LeanCLI/My First Project.csproj]
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:03.66
Error: Something went wrong while running 'Projecten\My First Project' in the 'lean-cli' environment, the output is
stored in 'Projecten\My First Project\live\2021-07-29_10-43-50'
I Synchronized my local with the cloud project which has already working live on the cloud.
Could the problem be that not everything is synchronized good from the cloud?
Thanks in advance,
David
Jasper van Merle
Hi David,
When you run an algorithm in the cloud we automatically add a bunch of “using” statements to the top of your C# files. When you run locally you need to manually add those statements for all the types that your code uses. You can find the full list of using statements that are added in the cloud in the CLI's documentation.
Vronghel
Hi Jasper,
Many thanks!!
Greetings,
David
Vronghel
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!