Struct StrategyParams

Source
pub struct StrategyParams {
    pub sma_short_period: usize,
    pub sma_long_period: usize,
    pub rsi_period: usize,
    pub rsi_overbought: f64,
    pub rsi_oversold: f64,
    pub bb_period: usize,
    pub bb_std_dev: f64,
    pub macd_fast: usize,
    pub macd_slow: usize,
    pub macd_signal: usize,
    pub min_signals_for_buy: usize,
    pub min_signals_for_sell: usize,
}
Expand description

Strategy parameters for the standard multi-indicator strategy

This struct contains all configurable parameters that affect how the strategy identifies buy and sell signals.

Fields§

§sma_short_period: usize

Period for short-term Simple Moving Average (SMA)

§sma_long_period: usize

Period for long-term Simple Moving Average (SMA)

§rsi_period: usize

Period for Relative Strength Index (RSI)

§rsi_overbought: f64

RSI level considered overbought (typically 70-80)

§rsi_oversold: f64

RSI level considered oversold (typically 20-30)

§bb_period: usize

Period for Bollinger Bands calculation

§bb_std_dev: f64

Standard deviation multiplier for Bollinger Bands width

§macd_fast: usize

Fast period for MACD calculation

§macd_slow: usize

Slow period for MACD calculation

§macd_signal: usize

Signal period for MACD calculation

§min_signals_for_buy: usize

Minimum number of buy signals required to trigger a buy

§min_signals_for_sell: usize

Minimum number of sell signals required to trigger a sell

Trait Implementations§

Source§

impl Clone for StrategyParams

Source§

fn clone(&self) -> StrategyParams

Returns a copy 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 Default for StrategyParams

Source§

fn default() -> Self

Creates a new StrategyParams instance with default values

§Default values
  • SMA short period: 10
  • SMA long period: 50
  • RSI period: 14
  • RSI overbought: 70.0
  • RSI oversold: 30.0
  • Bollinger Bands period: 20
  • Bollinger Bands std dev: 2.0
  • MACD fast: 12
  • MACD slow: 26
  • MACD signal: 9
  • Minimum signals for buy: 2
  • Minimum signals for sell: 2

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V