iilunin / crypto-bot

Binance crypto bot which supports smart entry, trailing stop-losses and take profits, multiple exit targets, One-Cancels-the-Other functionality, UI Interface
Apache License 2.0
247 stars 51 forks source link

Threshold default value 0,4% (es_ES locale) #21

Closed oscar-ol closed 3 years ago

oscar-ol commented 3 years ago

Trade is not created if I use default value for threshold in Exit Targets -> Default Settings.

Default value 0.4% in spanish locale is converted to 0,4% and it is not valid.

"{\"status\": 100, \"msg\": \"could not convert string to float: '0,4'\"}"

Thank you.

iilunin commented 3 years ago

can you try using dot instead of coma? 0,4 -> 0.4? I'll fix this in the version.

oscar-ol commented 3 years ago

Yes, it works if I replace 0,4 to 0.4. I think you can remove toLocalString() in trade-details.ts this.threshold = 0.4.toLocaleString() + '%'; Thank you!

iilunin commented 3 years ago

Yeah, makes sense. thanks for spotting that.

On Fri, Apr 30, 2021 at 10:41 AM Oscar @.***> wrote:

Yes, it works if I replace 0,4 to 0.4. I think you can remove toLocalString() in trade-details.ts this.threshold = 0.4.toLocaleString() + '%'; Thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/iilunin/crypto-bot/issues/21#issuecomment-830253866, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYX77ZW6YS2AXH3GM5Y2BDTLLTTTANCNFSM434T7MJA .