use super::{
    dec, decimal_add, decimal_sub, ema, exists_record, insert_pre_suggested_coins,
    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, MacdData, ema_macd
};


pub async fn strategist_test(
    alldata: AllData,
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    // print rt_price for debugging
    // let a = alldata.rt_price_30m_vec.iter().position(|a| a.0 == "BTCUSDT");
    // println!("BTCUSDT: {:?}", alldata.rt_price_30m_vec[a.unwrap()].1.last().unwrap());

     // 1st filtering: lookup tables if the tradepair is already there
    let mut symbol_1 = FilteredDataValue::new();
    // let mut symbol_2 = FilteredData::new();
    // let mut symbol_3 = FilteredData::new();
    symbol_1.symbol = String::from("BTCUSDT");
    // symbol_2.symbol = String::from("XRPUSDT");
    // symbol_3.symbol = String::from("ETHUSDT");
    let mut test_symbols: Vec<FilteredDataValue> = Vec::new();
    test_symbols.push(symbol_1);
    // test_symbols.push(symbol_2);
    // test_symbols.push(symbol_3);

    let a = ema_macd(3, 7, 3, &alldata.rt_price_1d_vec, &test_symbols).await?;
    println!("{:?}", a);
    
    Ok(())
}
