Centralize algorithm imports
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
|
||||
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
|
||||
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -11,18 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from clr import AddReference
|
||||
AddReference("System")
|
||||
AddReference("QuantConnect.Algorithm")
|
||||
AddReference("QuantConnect.Common")
|
||||
|
||||
from System import *
|
||||
from QuantConnect import *
|
||||
from QuantConnect.Algorithm import *
|
||||
from QuantConnect.Brokerages import *
|
||||
from QuantConnect.Data import *
|
||||
from QuantConnect.Data.Market import *
|
||||
from QuantConnect.Orders import *
|
||||
from AlgorithmImports import *
|
||||
|
||||
### <summary>
|
||||
### Demonstration of payments for cash dividends in backtesting. When data normalization mode is set
|
||||
@@ -70,4 +59,4 @@ class DividendAlgorithm(QCAlgorithm):
|
||||
def OnOrderEvent(self, orderEvent):
|
||||
# orders get adjusted based on split events to maintain order value
|
||||
order = self.Transactions.GetOrderById(orderEvent.OrderId)
|
||||
self.Log(f"{self.Time} >> ORDER >> {order}")
|
||||
self.Log(f"{self.Time} >> ORDER >> {order}")
|
||||
|
||||
Reference in New Issue
Block a user