vanduc1102 / etoro-helper

Chrome extension for etoro trader
10 stars 7 forks source link

Wrong spreadPercent calculation #2

Closed bacca87 closed 6 years ago

bacca87 commented 6 years ago

Hi, the spreadPercent calculation in your code is wrong. To get the right value you should divide by the sell price instead of the buy price.

Original code: let spreadPercent = (spreadPrice / buyPrice) * 100;

Fix: let spreadPercent = (spreadPrice / sellPrice) * 100;

vanduc1102 commented 6 years ago

Thank @bacca87 , i will fix it soon