Skip to content

Commit b311b11

Browse files
committed
Now only waits 5 days before buying back
1 parent 943d20c commit b311b11

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.mtheory7</groupId>
77
<artifactId>wyatt</artifactId>
8-
<version>7.3.3</version>
8+
<version>7.4.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>wyatt</name>

src/main/java/com/mtheory7/wyatt/mind/Wyatt.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ public class Wyatt {
5454

5555
@Value("${initialInvestment}")
5656
private Double INITIAL_INVESTMENT;
57+
5758
@Value("${versionValue}")
5859
private String VERSION;
60+
5961
@Value("${developmentMode}")
6062
public void setDevelopmentMode(boolean mode) {
6163
DEVELOPMENT_MODE = mode;
@@ -361,7 +363,8 @@ public void predictAndTrade() {
361363
CalcUtils.roundTo((currentPrice - Double.valueOf(openOrder.getPrice())), 2);
362364
logger.trace(
363365
"Current buy back: " + currentMarginPercent + "% ($" + buyBackDifference + ")");
364-
if (currentMarginPercent > 10.0) {
366+
if (currentMarginPercent > 10.0
367+
|| (System.currentTimeMillis() - openOrder.getTime()) > 432000000) {
365368
logger.trace("Deciding to submit a market buy back at $" + currentPrice);
366369
if (!DEVELOPMENT_MODE) {
367370
executeMarketBuyBack();
-12 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)