Profile Picture

Synthetic Bar Indicator

Posted By blousetrader 8 Years Ago
Posted Saturday April 10 2010
Is it possible to create an indicator which returns a series of bardata - I want this so I can create synthetic bar data I can
then feed into other indicators.
Posted Monday April 12 2010
You can't create your own bar data with an indicator.

You can create your own bar data by writing your own frequency plugin. You can derive your class from FrequencyPlugin, and then you can pass an instance of that class to the GetFrequency method in your system. RightEdge will call the CreateFrequencyGenerator() method of your plugin to create a frequency generator for each symbol in the system. The frequency generator is responsible for listening to bars and ticks that are passed to it (in the ProcessTick and ProcessBar methods), and raising the NewBar and NewTick events when appropriate.

There are two facets to a frequency generator: when it decides to generate a new bar, and how it creates the bar OHLC values based on the data coming in via ticks and bars. You may want to modify one or both of those. If you want to generate new bars based on a fixed frequency (ie 1 minute, 1 hour, etc), then the TimeFrequency.RoundTime() method will be useful. If you want to use the default logic for OHLC values, you can use the BarGenerator class to build the bars for you.


Similar Topics

Reading This Topic

2005-2018 © RightEdge Systems