Skip to content

Commit

Permalink
This has been one of the more difficult bugs to track and trace. It is
Browse files Browse the repository at this point in the history
strictly related to Oanda and OliverTwist if tracking the presence of
existing orders. I think I finally killed it once and for all.

Version update.

Changes to be committed:
	modified:   Base/JackrabbitLocker
	modified:   Base/JackrabbitOliverTwist
	modified:   Base/JackrabbitRelay
	modified:   Base/Library/JRRmimic.py
	modified:   Base/Library/JackrabbitProxy.py
	modified:   Base/Library/JackrabbitRelay.py
	modified:   Base/Library/OliverTwist-oanda.py
  • Loading branch information
rapmd73 committed Nov 15, 2024
1 parent c9755da commit b6d28db
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Base/JackrabbitLocker
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import json

import JRRsupport

Version="0.0.0.1.1015"
Version="0.0.0.1.1020"
BaseDirectory='/home/JackrabbitRelay2/Base'
ConfigDirectory='/home/JackrabbitRelay2/Config'
LogDirectory="/home/JackrabbitRelay2/Logs"
Expand Down
2 changes: 1 addition & 1 deletion Base/JackrabbitOliverTwist
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import subprocess
import JRRsupport
import JackrabbitRelay as JRR

Version="0.0.0.1.1015"
Version="0.0.0.1.1020"
BaseDirectory='/home/JackrabbitRelay2/Base'
DataDirectory='/home/JackrabbitRelay2/Data'
ConfigDirectory='/home/JackrabbitRelay2/Config'
Expand Down
2 changes: 1 addition & 1 deletion Base/JackrabbitRelay
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import json

import JRRsupport

Version="0.0.0.1.1015"
Version="0.0.0.1.1020"
BaseDirectory='/home/JackrabbitRelay2/Base'
ConfigDirectory='/home/JackrabbitRelay2/Config'
LogDirectory="/home/JackrabbitRelay2/Logs"
Expand Down
2 changes: 1 addition & 1 deletion Base/Library/JRRmimic.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class mimic:
# released at exit.

def __init__(self,Exchange,Config,Active,DataDirectory=None):
self.Version="0.0.0.1.1015"
self.Version="0.0.0.1.1020"

self.StableCoinUSD=['USDT','USDC','BUSD','UST','DAI','FRAX','TUSD', \
'USDP','LUSD','USDN','HUSD','FEI','TRIBE','RSR','OUSD','XSGD', \
Expand Down
2 changes: 1 addition & 1 deletion Base/Library/JackrabbitProxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
class JackrabbitProxy:
def __init__(self,framework=None,payload=None,exchange=None,account=None,asset=None,Usage=None):
# All the default locations
self.Version="0.0.0.1.1015"
self.Version="0.0.0.1.1020"
self.BaseDirectory='/home/JackrabbitRelay2/Base'
self.ConfigDirectory='/home/JackrabbitRelay2/Config'
self.DataDirectory="/home/JackrabbitRelay2/Data"
Expand Down
2 changes: 1 addition & 1 deletion Base/Library/JackrabbitRelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def Success(self,f,s):
class JackrabbitRelay:
def __init__(self,framework=None,payload=None,exchange=None,account=None,asset=None,secondary=None,NoIdentityVerification=False,Usage=None,RaiseError=False):
# All the default locations
self.Version="0.0.0.1.1015"
self.Version="0.0.0.1.1020"
self.NOhtml='<html><title>NO!</title><body style="background-color:#ffff00;display:flex;weight:100vw;height:100vh;align-items:center;justify-content:center"><h1 style="color:#ff0000;font-weight:1000;font-size:10rem">NO!</h1></body></html>'
self.Directories={}
self.Directories['Base']='/home/JackrabbitRelay2/Base'
Expand Down
8 changes: 4 additions & 4 deletions Base/Library/OliverTwist-oanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ def CheckStopLoss(relay,Orphan,MarginStrike):
def OrderProcessor(osh):
StartTime=datetime.datetime.now()

# print("OP A")
# print("OP A:")

# Split off the parts we need.
idx=osh['IDX']
Expand All @@ -634,13 +634,12 @@ def OrderProcessor(osh):

# shLock.Lock()
try:
if not os.path.exists(idx):
return 'Waiting'

# print("OP B1")
OrphanList=ReadStorehouse(idx=idx)
if len(OrphanList)==0:
return 'Waiting'

# print("OP B2",len(OrphanList))
# Process conditional orders

# For long positions, highestTrade will be closest to take profit, lowest for stop loss
Expand All @@ -664,6 +663,7 @@ def OrderProcessor(osh):
# Take profit starts at the lowest order priced and works upward for long.

# Check take profit
# print("OP C")
# print("OP C1",highestTrade)
# print("OP C2",lowestTrade)
if lowestTrade['Order']['Direction'].lower()=='long':
Expand Down

0 comments on commit b6d28db

Please sign in to comment.