Hey guys I'm trying to pass a custom selector so I can use the midpoint value of the candle to calculate the EMA indicator.  ((bar.Open + bar.Close) / 2.0)

I have tried both passing a Lambda and a custom function that takes one parameter (dataPoint), but nothing it keeps giving me errors. 

With custom function:

	# at Initialize:
	def Initialize(self)
        self.lambda_func = lambda x: (x.Open + x.Close) / 2.0
		self.ema= self.EMA('BTCUSD', 9, Resolution.Minute, selector=self.func)

    def func(self, dataPoint):
        midpoint = (dataPoint.Open + dataPoint.Close) / 2.0
        return midpoint

And lambda function:

	def Initialize(self)
        self.lambda_func = lambda x: (x.Open + x.Close) / 2.0
		self.ema= self.EMA('BTCUSD', 9, Resolution.Minute, selector=self.lambda_func)

I get the same error for both:

During the algorithm initialization, the following exception has occurred: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the 'int'>) method. Please checkout the API documentation.
  at Initialize
    self.ind2 = self.EMA('BTCUSD' in main.py: line 18
 No method matches given arguments for EMA: (<class 'str'>, <class 'int'>, <class 'int'>)