Change code to test
This commit is contained in:
parent
aca9eff415
commit
b09edb9796
|
|
@ -6,6 +6,7 @@ use rust_decimal::prelude::ToPrimitive;
|
||||||
use rust_decimal::Decimal;
|
use rust_decimal::Decimal;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
|
use super::strategy_test;
|
||||||
use super::{
|
use super::{
|
||||||
exists_record, insert_one_record, try_join_all, try_select_record, AllData, ExchangeInfo,
|
exists_record, insert_one_record, try_join_all, try_select_record, AllData, ExchangeInfo,
|
||||||
FilteredData, FromRow, RealtimePriceData, TradeFee,
|
FilteredData, FromRow, RealtimePriceData, TradeFee,
|
||||||
|
|
@ -31,7 +32,7 @@ struct Record {
|
||||||
pub async fn execute_list_up_for_buy(
|
pub async fn execute_list_up_for_buy(
|
||||||
all_data: &AllData,
|
all_data: &AllData,
|
||||||
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||||
let mut task_vec = Vec::new();
|
// let mut task_vec = Vec::new();
|
||||||
// let all_data_c3 = all_data.clone();
|
// let all_data_c3 = all_data.clone();
|
||||||
let all_data_c4 = all_data.clone();
|
let all_data_c4 = all_data.clone();
|
||||||
// strategist_001(all_data).await?;
|
// strategist_001(all_data).await?;
|
||||||
|
|
@ -39,14 +40,15 @@ pub async fn execute_list_up_for_buy(
|
||||||
// task_vec.push(tokio::spawn(async move {
|
// task_vec.push(tokio::spawn(async move {
|
||||||
// crate::strategy_team::strategy_003::list_up_for_buy(all_data_c3).await;
|
// crate::strategy_team::strategy_003::list_up_for_buy(all_data_c3).await;
|
||||||
// }));
|
// }));
|
||||||
task_vec.push(tokio::spawn(async move {
|
// task_vec.push(tokio::spawn(async move {
|
||||||
crate::strategy_team::strategy_004::list_up_for_buy(all_data_c4).await;
|
// crate::strategy_team::strategy_004::list_up_for_buy(all_data_c4).await;
|
||||||
}));
|
// }));
|
||||||
// strategist_004(all_data).await?;
|
// strategist_004(all_data).await?;
|
||||||
// strategist_005(all_data).await?;
|
// strategist_005(all_data).await?;
|
||||||
// strategist_006(all_data).await?;
|
// strategist_006(all_data).await?;
|
||||||
|
crate::strategy_team::strategy_test::strategist_test(all_data_c4);
|
||||||
|
|
||||||
try_join_all(task_vec).await?;
|
// try_join_all(task_vec).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use super::{
|
||||||
|
|
||||||
|
|
||||||
pub async fn strategist_test(
|
pub async fn strategist_test(
|
||||||
alldata: &AllData,
|
alldata: AllData,
|
||||||
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||||
// print rt_price for debugging
|
// print rt_price for debugging
|
||||||
// let a = alldata.rt_price_30m_vec.iter().position(|a| a.0 == "BTCUSDT");
|
// let a = alldata.rt_price_30m_vec.iter().position(|a| a.0 == "BTCUSDT");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user