Better charts

This commit is contained in:
7u83
2017-01-23 18:56:09 +01:00
parent 2d4d0cf939
commit 3d5aa227d4
15 changed files with 973 additions and 180 deletions

View File

@ -167,12 +167,18 @@ public class RandomTrader extends AutoTrader {
double limit;
limit = lp + getRandomAmmount(lp, myconfig.buy_limit);
long volume = (long) (money / (limit * 1));
if (volume <= 0) {
return 0;
}
// double volume = (money / (limit * 1));
if (volume <= 0) {
return 0;
}
se.createOrder(account_id, type, volume, limit);
return getRandom(myconfig.buy_order_wait);
@ -186,7 +192,7 @@ public class RandomTrader extends AutoTrader {
OrderType type = OrderType.ASK;
// how much money we ant to envest?
double volume = (long) getRandomAmmount(ad.shares, myconfig.sell_volume);
double volume = (long)getRandomAmmount(ad.shares, myconfig.sell_volume);
// double lp = 100.0; //se.getBestLimit(type);
Quote q = se.getCurrentPrice();

View File

@ -36,13 +36,13 @@ import sesim.Exchange;
public class RandomTraderConfig extends AutoTraderConfig {
public float[] sell_volume = {100, 100};
public float[] sell_limit = {-1.5f, 1.5f};
public int[] sell_order_wait = {1000, 5000};
public float[] sell_limit = {-1f, 1.0101f};
public int[] sell_order_wait = {1000, 50000};
public int[] wait_after_sell = {10, 30};
public float[] buy_volume = {100, 100};
public float[] buy_limit = {-1.0f, 1.5f};
public int[] buy_order_wait = {1000, 5000};
public float[] buy_limit = {-1f, 1.0101f};
public int[] buy_order_wait = {1000, 50000};
public int[] wait_after_buy = {10, 30};
@Override