Jtc.Optimization.LeanOptimizer.Example/ParameterizedSharedAppDomainAlgorithm.py
def Initialize(self):
        '''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''

        self.SetStartDate(2013, 10, 8)   #Set Start Date
        self.SetEndDate(2013, 10, 10)    #Set End Date
        self.SetCash(100000)             #Set Strategy Cash
        # Find more symbols here: http://quantconnect.com/data
        self.AddEquity("SPY")

        self.instancedConfig = InstancedConfig(self);

        # Receive parameters from the Job
        ema_fast = self.instancedConfig.GetValue[int]("fast", 1)
        ema_slow = self.instancedConfig.GetValue[int]("slow", 1)
        self.take = self.instancedConfig.GetValue[float]("take", 0.01)

        # The values 100 and 200 are just default values that only used if the parameters do not exist
        fast_period = 100 if ema_fast is None else int(ema_fast)
        slow_period = 200 if ema_slow is None else int(ema_slow)

        self.fast = self.EMA("SPY", fast_period)
        self.slow = self.EMA("SPY", slow_period)
Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.
Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.
Initialise the data and resolution required as well as the cash and start - end dates for your algorithm . All algorithms must initialized .
def Initialize(self):
        self.SetStartDate(2013, 10, 8)   
        self.SetEndDate(2013, 10, 10)    
        self.SetCash(100000)             
        self.AddEquity("SPY")
        self.instancedConfig = InstancedConfig(self);
        ema_fast = self.instancedConfig.GetValue[int]("fast", 1)
        ema_slow = self.instancedConfig.GetValue[int]("slow", 1)
        self.take = self.instancedConfig.GetValue[float]("take", 0.01)
        fast_period = 100 if ema_fast is None else int(ema_fast)
        slow_period = 200 if ema_slow is None else int(ema_slow)
        self.fast = self.EMA("SPY", fast_period)
        self.slow = self.EMA("SPY", slow_period)
def Initialize ( self ) : self . SetStartDate ( 2013 , 10 , 8 ) self . SetEndDate ( 2013 , 10 , 10 ) self . SetCash ( 100000 ) self . AddEquity ( "SPY" ) self . instancedConfig = InstancedConfig ( self ) ; ema_fast = self . instancedConfig . GetValue [ int ] ( "fast" , 1 ) ema_slow = self . instancedConfig . GetValue [ int ] ( "slow" , 1 ) self . take = self . instancedConfig . GetValue [ float ] ( "take" , 0.01 ) fast_period = 100 if ema_fast is None else int ( ema_fast ) slow_period = 200 if ema_slow is None else int ( ema_slow ) self . fast = self . EMA ( "SPY" , fast_period ) self . slow = self . EMA ( "SPY" , slow_period )
Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm.
Initialise the data and resolution required as well as the cash and start - end dates for your algorithm .
'''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.''' #Set Start Date #Set End Date #Set Strategy Cash # Find more symbols here: http://quantconnect.com/data # Receive parameters from the Job # The values 100 and 200 are just default values that only used if the parameters do not exist
self