Added status and PnL
All checks were successful
Build and Push Docker Image / build-and-push (release) Successful in 1m13s
All checks were successful
Build and Push Docker Image / build-and-push (release) Successful in 1m13s
This commit is contained in:
@ -126,6 +126,7 @@ class tradingData:
|
||||
tradingLogger.info(f"Placed oder on {self.pair} with TP {tp}; SL {sl}")
|
||||
else:
|
||||
generalLogger.warning(f"Failed to place order on {self.pair}; qty is too small!")
|
||||
tradingLogger.warning(f"Failed to place order on {self.pair}; qty is too small!")
|
||||
return orderID
|
||||
|
||||
|
||||
@ -233,8 +234,9 @@ async def strategy(pair: str, params):
|
||||
priceDecimals = int(infoContents.get('priceScale'))
|
||||
|
||||
|
||||
# Levels have 3 IDs for both long and short position. The 1 is main order (market opening), 2 is SL and 3 is TP.
|
||||
levelsRaw = await arbus.getLevels(levelsAmount, highEnd, lowEnd, priceDecimals)
|
||||
# Levels have 3 IDs for both long and short position
|
||||
# The first is main order (market opening), second is SL and third is TP
|
||||
levelsRaw = arbus.getLevels(levelsAmount, highEnd, lowEnd, priceDecimals)
|
||||
levels = []
|
||||
for i in range(levelsAmount):
|
||||
levels.append({'price':levelsRaw[i], 'long':False, 'longIDs':['-1', '-1', '-1'], 'short':False, 'shortIDs':['-1', '-1', '-1']})
|
||||
@ -277,7 +279,7 @@ async def strategy(pair: str, params):
|
||||
while t:
|
||||
t = await jsonProcessing.checkPair(pair)
|
||||
if t != 1:
|
||||
generalLogger.info("Closing websockets for {pair}")
|
||||
generalLogger.info(f"Closing websockets for {pair}")
|
||||
ws.exit()
|
||||
wsPrivate.exit()
|
||||
break
|
||||
@ -285,4 +287,5 @@ async def strategy(pair: str, params):
|
||||
i += 1
|
||||
|
||||
generalLogger.info(f"Ending strategy with {pair}; Ended on the iteration number {i}")
|
||||
tradingLogger.info(f"Ending strategy with {pair}")
|
||||
return i
|
||||
|
||||
Reference in New Issue
Block a user