Beispiel #1
0
    def __init__(self):
        """
        All the fields in the constructor are required.  They are inputs into our real time trading environment.
        :return:
        """

        # This information is required and defines the data dimensions you will receive our real time
        # data provider. An example is provided, feel free to add or remove dimensions.  You can find more
        # dimensions in the RealTime and Company modules
        aDataDimensions = [
            Company.SYMBOL,
            RealTime.RT_LAST_TRADE,
            RealTime.RT_ASK,
            RealTime.RT_BID
        ]

        # This information is required. It defines how we configure a trading environment.  Please do not remove
        # any of these fields.  Adding fields will be accessible through self.oAlgoConf.
        oAlgorithmConf = {
            "name": "Algorithm Name",
            "start_bal": 0.0,
            "add_balance": 0.0,
            "max_positions": 0.0,
            "comission": 0.0
        }

        # Construct the parent
        Portfolio.__init__(self, oAlgorithmConf, aDataDimensions)
        del aDataDimensions, oAlgorithmConf