INNER CODE UNIT · Python

_init_indicators

Erfaniaa/crypto-trading-strategy-backtester · backtester.py:156

	def _init_indicators(self):
		self.is_price_increasing = False
		self.is_price_decreasing = False
		self.last_is_price_increasing = False
		self.last_is_price_decreasing = False

		self.is_macd_increasing = False
		self.is_macd_decreasing = False
		self.last_is_macd_increasing = False
		self.last_is_macd_decreasing = False

		self.fast_ema = self.candles_list[self.timeframe][0].close
		self.slow_ema = self.candles_list[self.timeframe][0].close

		self.macd_fast_ema = self.candles_list[self.timeframe][0].close
		self.macd_slow_ema = self.candles_list[self.timeframe][0].close
		self.signal_line = 0
		self.macd_line = 0

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…