Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtheory7 committed Jul 20, 2018
1 parent 58bec12 commit 25fd3fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class Main {
private final static Logger logger = Logger.getLogger(Main.class);

public static void main(String[] args) {
logger.info("Starting WYATT (v5.0.5) ...");
logger.info("Starting WYATT (v5.0.6) ...");
if (args.length < 6) {
logger.error("Not enough arguments have been given");
System.exit(-1);
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/mind/Wyatt.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import static com.binance.api.client.domain.account.NewOrder.*;

public class Wyatt {
private final static boolean DEVELOPING = true;
private final static boolean DEVELOPING = false;
private final static Logger logger = Logger.getLogger(Wyatt.class);
private static CandlestickInterval[] intervalList = {
CandlestickInterval.ONE_MINUTE, CandlestickInterval.THREE_MINUTES,
Expand Down Expand Up @@ -138,6 +138,9 @@ public void gatherMindData() {
* perform a sell and a buy back to make an incremental amount of money.
*/
public void predictAndTrade() {
if (DEVELOPING) {

}
predictionEngine.executeThoughtProcess(mindData);
Double target = predictionEngine.targetPrice;
Double buyBack = Math.round(target * PredictionEngine.buyBackAfterThisPercentage * 100.0) / 100.0;
Expand Down Expand Up @@ -303,7 +306,7 @@ private void executeMarketBuyBack() {
String message = "Executing market buy back of " + BTCtoBuyFloored + " BTC @ $" + lastPrice;
logger.info(message);
sendTweet(message);
NewOrderResponse newOrderResponse = client.newOrder(marketBuy("BTCUSDT", BTCtoBuyFloored.toString()));
client.newOrder(marketBuy("BTCUSDT", BTCtoBuyFloored.toString()));
new CalcUtils().sleeper(15000);
}

Expand Down Expand Up @@ -341,6 +344,6 @@ private void sendTweet(String message) {
* Report that the system is in developer mode
*/
private void reportDevMode() {
logger.error("Wyatt is currently in development mode! Exit to perform trades");
logger.error("Wyatt is currently in development mode! Not performing trades or tweets");
}
}

0 comments on commit 25fd3fe

Please sign in to comment.