Safety Order estimations versus reality after Safety Order 1 fulfilled #206
Replies: 2 comments
-
The values used in the calculation for SO2 are based on the first entry in the safety-config. So if you repeat the calculation with an initial buy of 0.1 and a increment factor of 0.81, you will get the 8.14 value as the script calculated. What is confusing, is how the safety config to be used is determined. The relative profit relative to the SO is used, and not the total profit. So based on the total profit of -8.79 you are expecting that the second entry is used. While the script calculated as SO relative profit of 8.79 - 5.25 = 3.54 which is below the 7.13 configured as activation percentage. I would totally agree that this part is not that clear. However, I want to calculate the next Safety Order for every possible Safety Order, and therefor the percentages to be used need to relate to a Safety Order and not to the total (negative) profit. So in this case; adjust the numbers in your configuration so that they relate to Safety Order and not the total profit. |
Beta Was this translation helpful? Give feedback.
-
You are correct. When I repeat the calculation using the first entry in the safety-config settings, I get 8.14 for SO2. Since SO2 uses the first safety-config settings, what does SO1 use? Does it also use the first safety-config settings? Does SO3 use the second safety-config settings and so on?
The 3.54 you posted above... that is compared to the activation-percentage setting in the second entry in the safety-config? If my activation-percentage for the second entry was 3.0, my new_add_funds would be 8.14 when the profit is -8.79? (using the safety-config from the first entry in safety-config)
Thank you for filling in some holes here. I really want to use these settings, but right now I'm stuck with static 3C SO's... |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm trying to accurately calculate when to expect a Safety Order to be placed before I get into a deal. The formula for calculating SO 1 works just fine, but the same formula doesn't work for additional Safety Orders.
Safety Order 1 @ 1.5% - my logs report:
profit from -4.33% to -5.29% (trailing from -1.50%). Add Funds threshold from -3.81% to -4.59%
The Add Funds threshold is perfect using these formulas:
newaddfundspercentage = deal_db_data["next_so_percentage"] + initialbuy
The same formula doesn't work for Safety Order 2 @ 5.25% - my logs report:
profit from -0.00% to -8.79% (trailing from -5.25%). Add Funds threshold from -5.25% to -8.14%
I'm expecting 8.50%, but the script reports 8.14%.
My math:
Most of the variables in the formulas above are constants set by the configuration so there's only so many numbers that can change. The one value that changes is the current profit, but the logs show the profit value being used in the calculations. The only way I could get to 8.14 from 8.50 was to reduce the current profit by 0.39% from 8.79 to 8.4 (although I have no justification for the change - especially since this change isn't needed for Safety Order 1).
Here is my safety config for the bots:
safety-config = [{"activation-percentage": "2.5", "activation-so-count": "0", "initial-buy-percentage": "0.1", "buy-increment-factor": "0.81"}, {"activation-percentage": "7.13", "activation-so-count": "1", "initial-buy-percentage": "0.3", "buy-increment-factor": "0.91"}]
Does anyone see a problem with my settings or calculations? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions