Skip to main content

BotSettings

Struct BotSettings 

Source
pub struct BotSettings {
Show 55 fields pub symbol: String, pub leverage: u32, pub contracts: u32, pub use_market_orders: bool, pub taker_fee: f64, pub maker_fee: f64, pub risk_fraction: f64, pub max_contracts: u32, pub sim_balance: f64, pub kline_interval: String, pub rest_kline_type: String, pub history_candles: usize, pub backtest_candles: usize, pub ema_len: usize, pub atr_len: usize, pub st_factor: f64, pub training_period: usize, pub highvol_pct: f64, pub midvol_pct: f64, pub lowvol_pct: f64, pub ts_max_length: usize, pub ts_accel_mult: f64, pub ts_rma_len: usize, pub ts_hma_len: usize, pub ts_collen: usize, pub ts_lookback: usize, pub ts_speed_exit_threshold: Option<f64>, pub liq_period: usize, pub liq_bins: usize, pub conf_ema_fast: usize, pub conf_ema_slow: usize, pub conf_ema_trend: usize, pub conf_rsi_len: usize, pub conf_adx_len: usize, pub conf_min_score: f64, pub struct_swing_len: usize, pub struct_atr_mult: f64, pub fib_zone_enabled: bool, pub signal_mode: String, pub signal_confirm_bars: usize, pub cvd_slope_bars: usize, pub cvd_div_lookback: usize, pub wave_pct_l: f64, pub wave_pct_s: f64, pub mom_pct_min: f64, pub vol_pct_window: usize, pub hurst_threshold: f64, pub hurst_lookback: usize, pub stop_atr_mult: f64, pub min_vol_pct: f64, pub min_hold_candles: usize, pub breaker_loss_limit: u32, pub breaker_cooldown_sec: u32, pub heartbeat_interval_sec: u32, pub param_watch_interval_sec: u32,
}
Expand description

Per-symbol bot configuration — mirrors Python DEFAULT_SETTINGS_BTC.

Load from JSON with serde_json::from_str, or use a BotSettings::btc() constructor.

Fields§

§symbol: String§leverage: u32§contracts: u32§use_market_orders: bool§taker_fee: f64§maker_fee: f64§risk_fraction: f64§max_contracts: u32§sim_balance: f64§kline_interval: String§rest_kline_type: String§history_candles: usize§backtest_candles: usize§ema_len: usize§atr_len: usize§st_factor: f64§training_period: usize§highvol_pct: f64§midvol_pct: f64§lowvol_pct: f64§ts_max_length: usize§ts_accel_mult: f64§ts_rma_len: usize§ts_hma_len: usize§ts_collen: usize§ts_lookback: usize§ts_speed_exit_threshold: Option<f64>§liq_period: usize§liq_bins: usize§conf_ema_fast: usize§conf_ema_slow: usize§conf_ema_trend: usize§conf_rsi_len: usize§conf_adx_len: usize§conf_min_score: f64§struct_swing_len: usize§struct_atr_mult: f64§fib_zone_enabled: bool§signal_mode: String

"majority" | "strict" | "any"

§signal_confirm_bars: usize§cvd_slope_bars: usize§cvd_div_lookback: usize§wave_pct_l: f64§wave_pct_s: f64§mom_pct_min: f64§vol_pct_window: usize§hurst_threshold: f64§hurst_lookback: usize§stop_atr_mult: f64§min_vol_pct: f64§min_hold_candles: usize§breaker_loss_limit: u32§breaker_cooldown_sec: u32§heartbeat_interval_sec: u32§param_watch_interval_sec: u32

Implementations§

Source§

impl BotSettings

Source

pub fn btc() -> Self

Source

pub fn eth() -> Self

Source

pub fn sol() -> Self

Source

pub fn by_symbol(symbol: &str) -> Self

Trait Implementations§

Source§

impl Clone for BotSettings

Source§

fn clone(&self) -> BotSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BotSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BotSettings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for BotSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,