diff --git a/src/strategy_team/strategy_001.rs b/src/strategy_team/strategy_001.rs index 02a939c..be198e7 100644 --- a/src/strategy_team/strategy_001.rs +++ b/src/strategy_team/strategy_001.rs @@ -219,7 +219,7 @@ pub async fn list_up_for_sell( .iter() .position(|x| *x.0 == element.symbol); let supertrend_option_30m = - supertrend(&element.symbol, &all_data.rt_price_30m_vec, 20, 1.5, true).await; + supertrend(&element.symbol, &all_data.rt_price_30m_vec, 20, 2.0, true).await; if lot_step_size_option.is_some() && quote_commission_precision_option.is_some() @@ -253,6 +253,8 @@ pub async fn list_up_for_sell( ); let stoch_rsi_k = stoch_rsis[search_result.unwrap()].1.last().unwrap().k; let stoch_rsi_k_prev = stoch_rsis[search_result.unwrap()].1[stoch_rsis[search_result.unwrap()].1.len()-2].k; + let stoch_rsi_d = stoch_rsis[search_result.unwrap()].1.last().unwrap().d; + let stoch_rsi_d_prev = stoch_rsis[search_result.unwrap()].1[stoch_rsis[search_result.unwrap()].1.len()-2].d; if (element.is_long == 0 || element.is_long == 1) && !element.current_price.is_zero() { @@ -276,7 +278,7 @@ pub async fn list_up_for_sell( &trade_fee_vec, ) .await; - } else if element.pure_profit_percent > 3.0 { + } else if element.pure_profit_percent > 5.0 { limit_order_sell( &element, element.current_price, @@ -286,7 +288,18 @@ pub async fn list_up_for_sell( &trade_fee_vec, ) .await; - } else if stoch_rsi_k > 90.0 { + } else if stoch_rsi_k >= 95.0 { + limit_order_sell( + &element, + element.current_price, + base_qty_to_be_ordered, + &client, + &exchange_info_vec, + &trade_fee_vec, + ) + .await; + } else if stoch_rsi_k < stoch_rsi_d && + stoch_rsi_k_prev >= stoch_rsi_d_prev { limit_order_sell( &element, element.current_price,