lib/cryptum/bot_conf.rb in cryptum-0.0.365 vs lib/cryptum/bot_conf.rb in cryptum-0.0.366
- old
+ new
@@ -62,10 +62,11 @@
# BE EXTREMELY CAREFUL CHANGING THIS VALUE AS IT DICTATES
# THE TARGET PRICE AND SUBSEQUENT TIME IT TAKES FOR AN OPEN
# SELL ORDER TO BE TRIGGERED!!! SHOULD NEVER BE > 1
default_net_tpm = 1.0
+ conservative_tpm_hedge = 0.75
maker_rate = 0.4
taker_rate = 0.6
gross_tpm = bot_conf[:target_profit_margin_percent].to_f
@@ -119,15 +120,15 @@
when 60
# 1m Chart
ai_net_tpm = (((1 - (low_24h / high_24h)) * 100) / 24) * 0.017
end
+ ai_net_tpm *= conservative_tpm_hedge
default_net_tpm = ai_net_tpm if ai_net_tpm > default_net_tpm
- conservative_tpm_hedge = 0.75
min_gross_tpm = format(
'%0.2f',
- (maker_rate.to_f + taker_rate.to_f) + (default_net_tpm * conservative_tpm_hedge)
+ (maker_rate.to_f + taker_rate.to_f) + default_net_tpm
)
if min_gross_tpm != gross_tpm.to_s
bot_conf[:target_profit_margin_percent] = min_gross_tpm.to_f
Cryptum::BotConf.update(