Skip to content

Commit

Permalink
Now only waits 5 days before buying back
Browse files Browse the repository at this point in the history
  • Loading branch information
mtheory7 committed Mar 20, 2019
1 parent 943d20c commit b311b11
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.mtheory7</groupId>
<artifactId>wyatt</artifactId>
<version>7.3.3</version>
<version>7.4.0</version>
<packaging>jar</packaging>

<name>wyatt</name>
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/mtheory7/wyatt/mind/Wyatt.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ public class Wyatt {

@Value("${initialInvestment}")
private Double INITIAL_INVESTMENT;

@Value("${versionValue}")
private String VERSION;

@Value("${developmentMode}")
public void setDevelopmentMode(boolean mode) {
DEVELOPMENT_MODE = mode;
Expand Down Expand Up @@ -361,7 +363,8 @@ public void predictAndTrade() {
CalcUtils.roundTo((currentPrice - Double.valueOf(openOrder.getPrice())), 2);
logger.trace(
"Current buy back: " + currentMarginPercent + "% ($" + buyBackDifference + ")");
if (currentMarginPercent > 10.0) {
if (currentMarginPercent > 10.0
|| (System.currentTimeMillis() - openOrder.getTime()) > 432000000) {
logger.trace("Deciding to submit a market buy back at $" + currentPrice);
if (!DEVELOPMENT_MODE) {
executeMarketBuyBack();
Expand Down
Binary file modified src/main/resources/binance-api-client-1.0.0.jar
Binary file not shown.

0 comments on commit b311b11

Please sign in to comment.