Hi all,

I am starting to test my strategy with Binance paper trading and after deploying my algo I am facing some issues related with initial cash / holdings mainly. I have read a lot of threads about this topic but honestly I didn't find a solution for the issue. Two main questions:

1/ I have set up my strategy to run with USDT as account currency (self.SetAccountCurrency("USDT")) and I am trying to override without success the initial cash with the following sentences in the Initialize method:

        self.SetAccountCurrency("USDT")
        #Option 1
        self.SetCash("USDT", 1000)  # Set Strategy Cash
        self.SetCash("BTC", 0)  # Set Initial BTC holding
        #Option 2
        self.Portfolio.SetCash("USDT", 1000, 0)  # Set Strategy Cash
        self.Portfolio.SetCash("BTC", 0, 0)  # Set Initial BTC holding

I know first option only work with backtesting but second one doesn't work either. After deploying the algo I always found the following cash values in my "Algorithm Holdings":

185004_1646219292.jpg

As you can see, not only USDT (account currency) has been initialized with a initial position but other coins (BTC, XRP, LTC,…) have also an initial position. Is there any chance to override these initial values to 0? I don't want to have any initial position except my initial “cash” in base currency (USDT).

The rational behind is that my algo include some controls to identify whether I have position in some coins and this predefined situation break my algo definitely.

2/ once I have modified the code to test it in paper trading, I am facing some errors with backtesting. When I perform a market order I always specify the ticket (BTCUSD before and BTCUSDT now) and the BTC quantity to buy or sell. Now, after these changes, I get an error that says: “OrderID: 1 Warning - Code: NotSupported - The minimum order size (in quote currency) for BTCUSDT is 10. Order quantity was 0.00014.” 

It seems the system is now understanding that the quantity I am specifiying is the quantity of USDT to spend instead of the quantity of BTC to buy/sell. From my humble opinion, It`s quite strange this change behavior after modifying only the account currency. Do you have any explanation for this?

Thank you in advance for you help and support

Best,

Jesus

Author