删除xgboost
This commit is contained in:
@@ -10,12 +10,8 @@ from ChanZS import ChanZS
|
|||||||
from ChanBSP import ChanBSP
|
from ChanBSP import ChanBSP
|
||||||
import talib.abstract as ta
|
import talib.abstract as ta
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
from matplotlib.dates import DateFormatter, date2num
|
|
||||||
import matplotlib.patches as patches
|
|
||||||
from technical.util import resample_to_interval
|
from technical.util import resample_to_interval
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
import xgboost as xgb
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from ChanMACD import ChanMACD
|
from ChanMACD import ChanMACD
|
||||||
from TF_DF import TF_DF
|
from TF_DF import TF_DF
|
||||||
|
|||||||
@@ -123,13 +123,13 @@ class TF_DF():
|
|||||||
return klu_state_list
|
return klu_state_list
|
||||||
def check_fx(self, klc):
|
def check_fx(self, klc):
|
||||||
if klc.pre and klc.next:
|
if klc.pre and klc.next:
|
||||||
if klc.high > klc.pre.high and klc.high > klc.next.high and klc.low > klc.pre.low and klc.low > klc.next.low:
|
if klc.high > klc.pre.high and klc.high > klc.next.high and klc.low > klc.pre.low and klc.low > klc.next.low and klc.signal > 0:
|
||||||
#if (klc.close > klc.ema52 or klc.next.close > klc.next.ema52) and klc.macd > 0 and klc.macd > klc.macdhist:
|
#if (klc.close > klc.ema52 or klc.next.close > klc.next.ema52) and klc.macd > 0:
|
||||||
klc.set_fx(Chan_FX_TYPE.TOP)
|
klc.set_fx(Chan_FX_TYPE.TOP)
|
||||||
#print(klc.start_time, klc.end_time,klc.next.start_time, klc.next.end_time, klc.macd, klc.state, klc.fx, "TOP")
|
#print(klc.start_time, klc.end_time,klc.next.start_time, klc.next.end_time, klc.macd, klc.state, klc.fx, "TOP")
|
||||||
return Chan_FX_TYPE.TOP
|
return Chan_FX_TYPE.TOP
|
||||||
elif klc.low < klc.pre.low and klc.low < klc.next.low and klc.high < klc.pre.high and klc.high < klc.next.high:
|
elif klc.low < klc.pre.low and klc.low < klc.next.low and klc.high < klc.pre.high and klc.high < klc.next.high and klc.signal < 0:
|
||||||
#if (klc.close < klc.ema52 or klc.next.close < klc.next.ema52) and klc.macd < 0 and klc.macd < klc.macdhist:
|
#if (klc.close < klc.ema52 or klc.next.close < klc.next.ema52) and klc.macd < 0:
|
||||||
klc.set_fx(Chan_FX_TYPE.BOTTOM)
|
klc.set_fx(Chan_FX_TYPE.BOTTOM)
|
||||||
#print(klc.start_time, klc.end_time,klc.next.start_time, klc.next.end_time, klc.macd, klc.state, klc.fx, "BOTTOM")
|
#print(klc.start_time, klc.end_time,klc.next.start_time, klc.next.end_time, klc.macd, klc.state, klc.fx, "BOTTOM")
|
||||||
return Chan_FX_TYPE.BOTTOM
|
return Chan_FX_TYPE.BOTTOM
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ import requests
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import matplotlib
|
|
||||||
matplotlib.use('Agg') # 设置使用非GUI后端,必须在导入pyplot之前设置
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
import io
|
import io
|
||||||
import base64
|
import base64
|
||||||
import time
|
import time
|
||||||
|
|||||||
Reference in New Issue
Block a user