Add SetAccountCurrency() override (#7284)
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
* Add SetAccountCurrency overload - Add SetAccountCurrencyOverload to allow the user to set also account currency quantity - Add regression and unit tests to cover the changes * Add regression algos * Simplifiy SetAccountCurrency implementation * Minor changes * Minor changes
This commit is contained in:
committed by
GitHub
parent
1283f52de1
commit
b14bda2dc0
@@ -23,12 +23,15 @@ class BasicSetAccountCurrencyAlgorithm(QCAlgorithm):
|
||||
self.SetStartDate(2018, 4, 4) #Set Start Date
|
||||
self.SetEndDate(2018, 4, 4) #Set End Date
|
||||
self.SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash)
|
||||
self.SetAccountCurrencyAndAmount()
|
||||
|
||||
self._btcEur = self.AddCrypto("BTCEUR").Symbol
|
||||
|
||||
def SetAccountCurrencyAndAmount(self):
|
||||
# Before setting any cash or adding a Security call SetAccountCurrency
|
||||
self.SetAccountCurrency("EUR")
|
||||
self.SetCash(100000) #Set Strategy Cash
|
||||
|
||||
self._btcEur = self.AddCrypto("BTCEUR").Symbol
|
||||
|
||||
def OnData(self, data):
|
||||
'''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user