Every security selector that you create derives from the base class ‘SeriesSelector’. SeriesSelector has some virtual and abstract methods and one virtual property that you can override in order to implement your own selector behavior:
Name |
Description |
void InitializeRun() |
Called prior to the start of each run. Override this method to initialize objects that can then be used throughout the run. |
void InitializeSeries(BarSeries) |
Called when a new BarSeries is about to be processed. If your input data contains multiple stocks, this method will be called once for each stock. Override this method to initialize objects that will be used per series. |
bool Execute(BarSeries, SelectorContext) |
Called for every bar of a series. Return true from this method to create an Edge Event for that bar in the series. The events generated will then appear in the Signals grid. |
int Lookback{ get; } |
Called once per run. Return the maximum number of bars required in order to calculate an event. For instance if you are calculating a simple moving average of 10 bars, then you should return 10 here. EdgeRater uses the number returned to avoid performing calculations on bars that you know will not yield a result. This can have a noticeable effect on processing time if the input data consists of thousands of stocks. It is still possible to get sub-second analysis when this property is used correctly. |
SeriesSelector overrideable methods and properties