JulyIghor / QtBitcoinTrader

Secure multi crypto exchange trading client
https://sourceforge.net/projects/bitcointrader/
730 stars 374 forks source link

Rules have sometimes wrong data. #175

Closed gryffus closed 7 years ago

gryffus commented 8 years ago

Testing on BitMarket When the new value is rounded, the scripting engine still returns the old value.

For example:

When old AskPrice is 400.1234 and the new value is 400.555 trader.get("AskPrice") returns 400.1234 instead of 400.555.

JulyIghor commented 8 years ago

I can't reproduce bug, can you provide more info or exact steps how to reproduce it?

gryffus commented 8 years ago

With this simple script: trader.on("Time").changed() { trader.log("BidPrice: "+trader.get("BidPrice")); trader.log("AskPrice:"+trader.get("AskPrice")); }

I get this output: screenshot_20160402_223524

Price changed from 372.4361 to 372.436, but scripting engine still reports the old price. In fact, this can be exploited to get advantage over bots based on QtBitcoinTrader.