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
impl Clone for StrategyParams
Source§fn clone(&self) -> StrategyParams
fn clone(&self) -> StrategyParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for StrategyParams
impl Default for StrategyParams
Source§fn default() -> Self
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§
impl Freeze for StrategyParams
impl RefUnwindSafe for StrategyParams
impl Send for StrategyParams
impl Sync for StrategyParams
impl Unpin for StrategyParams
impl UnwindSafe for StrategyParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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