isBoosted icon now works

This commit is contained in:
Nicolás Sánchez 2024-12-18 09:09:49 -03:00
parent b297ea0212
commit 1906ddec8f
3 changed files with 8 additions and 3 deletions

View File

@ -635,10 +635,10 @@ public class InstanceInterface {
workerStatsData.getQuoteSpent(), workerStatsData.getQuoteSpent(),
workerStatsData.getBaseBought(), workerStatsData.getBaseBought(),
workerStatsData.getIsShort(), workerStatsData.getIsShort(),
workerStatsData.getIsBoosted(),
workerStatsData.getAutoSwitchEnabled(),
//Let's deal with this later //Let's deal with this later
false, false,
false,
false,
workerStatsData.getStopWhenProfit(), workerStatsData.getStopWhenProfit(),
workerStatsData.getOldLongDictionary()); workerStatsData.getOldLongDictionary());
workerDataList.add(workerData); workerDataList.add(workerData);

View File

@ -66,6 +66,11 @@ public class WorkerCardAdapter{
nextSoPrice.setText(String.format(Locale.ROOT, "%.8f", worker.getNextSoPrice())); nextSoPrice.setText(String.format(Locale.ROOT, "%.8f", worker.getNextSoPrice()));
takeProfitPrice.setText(String.format(Locale.ROOT, "%.8f", worker.getTakeProfitPrice())); takeProfitPrice.setText(String.format(Locale.ROOT, "%.8f", worker.getTakeProfitPrice()));
double breakEven = worker.getTotalAmountOfQuote()/worker.getTotalAmountOfBase();
if (worker.getPrice() > breakEven) {
price.setTextColor(Color.parseColor("#00A000"));
}
double percentageToProfit = abs(worker.getTakeProfitPrice()- worker.getPrice())/worker.getPrice()*100; double percentageToProfit = abs(worker.getTakeProfitPrice()- worker.getPrice())/worker.getPrice()*100;
String percentageToDisplay = String.format(Locale.ROOT, "%.2f",percentageToProfit)+"%"; String percentageToDisplay = String.format(Locale.ROOT, "%.2f",percentageToProfit)+"%";
percentage.setText(percentageToDisplay); percentage.setText(percentageToDisplay);
@ -90,7 +95,6 @@ public class WorkerCardAdapter{
double progressBarPercentage = (worker.getPrice()-worker.getNextSoPrice())/(worker.getTakeProfitPrice()-worker.getNextSoPrice()); double progressBarPercentage = (worker.getPrice()-worker.getNextSoPrice())/(worker.getTakeProfitPrice()-worker.getNextSoPrice());
progressBar.setProgress((int) (progressBarPercentage * 100)); progressBar.setProgress((int) (progressBarPercentage * 100));
double breakEven = worker.getTotalAmountOfQuote()/worker.getTotalAmountOfBase();

View File

@ -17,6 +17,7 @@
<color name="orange">#FFA500</color> <color name="orange">#FFA500</color>
<color name="dark_cyan">#008B8B</color> <color name="dark_cyan">#008B8B</color>
<color name="dark_green">#006A00</color> <color name="dark_green">#006A00</color>
<color name="mid_green">#00A000</color>
<color name="secondary_text_color">#FF424242</color> <color name="secondary_text_color">#FF424242</color>
<color name="card_background_color">#FFF6F6F6</color> <color name="card_background_color">#FFF6F6F6</color>
<color name="paused_trader_background">#C5C281</color> <color name="paused_trader_background">#C5C281</color>