Skip to content

Commit

Permalink
Bug fixes: Mimic shorting now works
Browse files Browse the repository at this point in the history
Version update.

Changes to be committed:
	modified:   Base/Conditional.mimic
	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/MIMIC-PlaceOrder
	modified:   Extras/CodeProofs/BuyEveryMinute
  • Loading branch information
rapmd73 committed Mar 5, 2024
1 parent 13dd181 commit e6ea10b
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 868 deletions.
7 changes: 3 additions & 4 deletions Base/Conditional.mimic
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def main():
bal=relay.GetBalance(Base=base)

# if ticker is below price and spread, purge and re-purchase

"""
if abs(amount)>bal:
if "ConditionalRepurchase" in relay.Active:
relay.JRLog.Write(f"Original: {json.dumps(relay.Order)}",stdOut=False)
Expand Down Expand Up @@ -195,7 +195,7 @@ def main():
else:
relay.JRLog.Write(f"{id}: Amount {amount:.8f} > Balance {bal:.8f} {base}, purge",stdOut=False)
FinishOrphan(Orphan['Key'],Orphan['lID'],Orphan['mID'],'Delete')

"""
# Fsilsafe, in the WORST way possible. Do NOT leave a take profit out of the order. At this stage, the whole thing is
# an absolute nightmare to fix. The is a very brutal way of dealing with poor user choices.
if 'TakeProfit' not in relay.Order:
Expand Down Expand Up @@ -241,7 +241,7 @@ def main():
strikePrice=ticker['Ask']
StrikeHappened=True

if StrikeHappened==True:
if StrikeHappened==True and abs(amount)>bal:
# Build "strike" order. TakeProfit or StopLoss has been triggered
newOrder={}
newOrder['OliverTwist']='Conditional'
Expand Down Expand Up @@ -287,4 +287,3 @@ def main():

if __name__ == '__main__':
main()

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.700"
Version="0.0.0.1.720"
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 @@ -38,7 +38,7 @@ import subprocess
import JRRsupport
import JackrabbitRelay as JRR

Version="0.0.0.1.700"
Version="0.0.0.1.720"
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.700"
Version="0.0.0.1.720"
BaseDirectory='/home/JackrabbitRelay2/Base'
ConfigDirectory='/home/JackrabbitRelay2/Config'
LogDirectory="/home/JackrabbitRelay2/Logs"
Expand Down
Loading

0 comments on commit e6ea10b

Please sign in to comment.