From b311b115531ce2cc8eb8d0c1ccf2f0d2d150ba75 Mon Sep 17 00:00:00 2001 From: Michael Stuhlman Date: Tue, 19 Mar 2019 22:24:26 -0400 Subject: [PATCH] Now only waits 5 days before buying back --- pom.xml | 2 +- .../java/com/mtheory7/wyatt/mind/Wyatt.java | 5 ++++- .../resources/binance-api-client-1.0.0.jar | Bin 104900 -> 104888 bytes 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 71847c7..27a7520 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.mtheory7 wyatt - 7.3.3 + 7.4.0 jar wyatt diff --git a/src/main/java/com/mtheory7/wyatt/mind/Wyatt.java b/src/main/java/com/mtheory7/wyatt/mind/Wyatt.java index e56c1f0..954022a 100644 --- a/src/main/java/com/mtheory7/wyatt/mind/Wyatt.java +++ b/src/main/java/com/mtheory7/wyatt/mind/Wyatt.java @@ -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; @@ -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(); diff --git a/src/main/resources/binance-api-client-1.0.0.jar b/src/main/resources/binance-api-client-1.0.0.jar index 52ded1d5e29b4e5ccb6b06c60fee3ae880a261e8..932980d21862e7b938c2a30a91eeaa60ad6d9405 100644 GIT binary patch delta 5602 zcmZWtc|c9sAHV0lme=#z_tHjG)T^;qqeYum2?;ZKN@PSEX`@oKspzVc23f~1CG;qb zC^5>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