C# Class Forex_Strategy_Builder.Indicator

Class Indicator.
Afficher le fichier Open project: nuggett11/Forex-Strategy-Builder Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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

Method Details

BandIndicatorLogic() protected méthode

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.
Résultat bool

BarClosesAboveIndicatorLogic() protected méthode

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
Résultat void

BarClosesBelowIndicatorLogic() protected méthode

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
Résultat void

BarOpensAboveIndicatorAfterOpeningBelowLogic() protected méthode

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
Résultat void

BarOpensAboveIndicatorLogic() protected méthode

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
Résultat void

BarOpensBelowIndicatorAfterOpeningAboveLogic() protected méthode

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
Résultat void

BarOpensBelowIndicatorLogic() protected méthode

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
Résultat void

Calculate() public méthode

Calculates the components
public Calculate ( SlotTypes slotType ) : void
slotType SlotTypes
Résultat void

Indicator() public méthode

The default constructor
public Indicator ( ) : System
Résultat System

IndicatorCrossesAnotherIndicatorDownwardLogic() protected méthode

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
Résultat void

IndicatorCrossesAnotherIndicatorUpwardLogic() protected méthode

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
Résultat void

IndicatorFallsLogic() protected méthode

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
Résultat void

IndicatorIsHigherThanAnotherIndicatorLogic() protected méthode

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
Résultat void

IndicatorIsLowerThanAnotherIndicatorLogic() protected méthode

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
Résultat void

IndicatorRisesLogic() protected méthode

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
Résultat void

MovingAverage() protected static méthode

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
Résultat double[]

NoDirectionOscillatorLogic() protected méthode

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.
Résultat bool

OscillatorLogic() protected méthode

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.
Résultat bool

PrepareUsePrevBarValueCheckBox() protected méthode

Sets the check box "Use previous bar value"
protected PrepareUsePrevBarValueCheckBox ( SlotTypes slotType ) : bool
slotType SlotTypes
Résultat bool

Price() protected static méthode

Calculates the base price.
protected static Price ( BasePrice price ) : double[]
price BasePrice The base price type.
Résultat double[]

SetDescription() public méthode

Sets the indicator logic description
public SetDescription ( SlotTypes slotType ) : void
slotType SlotTypes
Résultat void

Sigma() protected méthode

Maximum error for comparing indicator values
protected Sigma ( ) : double
Résultat double

TestPossibleSlot() public méthode

Tests if this is one of the possible slots.
public TestPossibleSlot ( SlotTypes slotType ) : bool
slotType SlotTypes The slot we test.
Résultat bool