Fixed float regex to include negative

This commit is contained in:
MoonGem
2018-03-26 23:28:31 -05:00
committed by GitHub
parent 42dc90ed1d
commit f011ac19ab

View File

@@ -63,7 +63,7 @@ while True:
adx = re.search(r'ADX Value(.*)XXX', string) adx = re.search(r'ADX Value(.*)XXX', string)
rsi = re.search(r'RSI Value(.*)XXX', string) rsi = re.search(r'RSI Value(.*)XXX', string)
tot = re.search(r'TOTAL (.*)', string).group(1) tot = re.search(r'TOTAL (.*)', string).group(1)
total = re.search(r'[-+]?([0-9]*\.[0-9]+|[0-9]+)', tot).group(1) total = float(tot)
if total and (float(total) > float(current)): if total and (float(total) > float(current)):
current = total current = total
print('total better profit paremeters: ') print('total better profit paremeters: ')