Debug dema eample
This commit is contained in:
parent
249db79a3d
commit
44e495915e
|
|
@ -25,6 +25,7 @@ use crate::value_estimation_team::indicators::sma::{sma, sma_opclo, SmaData};
|
|||
use crate::value_estimation_team::indicators::stoch_rsi::{stoch_rsi, StochRsiData};
|
||||
use crate::value_estimation_team::indicators::supertrend::{supertrend, SupertrendData, SuperTrendArea, SuperTrendSignal};
|
||||
use crate::value_estimation_team::indicators::adx::{AdxData, adx};
|
||||
use crate::value_estimation_team::indicators::dema::{DemaData, dema};
|
||||
use futures::future::try_join_all;
|
||||
use reqwest::{Client, ClientBuilder};
|
||||
use rust_decimal::{prelude::FromPrimitive, prelude::ToPrimitive, Decimal, RoundingStrategy};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use super::{
|
|||
limit_order_sell, rsi, select_filled_buy_orders, stoch_rsi, supertrend, try_join_all, AllData,
|
||||
Arc, Client, ClientBuilder, Decimal, EmaData, ExchangeInfo, FilteredDataValue, Mutex,
|
||||
RealtimePriceData, RoundingStrategy, RsiData, StochRsiData, SupertrendData, TradeFee, update_record3, adx, AdxData, get_server_epoch, MacdData, ema_macd,
|
||||
BollingerBandData, ToPrimitive, duplicate_filter, HashMap, HashSet, remove_keys, SuperTrendArea, SuperTrendSignal, get_current_price
|
||||
BollingerBandData, ToPrimitive, duplicate_filter, HashMap, HashSet, remove_keys, SuperTrendArea, SuperTrendSignal, get_current_price, dema, DemaData
|
||||
};
|
||||
|
||||
// BUY conditions
|
||||
|
|
@ -24,6 +24,10 @@ pub async fn list_up_for_buy(
|
|||
filtered_data.insert(symbol.clone(), FilteredDataValue::new());
|
||||
}
|
||||
|
||||
// for debugging dema
|
||||
let dema_filtering = dema(9, &alldata.rt_price_1d_vec, &filtered_data).await?;
|
||||
println!("{:?}", dema_filtering.get("API3USDT"));
|
||||
|
||||
// 2nd filtering: 1d MACD (3, 7, 30) cross
|
||||
let mut keys_to_remove: HashSet<String> = HashSet::new();
|
||||
let macd_1d_map = ema_macd(3, 7, 30, &alldata.rt_price_1d_vec, &filtered_data).await?;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user