Open victor-ono opened 5 years ago
I think I figured it out - when this algorithm runs on every trade, i.e. every time a trade happens, and not on a collection of trades it works as expected. However, there's still an error in the wiki in trds
description. In the last two rows BuyTS
values should be 1.25 and 1.75, not 1.75 and 2.75:
Can someone please explain what this piece of code from
safety.ts
does? I understand that its purpose is to balance buys and sells. However I don't understand the algorithm. I tested it with the example trades fromtrds
quoting parameter description in the wiki and got different results -Buy TS: 1.75, Sell TS: 0.75
instead ofBuy TS: 2.75, Sell TS: 0
:https://jsfiddle.net/victoro/bo9k7gqz/