mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-06-06 05:51:19 +08:00
225 lines
4.4 KiB
Go
225 lines
4.4 KiB
Go
package agent
|
|
|
|
func manualStrategyEditableFieldKeys() []string {
|
|
return []string{
|
|
"name",
|
|
"description",
|
|
"is_public",
|
|
"config_visible",
|
|
"strategy_type",
|
|
"symbol",
|
|
"grid_count",
|
|
"total_investment",
|
|
"leverage",
|
|
"upper_price",
|
|
"lower_price",
|
|
"use_atr_bounds",
|
|
"atr_multiplier",
|
|
"distribution",
|
|
"enable_direction_adjust",
|
|
"direction_bias_ratio",
|
|
"max_drawdown_pct",
|
|
"stop_loss_pct",
|
|
"daily_loss_limit_pct",
|
|
"use_maker_only",
|
|
"source_type",
|
|
"static_coins",
|
|
"excluded_coins",
|
|
"use_ai500",
|
|
"ai500_limit",
|
|
"use_oi_top",
|
|
"oi_top_limit",
|
|
"use_oi_low",
|
|
"oi_low_limit",
|
|
"primary_timeframe",
|
|
"primary_count",
|
|
"selected_timeframes",
|
|
"enable_ema",
|
|
"enable_macd",
|
|
"enable_rsi",
|
|
"enable_atr",
|
|
"enable_boll",
|
|
"enable_volume",
|
|
"enable_oi",
|
|
"enable_funding_rate",
|
|
"ema_periods",
|
|
"rsi_periods",
|
|
"atr_periods",
|
|
"boll_periods",
|
|
"nofxos_api_key",
|
|
"enable_quant_data",
|
|
"enable_quant_oi",
|
|
"enable_quant_netflow",
|
|
"enable_oi_ranking",
|
|
"oi_ranking_duration",
|
|
"oi_ranking_limit",
|
|
"enable_netflow_ranking",
|
|
"netflow_ranking_duration",
|
|
"netflow_ranking_limit",
|
|
"enable_price_ranking",
|
|
"price_ranking_duration",
|
|
"price_ranking_limit",
|
|
"btceth_max_leverage",
|
|
"altcoin_max_leverage",
|
|
"min_risk_reward_ratio",
|
|
"min_confidence",
|
|
"role_definition",
|
|
"trading_frequency",
|
|
"entry_standards",
|
|
"decision_process",
|
|
"custom_prompt",
|
|
}
|
|
}
|
|
|
|
func manualStrategyEditableFieldKeysForType(strategyType string) []string {
|
|
common := []string{
|
|
"name",
|
|
"description",
|
|
"is_public",
|
|
"config_visible",
|
|
"strategy_type",
|
|
}
|
|
switch strategyType {
|
|
case "grid_trading":
|
|
return append(common,
|
|
"symbol",
|
|
"grid_count",
|
|
"total_investment",
|
|
"leverage",
|
|
"upper_price",
|
|
"lower_price",
|
|
"use_atr_bounds",
|
|
"atr_multiplier",
|
|
"distribution",
|
|
"enable_direction_adjust",
|
|
"direction_bias_ratio",
|
|
"max_drawdown_pct",
|
|
"stop_loss_pct",
|
|
"daily_loss_limit_pct",
|
|
"use_maker_only",
|
|
)
|
|
case "ai_trading":
|
|
return append(common,
|
|
"source_type",
|
|
"static_coins",
|
|
"excluded_coins",
|
|
"use_ai500",
|
|
"ai500_limit",
|
|
"use_oi_top",
|
|
"oi_top_limit",
|
|
"use_oi_low",
|
|
"oi_low_limit",
|
|
"primary_timeframe",
|
|
"primary_count",
|
|
"selected_timeframes",
|
|
"enable_ema",
|
|
"enable_macd",
|
|
"enable_rsi",
|
|
"enable_atr",
|
|
"enable_boll",
|
|
"enable_volume",
|
|
"enable_oi",
|
|
"enable_funding_rate",
|
|
"ema_periods",
|
|
"rsi_periods",
|
|
"atr_periods",
|
|
"boll_periods",
|
|
"nofxos_api_key",
|
|
"enable_quant_data",
|
|
"enable_quant_oi",
|
|
"enable_quant_netflow",
|
|
"enable_oi_ranking",
|
|
"oi_ranking_duration",
|
|
"oi_ranking_limit",
|
|
"enable_netflow_ranking",
|
|
"netflow_ranking_duration",
|
|
"netflow_ranking_limit",
|
|
"enable_price_ranking",
|
|
"price_ranking_duration",
|
|
"price_ranking_limit",
|
|
"btceth_max_leverage",
|
|
"altcoin_max_leverage",
|
|
"min_risk_reward_ratio",
|
|
"min_confidence",
|
|
"role_definition",
|
|
"trading_frequency",
|
|
"entry_standards",
|
|
"decision_process",
|
|
"custom_prompt",
|
|
)
|
|
default:
|
|
return manualStrategyEditableFieldKeys()
|
|
}
|
|
}
|
|
|
|
func agentStrategyUpdatableFieldKeys() []string {
|
|
return []string{
|
|
"name",
|
|
"description",
|
|
"is_public",
|
|
"config_visible",
|
|
"strategy_type",
|
|
"symbol",
|
|
"grid_count",
|
|
"total_investment",
|
|
"leverage",
|
|
"upper_price",
|
|
"lower_price",
|
|
"use_atr_bounds",
|
|
"atr_multiplier",
|
|
"distribution",
|
|
"enable_direction_adjust",
|
|
"direction_bias_ratio",
|
|
"max_drawdown_pct",
|
|
"stop_loss_pct",
|
|
"daily_loss_limit_pct",
|
|
"use_maker_only",
|
|
"source_type",
|
|
"static_coins",
|
|
"excluded_coins",
|
|
"use_ai500",
|
|
"ai500_limit",
|
|
"use_oi_top",
|
|
"oi_top_limit",
|
|
"use_oi_low",
|
|
"oi_low_limit",
|
|
"primary_timeframe",
|
|
"primary_count",
|
|
"selected_timeframes",
|
|
"enable_ema",
|
|
"enable_macd",
|
|
"enable_rsi",
|
|
"enable_atr",
|
|
"enable_boll",
|
|
"enable_volume",
|
|
"enable_oi",
|
|
"enable_funding_rate",
|
|
"ema_periods",
|
|
"rsi_periods",
|
|
"atr_periods",
|
|
"boll_periods",
|
|
"nofxos_api_key",
|
|
"enable_quant_data",
|
|
"enable_quant_oi",
|
|
"enable_quant_netflow",
|
|
"enable_oi_ranking",
|
|
"oi_ranking_duration",
|
|
"oi_ranking_limit",
|
|
"enable_netflow_ranking",
|
|
"netflow_ranking_duration",
|
|
"netflow_ranking_limit",
|
|
"enable_price_ranking",
|
|
"price_ranking_duration",
|
|
"price_ranking_limit",
|
|
"btceth_max_leverage",
|
|
"altcoin_max_leverage",
|
|
"min_risk_reward_ratio",
|
|
"min_confidence",
|
|
"role_definition",
|
|
"trading_frequency",
|
|
"entry_standards",
|
|
"decision_process",
|
|
"custom_prompt",
|
|
}
|
|
}
|