2025-04-17 07:39:32 +01:00
{
2025-09-14 14:21:25 +02:00
"train" : true ,
2025-04-17 14:21:17 +01:00
"venue" : "mt5" ,
2025-04-17 07:39:32 +01:00
"mt5_account_id" : "<mt5-account-id>" ,
"mt5_password" : "<mt5-password>" ,
"mt5_server" : "<mt5-server>" ,
"telegram_bot_token" : "<token>" ,
"telegram_chat_id" : "<chat-id-to-publish-messages>" ,
"data_folder" : "C:/DATA_ITB" ,
"symbol" : "BTCUSD" ,
"description" : "BTCUSD 1h" ,
"freq" : "1h" , // pandas frequency
2025-07-28 19:31:15 +02:00
"label_horizon" : 24 , // Batch/offline: do not use these last rows because their labels might not be correct
2025-10-28 12:09:10 +01:00
"features_horizon" : 672 , // Online/stream: Minimum data length for computing features (lookback). Take it from feature generator parameters
2025-07-28 19:31:15 +02:00
"train_length" : 0 , // Batch/offline: Uses this number of rows for training (if not additionally limited by the algorithm)
"predict_length" : 168 , // These records must be kept up-to-date (in contrast to those in feature horizon)
"append_overlap_records" : 5 , // Online/stream: These records will be requested and then re-computed on each iteration
// === DOWNLOAD AND MERGE ===
2025-04-17 07:39:32 +01:00
"data_sources" : [
2025-04-17 13:07:32 +01:00
{ "folder" : "BTCUSD" , "file" : "klines" , "column_prefix" : "" } ,
2025-04-17 20:32:52 +01:00
{ "folder" : "BTCUSD" , "file" : "ticks" , "column_prefix" : "" , "chunk_size" : 10 } , // you can also specify the chunk size, tick data not working yet, maybe it has something to do with the CHUNK SIZE
{ "folder" : "EURUSD" , "file" : "klines" , "column_prefix" : "" } ,
{ "folder" : "GBPUSD" , "file" : "klines" , "column_prefix" : "" }
2025-04-17 07:39:32 +01:00
] ,
// === GENERATE FEATURES ===
"feature_sets" : [
2025-05-12 19:52:47 +02:00
{ "column_prefix" : "" , "generator" : "talib" , "feature_prefix" : "" , "config" : { "columns" : [ "close" ] , "functions" : [ "SMA" ] , "windows" : [ 1 , 3 , 6 , 12 , 24 , 168 , 672 ] } } ,
{ "column_prefix" : "" , "generator" : "talib" , "feature_prefix" : "" , "config" : { "columns" : [ "close" ] , "functions" : [ "LINEARREG_SLOPE" ] , "windows" : [ 3 , 6 , 12 , 24 , 168 , 672 ] } } ,
{ "column_prefix" : "" , "generator" : "talib" , "feature_prefix" : "" , "config" : { "columns" : [ "close" ] , "functions" : [ "STDDEV" ] , "windows" : [ 3 , 6 , 12 , 24 , 168 , 672 ] } }
2025-04-17 07:39:32 +01:00
] ,
// === LABELS ===
"label_sets" : [
{ "column_prefix" : "" , "generator" : "highlow2" , "feature_prefix" : "" , "config" : { "columns" : [ "close" , "high" , "low" ] , "function" : "high" , "thresholds" : [ 3.0 ] , "tolerance" : 0.2 , "horizon" : 24 , "names" : [ "high_30" ] } } ,
{ "column_prefix" : "" , "generator" : "highlow2" , "feature_prefix" : "" , "config" : { "columns" : [ "close" , "high" , "low" ] , "function" : "low" , "thresholds" : [ 3.0 ] , "tolerance" : 0.2 , "horizon" : 24 , "names" : [ "low_30" ] } }
] ,
// === TRAIN ===
"train_features" : [
"close_SMA_1" , "close_SMA_3" , "close_SMA_6" , "close_SMA_12" , "close_SMA_24" , "close_SMA_168" ,
"close_LINEARREG_SLOPE_3" , "close_LINEARREG_SLOPE_6" , "close_LINEARREG_SLOPE_12" , "close_LINEARREG_SLOPE_24" , "close_LINEARREG_SLOPE_168" ,
"close_STDDEV_3" , "close_STDDEV_6" , "close_STDDEV_12" , "close_STDDEV_24" , "close_STDDEV_168"
] ,
"labels" : [ "high_30" , "low_30" ] ,
"train_feature_sets" : [
{
"generator" : "train_features" , "config" : {
// Use values from the attributes: train_features, labels, algorithms
} }
] ,
"algorithms" : [
{
"name" : "svc" ,
"algo" : "svc" ,
"params" : { "is_scale" : true , "length" : 26280 } , // 3 years 26280 hours, 5 years 43800 hours
"train" : { "C" : 1.0 }
}
] ,
// === GENERATE SIGNALS ===
"signal_sets" : [
{
// Combine two unsigned scores into one signed score
"generator" : "combine" , "config" : {
"columns" : [ "high_30_svc" , "low_30_svc" ] , // 2 columns: with grow score and fall score
"names" : "trade_score" , // Output column name: positive values - buy, negative values - sell
"combine" : "difference" , // "no_combine" (or empty), "relative", "difference"
"coefficient" : 1.0 , "constant" : 0.0 // Normalize
} } ,
{
// Generate boolean buy-sell column depending on thresholds
"generator" : "threshold_rule" , "config" : {
"columns" : "trade_score" ,
"names" : [ "buy_signal_column" , "sell_signal_column" ] , // Output boolean columns
"parameters" : {
2025-05-12 19:52:47 +02:00
"buy_signal_threshold" : 0.08 ,
"sell_signal_threshold" : -0.08
2025-04-17 07:39:32 +01:00
}
} }
] ,
// === OUTPUTS ===
"output_sets" : [
{ "generator" : "score_notification_model" , "config" : {
"score_notification" : true ,
"score_column_names" : [ "trade_score" ] ,
"notify_band_up" : true ,
"notify_band_dn" : true ,
"positive_bands" : [
2025-05-12 19:52:47 +02:00
{ "edge" : 0.08 , "frequency" : null , "sign" : "〉〉〉📈" , "bold" : true , "text" : "BUY ZONE" } ,
{ "edge" : 0.04 , "frequency" : null , "sign" : "〉〉" , "bold" : false , "text" : "strong" } ,
{ "edge" : 0.02 , "frequency" : null , "sign" : "〉" , "text" : "weak" }
2025-04-17 07:39:32 +01:00
] ,
"negative_bands" : [
2025-05-12 19:52:47 +02:00
{ "edge" : -0.02 , "frequency" : null , "sign" : "〈" , "text" : "weak" } ,
{ "edge" : -0.04 , "frequency" : null , "sign" : "〈〈" , "bold" : false , "text" : "strong" } ,
{ "edge" : -0.08 , "frequency" : null , "sign" : "〈〈〈📉" , "bold" : true , "text" : "SELL ZONE" }
2025-04-17 07:39:32 +01:00
]
} } ,
{ "generator" : "diagram_notification_model" , "config" : {
// Regularly sending historic data with prices, scores and buy-sell trade decisions
"diagram_notification" : true ,
"notification_freq" : "1D" ,
"score_column_names" : "trade_score" ,
2025-05-12 19:52:47 +02:00
"score_thresholds" : [ -0.08 , 0.08 ] ,
2025-04-17 07:39:32 +01:00
// 5 minutes aggregation and this number of 5 minute intervals
"resampling_freq" : "1h" , "nrows" : 168
} } ,
{ "generator" : "trader_simulation" , "config" : {
"buy_signal_column" : "buy_signal_column" ,
"sell_signal_column" : "sell_signal_column"
} }
] ,
// === FINDING BEST TRADE PARAMETERS ===
2025-05-12 19:52:47 +02:00
"simulate_model" : {
2025-04-17 07:39:32 +01:00
"data_start" : 0 ,
"data_end" : null ,
"direction" : "long" ,
"topn_to_store" : 10 ,
"signal_generator" : "threshold_rule" , // generator in the signal_sets section
"buy_sell_equal" : false ,
"grid" : {
2025-05-12 19:52:47 +02:00
"buy_signal_threshold" : [ 0.01 , 0.02 , 0.03 , 0.04 , 0.05 , 0.06 , 0.07 , 0.08 , 0.09 , 0.10 ] ,
"sell_signal_threshold" : [ -0.01 , -0.02 , -0.03 , -0.04 , -0.05 , -0.06 , -0.07 , -0.08 , -0.09 , -0.10 ]
2025-04-17 07:39:32 +01:00
}
} ,
"rolling_predict" : {
// int, null or string with date which will be resolved using time_column and removed from source data
"data_start" : "2020-02-01 00:00:00" ,
"data_end" : null ,
// One of these 3 parameters can be null and will be computed from the other two
"prediction_start" : null , // First row for starting predictions, for example, "2022-02-01 00:00:00"
"prediction_size" : 10080 , // How many predictions, for example, 1 week 7*1440
"prediction_steps" : 4 , // How many train-prediction steps
"use_multiprocessing" : false ,
"max_workers" : 8
}
}