C# Class NinjaTrader.Indicator.EncogFrameworkIndicator

Inheritance: Indicator
Afficher le fichier Open project: filgood/encog-financial Class Usage Examples

Private Properties

Свойство Type Description
ParseArraySize void

Méthodes publiques

Méthode Description
DrawError ( ) : void
WaitForPacket ( ) : void

Wait for a packet. Timeout if necessary.

Méthodes protégées

Méthode Description
Eval ( string str ) : IDataSeries

Evaluate a custom indicator. These indicators must be in the form: INDICATOR.VALUE[BARS_NEEDED] For example, MACD(12,26,9).Avg[1] This would request the current BAR of the Avg value of the MACD indicator. If the indicator has only one value, then the following format is used. EMA(14)[1] This would request the current bar of EMA, with a period of 14.

FillParams ( MethodInfo targetMethod, IList paramList ) : object[]

Fill the parameters of a 3rd party indicator.

GotPacket ( String line ) : void

Process a packet.

Initialize ( ) : void

This method is used to configure the indicator and is called once before any bar data is loaded.

OnBarUpdate ( ) : void

Called on each bar update event (incoming tick)

OnTermination ( ) : void

Called when indicator terminates.

OpenConnection ( ) : void

Open a connection to Encog. Also send the HELLO packet.

ParseCSV ( string line ) : IList

Parse a line of CSV. Lines can have quote escaped text. A quote inside a string should be HTML escaped (i.e. ") Only " is supported, and it must be lower case. Ideally, I would like to use HttpUtility, however, in .Net 3.5, used by NT, this requires an additonal reference, which is an extra step in the setup process.

PerformError ( string whatError ) : void

Handle an error. Display the error to the user, log it, and set the state to error. No further processing on this indicator will occur.

PerformGoodBye ( ) : void

Tell the remote that we are about to disconnect.

Send ( String str ) : void

Send data to the remote socket, if we are connected. If we are not connected, ignore. Data is sent in ASCII.

Private Methods

Méthode Description
ParseArraySize ( string str, int &index, string &name ) : void

Parse an array size, for example "avg[5]". Return both the number, and the name before the brakets.

Method Details

DrawError() public méthode

public DrawError ( ) : void
Résultat void

Eval() protected méthode

Evaluate a custom indicator. These indicators must be in the form: INDICATOR.VALUE[BARS_NEEDED] For example, MACD(12,26,9).Avg[1] This would request the current BAR of the Avg value of the MACD indicator. If the indicator has only one value, then the following format is used. EMA(14)[1] This would request the current bar of EMA, with a period of 14.
protected Eval ( string str ) : IDataSeries
str string The indicator string.
Résultat IDataSeries

FillParams() protected méthode

Fill the parameters of a 3rd party indicator.
protected FillParams ( MethodInfo targetMethod, IList paramList ) : object[]
targetMethod System.Reflection.MethodInfo The name of the indicator( i.e. "MACD(12,26,9)")
paramList IList The parameter list.
Résultat object[]

GotPacket() protected méthode

Process a packet.
protected GotPacket ( String line ) : void
line String The packet line.
Résultat void

Initialize() protected méthode

This method is used to configure the indicator and is called once before any bar data is loaded.
protected Initialize ( ) : void
Résultat void

OnBarUpdate() protected méthode

Called on each bar update event (incoming tick)
protected OnBarUpdate ( ) : void
Résultat void

OnTermination() protected méthode

Called when indicator terminates.
protected OnTermination ( ) : void
Résultat void

OpenConnection() protected méthode

Open a connection to Encog. Also send the HELLO packet.
protected OpenConnection ( ) : void
Résultat void

ParseCSV() protected méthode

Parse a line of CSV. Lines can have quote escaped text. A quote inside a string should be HTML escaped (i.e. ") Only " is supported, and it must be lower case. Ideally, I would like to use HttpUtility, however, in .Net 3.5, used by NT, this requires an additonal reference, which is an extra step in the setup process.
protected ParseCSV ( string line ) : IList
line string The line to parse.
Résultat IList

PerformError() protected méthode

Handle an error. Display the error to the user, log it, and set the state to error. No further processing on this indicator will occur.
protected PerformError ( string whatError ) : void
whatError string The error text.
Résultat void

PerformGoodBye() protected méthode

Tell the remote that we are about to disconnect.
protected PerformGoodBye ( ) : void
Résultat void

Send() protected méthode

Send data to the remote socket, if we are connected. If we are not connected, ignore. Data is sent in ASCII.
protected Send ( String str ) : void
str String The data to send to the remote.
Résultat void

WaitForPacket() public méthode

Wait for a packet. Timeout if necessary.
public WaitForPacket ( ) : void
Résultat void