Skip to content

Commit

Permalink
increasing/decreasing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yasinkuyu committed Jan 19, 2018
1 parent d9cb325 commit 7b303d1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/Trading.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ def checkorder(self):
exit(1)

def action(self, symbol):


print ('increasing:%.8f' % (self.increasing))
print ('decreasing:%.8f' % (self.decreasing))
exit(1)
# Order amount
quantity = self.quantity

Expand All @@ -287,7 +290,7 @@ def action(self, symbol):

# Target sell price, decrease little
sellPrice = lastAsk - self.decreasing

# Spread ( profit )
profitableSellingPrice = self.calc(lastBid)

Expand Down Expand Up @@ -387,17 +390,14 @@ def validate(self):

# Format quantity
self.step_size = stepSize

self.increasing = tickSize
self.decreasing = tickSize


# If option increasing default tickSize greater than
if (float(self.option.increasing) > tickSize):
self.increasing = self.option.increasing
if (float(self.option.increasing) < tickSize):
self.increasing = tickSize

# If option decreasing default tickSize greater than
if (float(self.option.decreasing) > tickSize):
self.decreasing = self.option.decreasing
if (float(self.option.decreasing) < tickSize):
self.decreasing = tickSize

# Just for validation
price = lastPrice
Expand Down

0 comments on commit 7b303d1

Please sign in to comment.