Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ermodo committed Apr 20, 2021
1 parent 3e55061 commit 318967c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions backend/src/agent/brains/szenario.brain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ export class SzenarioBrain extends Brain {
const volume = datapoint.volume;
console.log(currentMarket, target);

const matchingVolume = Math.floor(0.4 * volume);
const limitSellVolume = Math.floor(0.1 * volume);
const limitBuyVolume = Math.floor(0.1 * volume);
const matchingVolume = Math.floor(0.5 * volume);
// const limitSellVolume = Math.floor(0.1 * volume);
// const limitBuyVolume = Math.floor(0.1 * volume);

this.marketService.placeOrder({
stockCount: matchingVolume,
Expand All @@ -110,25 +110,25 @@ export class SzenarioBrain extends Brain {
token: this.token,
});

for (let i = 0; i < 10; i++) {
this.marketService.placeOrder({
stockCount: Math.max(1, limitBuyVolume / 10),
aktenId: this.stock,
operation: OperationType.BUY,
price: target - Math.random(),
token: this.token,
});
}

for (let i = 0; i < 10; i++) {
this.marketService.placeOrder({
stockCount: Math.max(1, limitSellVolume / 10),
aktenId: this.stock,
operation: OperationType.SELL,
price: target + Math.random(),
token: this.token,
});
}
// for (let i = 0; i < 10; i++) {
// this.marketService.placeOrder({
// stockCount: Math.max(1, limitBuyVolume / 10),
// aktenId: this.stock,
// operation: OperationType.BUY,
// price: target - Math.random(),
// token: this.token,
// });
// }

// for (let i = 0; i < 10; i++) {
// this.marketService.placeOrder({
// stockCount: Math.max(1, limitSellVolume / 10),
// aktenId: this.stock,
// operation: OperationType.SELL,
// price: target + Math.random(),
// token: this.token,
// });
// }
});
}

Expand Down

0 comments on commit 318967c

Please sign in to comment.