Skip to main content

ChartTypeParams

Struct ChartTypeParams 

Source
pub struct ChartTypeParams {
Show 28 fields pub styles: ChartTypeStyles, pub renko_size_method: BoxSizeMethod, pub kagi_size_method: BoxSizeMethod, pub range_size_method: BoxSizeMethod, pub pnf_size_method: BoxSizeMethod, pub renko_source: PriceBasedSource, pub kagi_source: PriceBasedSource, pub line_break_source: PriceBasedSource, pub pnf_source: PriceBasedSource, pub renko_wicks: bool, pub renko_brick_size: f64, pub kagi_reversal: f64, pub range_size: f64, pub pnf_box_size: f64, pub pnf_reversal: u32, pub line_break_count: usize, pub baseline: BaselineLevel, pub columns_base: Option<f64>, pub tpo_period_minutes: u32, pub tpo_initial_balance_minutes: u32, pub tpo_poor_highs_lows: bool, pub tpo_initial_balance_extensions: bool, pub tpo_row_ticks: u32, pub tpo_value_area: f64, pub tpo_split_sessions: bool, pub tpo_single_prints: bool, pub tpo_letters: bool, pub tpo_composites: Vec<RangeInclusive<DateTime<Utc>>>,
}
Expand description

The parameters of the chart types that need them. Sizes are in price units and are used as given; a size the chart cannot use is reported on the chart instead of being replaced.

Fields§

§styles: ChartTypeStyles

Independent line, area and baseline styles, retained across chart type changes.

§renko_size_method: BoxSizeMethod

Renko: method resolved once from loaded history, then frozen while bars stream.

§kagi_size_method: BoxSizeMethod

Kagi: method for its reversal amount.

§range_size_method: BoxSizeMethod

Range bars: method for their range.

§pnf_size_method: BoxSizeMethod

Point and Figure: method for its box size.

§renko_source: PriceBasedSource

Renko: close or high/low input, also used for wick extremes.

§kagi_source: PriceBasedSource

Kagi: close or high/low input.

§line_break_source: PriceBasedSource

Line Break: close or high/low input.

§pnf_source: PriceBasedSource

Point and Figure: high/low, the traditional method, or close input.

§renko_wicks: bool

Draw Renko wicks from the brick’s actual high and low.

§renko_brick_size: f64

Renko: size of a brick.

§kagi_reversal: f64

Kagi: the move against the line that starts a new line.

§range_size: f64

Range bars: the range of a bar from its low to its high.

§pnf_box_size: f64

Point and Figure: the size of a box.

§pnf_reversal: u32

Point and Figure: the number of boxes a move against the column must cover to start a new one.

§line_break_count: usize

Line Break: the number of lines a close must break through to reverse, 1 to 10.

§baseline: BaselineLevel

Baseline: where the base line is drawn.

§columns_base: Option<f64>

Columns: the price the columns rise above or fall below; None draws them up from the pane bottom.

§tpo_period_minutes: u32

TPO: minutes per period, raised to the bar interval when shorter.

§tpo_initial_balance_minutes: u32

TPO: minutes from the session open included in the initial balance, 60 by default.

§tpo_poor_highs_lows: bool

TPO: mark the highest and lowest rows when they hold more than one TPO.

§tpo_initial_balance_extensions: bool

TPO: draw one and two initial balance ranges above its high and below its low.

§tpo_row_ticks: u32

TPO: instrument ticks per price row. Zero, or an instrument without a tick size, fits about 40 rows to the visible price range, each a whole number of the instrument’s ticks when it has a tick size.

§tpo_value_area: f64

TPO: share of the TPOs in the value area, in percent.

§tpo_split_sessions: bool

TPO: separate profiles for pre-market, regular and post-market hours.

§tpo_single_prints: bool

TPO: highlight the rows touched by a single period.

§tpo_letters: bool

TPO: paint each period’s letter inside its block.

§tpo_composites: Vec<RangeInclusive<DateTime<Utc>>>

TPO: sessions combined into one profile, as in TPOConfig::composites.

Implementations§

Source§

impl ChartTypeParams

Source

pub fn tpo_config(&self, tick_size: Option<f64>) -> TPOConfig

The TPO settings for an instrument with minimum price increment tick_size, as the TPO chart type builds its profiles with them.

Source

pub fn with_atr_renko(atr: f64, multiplier: f64) -> Self

Create with ATR-based Renko brick size

Trait Implementations§

Source§

impl Clone for ChartTypeParams

Source§

fn clone(&self) -> ChartTypeParams

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ChartTypeParams

Source§

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

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

impl Default for ChartTypeParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ChartTypeParams

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 PartialEq for ChartTypeParams

Source§

fn eq(&self, other: &ChartTypeParams) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ChartTypeParams

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
Source§

impl StructuralPartialEq for ChartTypeParams

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> MaybeSend for T
where T: Send + Sync + ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

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.