Hi there,
I'm trading crypto with BTC pairs. So my accountCurrency is BTC. But in the live deploy and in the backtest my equity is rounded to 2 decimals. Is it possible to round it for example to 5 decimals or 7 decimals?
Thanks in advance!
David
QUANTCONNECT COMMUNITY
Hi there,
I'm trading crypto with BTC pairs. So my accountCurrency is BTC. But in the live deploy and in the backtest my equity is rounded to 2 decimals. Is it possible to round it for example to 5 decimals or 7 decimals?
Thanks in advance!
David
Yes, your implementation is correct. The self.Schedule.On
method is used to schedule a function to run at specific times. In your case, you are scheduling the reset_monthly_stop_out_tracker
method to run at the market open on the first trading day of each month. Here is the correct implementation in Python:
self.Schedule.On(self.DateRules.MonthStart("SPY"), self.TimeRules.AfterMarketOpen("SPY", 0), self.reset_monthly_stop_out_tracker)
In this code:
self.DateRules.MonthStart("SPY")
specifies that the event should happen on the first trading day of the month for the SPY.self.TimeRules.AfterMarketOpen("SPY", 0)
specifies that the event should happen right at the market open.self.reset_monthly_stop_out_tracker
is the method that will be called at the specified time.Remember to define the reset_monthly_stop_out_tracker
method in your algorithm.
Sources:
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.
Vronghel
Hi Derek,
1 satoshi is 0.00000001 BTC or 1 BTC is 100 000 000 satoshi.
Maybe round it to 1 satoshi if possible.
Thanks a lot.
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!