lib/cryptum/option.rb in cryptum-0.0.306 vs lib/cryptum/option.rb in cryptum-0.0.307
- old
+ new
@@ -89,19 +89,39 @@
reason = :repo_root
end
option_choice.market_trend_reset = 60 if option_choice.market_trend_reset.to_i.zero?
unless option_choice.market_trend_reset.to_i >= 60 &&
- option_choice.market_trend_reset <= 86_400
+ option_choice.market_trend_reset <= 604_800
usage = true
reason = :market_trend_reset
end
case option_choice.market_trend_reset
+ when 604_800
+ option_choice.market_trend_reset_label = '1W'
when 86_400
- option_choice.market_trend_reset_label = 'D'
+ option_choice.market_trend_reset_label = '1D'
+ when 14_400
+ option_choice.market_trend_reset_label = '4h'
+ when 10_800
+ option_choice.market_trend_reset_label = '3h'
+ when 7_200
+ option_choice.market_trend_reset_label = '2h'
when 3_600
option_choice.market_trend_reset_label = '1h'
+ when 2_700
+ option_choice.market_trend_reset_label = '45m'
+ when 2_700
+ option_choice.market_trend_reset_label = '45m'
+ when 1_800
+ option_choice.market_trend_reset_label = '30m'
+ when 900
+ option_choice.market_trend_reset_label = '15m'
+ when 300
+ option_choice.market_trend_reset_label = '5m'
+ when 180
+ option_choice.market_trend_reset_label = '3m'
when 60
option_choice.market_trend_reset_label = '1m'
else
option_choice.market_trend_reset_label = option_choice.market_trend_reset
end