C# Класс Forex_Strategy_Builder.Indicator

Class Indicator.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Calculate ( SlotTypes slotType ) : void

Calculates the components

Indicator ( ) : System

The default constructor

SetDescription ( SlotTypes slotType ) : void

Sets the indicator logic description

TestPossibleSlot ( SlotTypes slotType ) : bool

Tests if this is one of the possible slots.

Защищенные методы

Метод Описание
BandIndicatorLogic ( int firstBar, int prvs, double adUpperBand, double adLowerBand, IndicatorComp &indCompLong, IndicatorComp &indCompShort, BandIndLogic indLogic ) : bool

Calculates the logic of a band indicator.

BarClosesAboveIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The bar closes above the Indicator"

BarClosesBelowIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The bar closes below the Indicator"

BarOpensAboveIndicatorAfterOpeningBelowLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The bar opens above the Indicator after opening below it"

BarOpensAboveIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The bar opens above the Indicator"

BarOpensBelowIndicatorAfterOpeningAboveLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The bar opens below the Indicator after opening above it"

BarOpensBelowIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The bar opens below the Indicator"

IndicatorCrossesAnotherIndicatorDownwardLogic ( int firstBar, int prvs, double adIndValue, double adAnotherIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The Indicator crosses AnotherIndicator downward"

IndicatorCrossesAnotherIndicatorUpwardLogic ( int firstBar, int prvs, double adIndValue, double adAnotherIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The Indicator crosses AnotherIndicator upward"

IndicatorFallsLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "Indicator falls"

IndicatorIsHigherThanAnotherIndicatorLogic ( int firstBar, int prvs, double adIndValue, double adAnotherIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The Indicator is higher than the AnotherIndicator"

IndicatorIsLowerThanAnotherIndicatorLogic ( int firstBar, int prvs, double adIndValue, double adAnotherIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "The Indicator is lower than the AnotherIndicator"

IndicatorRisesLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void

Returns signals for the logic rule "Indicator rises".

MovingAverage ( int period, int shift, MAMethod maMethod, double adSource ) : double[]

Calculates a Moving Average

NoDirectionOscillatorLogic ( int firstBar, int prvs, double adIndValue, double dLevel, IndicatorComp &indComp, IndicatorLogic indLogic ) : bool

Calculates the logic of a No Direction Oscillator.

OscillatorLogic ( int firstBar, int prvs, double adIndValue, double levelLong, double levelShort, IndicatorComp &indCompLong, IndicatorComp &indCompShort, IndicatorLogic indLogic ) : bool

Calculates the logic of an Oscillator.

PrepareUsePrevBarValueCheckBox ( SlotTypes slotType ) : bool

Sets the check box "Use previous bar value"

Price ( BasePrice price ) : double[]

Calculates the base price.

Sigma ( ) : double

Maximum error for comparing indicator values

Описание методов

BandIndicatorLogic() защищенный Метод

Calculates the logic of a band indicator.
protected BandIndicatorLogic ( int firstBar, int prvs, double adUpperBand, double adLowerBand, IndicatorComp &indCompLong, IndicatorComp &indCompShort, BandIndLogic indLogic ) : bool
firstBar int The first bar number.
prvs int To use the previous bar or not.
adUpperBand double The Upper band values.
adLowerBand double The Lower band values.
indCompLong IndicatorComp Indicator component for Long position.
indCompShort IndicatorComp Indicator component for Short position.
indLogic BandIndLogic The chosen logic.
Результат bool

BarClosesAboveIndicatorLogic() защищенный Метод

Returns signals for the logic rule "The bar closes above the Indicator"
protected BarClosesAboveIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

BarClosesBelowIndicatorLogic() защищенный Метод

Returns signals for the logic rule "The bar closes below the Indicator"
protected BarClosesBelowIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

BarOpensAboveIndicatorAfterOpeningBelowLogic() защищенный Метод

Returns signals for the logic rule "The bar opens above the Indicator after opening below it"
protected BarOpensAboveIndicatorAfterOpeningBelowLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

BarOpensAboveIndicatorLogic() защищенный Метод

Returns signals for the logic rule "The bar opens above the Indicator"
protected BarOpensAboveIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

BarOpensBelowIndicatorAfterOpeningAboveLogic() защищенный Метод

Returns signals for the logic rule "The bar opens below the Indicator after opening above it"
protected BarOpensBelowIndicatorAfterOpeningAboveLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

BarOpensBelowIndicatorLogic() защищенный Метод

Returns signals for the logic rule "The bar opens below the Indicator"
protected BarOpensBelowIndicatorLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

Calculate() публичный Метод

Calculates the components
public Calculate ( SlotTypes slotType ) : void
slotType SlotTypes
Результат void

Indicator() публичный Метод

The default constructor
public Indicator ( ) : System
Результат System

IndicatorCrossesAnotherIndicatorDownwardLogic() защищенный Метод

Returns signals for the logic rule "The Indicator crosses AnotherIndicator downward"
protected IndicatorCrossesAnotherIndicatorDownwardLogic ( int firstBar, int prvs, double adIndValue, double adAnotherIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
adAnotherIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

IndicatorCrossesAnotherIndicatorUpwardLogic() защищенный Метод

Returns signals for the logic rule "The Indicator crosses AnotherIndicator upward"
protected IndicatorCrossesAnotherIndicatorUpwardLogic ( int firstBar, int prvs, double adIndValue, double adAnotherIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
adAnotherIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

IndicatorFallsLogic() защищенный Метод

Returns signals for the logic rule "Indicator falls"
protected IndicatorFallsLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

IndicatorIsHigherThanAnotherIndicatorLogic() защищенный Метод

Returns signals for the logic rule "The Indicator is higher than the AnotherIndicator"
protected IndicatorIsHigherThanAnotherIndicatorLogic ( int firstBar, int prvs, double adIndValue, double adAnotherIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
adAnotherIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

IndicatorIsLowerThanAnotherIndicatorLogic() защищенный Метод

Returns signals for the logic rule "The Indicator is lower than the AnotherIndicator"
protected IndicatorIsLowerThanAnotherIndicatorLogic ( int firstBar, int prvs, double adIndValue, double adAnotherIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
adAnotherIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

IndicatorRisesLogic() защищенный Метод

Returns signals for the logic rule "Indicator rises".
protected IndicatorRisesLogic ( int firstBar, int prvs, double adIndValue, IndicatorComp &indCompLong, IndicatorComp &indCompShort ) : void
firstBar int
prvs int
adIndValue double
indCompLong IndicatorComp
indCompShort IndicatorComp
Результат void

MovingAverage() защищенный статический Метод

Calculates a Moving Average
protected static MovingAverage ( int period, int shift, MAMethod maMethod, double adSource ) : double[]
period int Period
shift int Shift
maMethod MAMethod Method of calculation
adSource double
Результат double[]

NoDirectionOscillatorLogic() защищенный Метод

Calculates the logic of a No Direction Oscillator.
protected NoDirectionOscillatorLogic ( int firstBar, int prvs, double adIndValue, double dLevel, IndicatorComp &indComp, IndicatorLogic indLogic ) : bool
firstBar int The first bar number.
prvs int To use the previous bar or not.
adIndValue double The indicator values.
dLevel double The Level value.
indComp IndicatorComp Indicator component where to save the results.
indLogic IndicatorLogic The chosen logic.
Результат bool

OscillatorLogic() защищенный Метод

Calculates the logic of an Oscillator.
protected OscillatorLogic ( int firstBar, int prvs, double adIndValue, double levelLong, double levelShort, IndicatorComp &indCompLong, IndicatorComp &indCompShort, IndicatorLogic indLogic ) : bool
firstBar int The first bar number.
prvs int To use the previous bar or not.
adIndValue double The indicator values.
levelLong double The Level value for a Long position.
levelShort double The Level value for a Short position.
indCompLong IndicatorComp Indicator component for Long position.
indCompShort IndicatorComp Indicator component for Short position.
indLogic IndicatorLogic The chosen logic.
Результат bool

PrepareUsePrevBarValueCheckBox() защищенный Метод

Sets the check box "Use previous bar value"
protected PrepareUsePrevBarValueCheckBox ( SlotTypes slotType ) : bool
slotType SlotTypes
Результат bool

Price() защищенный статический Метод

Calculates the base price.
protected static Price ( BasePrice price ) : double[]
price BasePrice The base price type.
Результат double[]

SetDescription() публичный Метод

Sets the indicator logic description
public SetDescription ( SlotTypes slotType ) : void
slotType SlotTypes
Результат void

Sigma() защищенный Метод

Maximum error for comparing indicator values
protected Sigma ( ) : double
Результат double

TestPossibleSlot() публичный Метод

Tests if this is one of the possible slots.
public TestPossibleSlot ( SlotTypes slotType ) : bool
slotType SlotTypes The slot we test.
Результат bool