示例#1
0
    def is_trend_open_time(self):
        # "'this is used to jude the time used to open return bool'"
        # first base the sd,find is time to open band
        # is_band_open = bf.is_band_open_time(self._direction,self._lastprice,
        # 									self._now_middle_value,self._now_sd_val,self._param_open_edge1,self._param_open_edge2,
        # 									self._limit_sd,self._limit_sd_open_edge)
        # # return is_band_open
        # if is_band_open ==False:
        # 	return False

        is_diff_volume_open = bf.is_diff_volume_open_time(
            self._tmp_sum_diff_volume, self._diff_volume_array,
            self._limit_multiple, self._limit_large_period)

        # return is_diff_volume_open
        if is_diff_volume_open == False:
            return False

        # is_series_open = bf.is_lastprice_series_open_time(self._direction,self._series_lastprice,self._limit_series_lastprice)
        is_lastprice_open = bf.is_lastprice_open_time(self._direction,
                                                      self._lastprice,
                                                      self._lastprice_array,
                                                      self._limit_large_period)

        return is_lastprice_open
示例#2
0
	def is_trend_open_time(self):

		hour = self._time.split(':')[0]
		hour = int(hour)
		minute = self._time.split(':')[1]
		minute = int(minute)
		if hour ==9 and minute < 5:
			return False

		is_time_open = self.is_time_open_time()
		if is_time_open == False:
			return False

		is_band_open = self.is_band_open_time(self._direction,self._lastprice,
											self._now_middle_value_60,
											self._param_open_edge1,self._param_open_edge2)
		# return is_band_open
		if is_band_open ==False:
			return False

		is_diff_volume_open = bf.is_diff_volume_open_time(self._tmp_sum_diff_volume,self._diff_volume_array,
												self._limit_multiple,self._limit_large_period)

		# return is_diff_volume_open
		if is_diff_volume_open ==False:
			return False

		# is_series_open = bf.is_lastprice_series_open_time(self._direction,self._series_lastprice,self._limit_series_lastprice)
		is_lastprice_open = bf.is_lastprice_open_time(self._direction,self._lastprice,self._lastprice_array,self._limit_large_period)

		return is_lastprice_open