Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Issue with profit stop when buy_pct set to 99% #479

Closed
phongtt3 opened this issue Aug 17, 2017 · 3 comments
Closed

Issue with profit stop when buy_pct set to 99% #479

phongtt3 opened this issue Aug 17, 2017 · 3 comments

Comments

@phongtt3
Copy link

Pls see this log:

buy order completed at 2017-08-15 12:00:03:
3.39378150 ETH at 291.841 USD
total 990.446 USD
0.0450% slippage (orig. price 291.710 USD)
execution: a few seconds

2017-08-15 22:29:56 281.730 ETH-USD +1.7% 7992 -- 41 41 buying 3.39 ETH 9.55450 USD -3.5% +1.6%
buy order completed at 2017-08-15 22:30:01:
0.03357453 ETH at 281.857 USD
total 9.4632 USD
0.0450% slippage (orig. price 281.730 USD)
execution: a few seconds

2017-08-16 06:59:54 286.000 ETH-USD +0.0% 991 53 + 53 +1.5% 3.42 ETH 0.10001 USD -2.1% +1.6%
profit stop triggered at +2.0% trade worth

sell order completed at 2017-08-16 07:14:14:
3.38965878 ETH at 287.381 USD
total 974.122 USD
0.0450% slippage (orig. price 287.510 USD)
execution: a few seconds

The bot spend 99% of balance to buy at $291 and then sell at $287 with flag profit stop trigger :(

@Robbes
Copy link

Robbes commented Sep 4, 2017

was there a buy of the remaining 1% of your balance in between? I noticed/think the engine.js only looks at the last bought order's worth instead of the sum/discounted worth of possible two buy-trades:
s.last_trade_worth = last_trade.type === 'buy' ? (s.period.close - last_trade.price) / last_trade.price : (last_trade.price - s.period.close) / last_trade.price

@DeviaVir
Copy link
Owner

Is this still an issue on the latest unstable?

@stale
Copy link

stale bot commented Oct 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants