Aug
21

Writing NeoBreadth Formulas Part 2

We will explore some basic techniques using the NeoBreadth History Generator.

Usages of the NeoBreadth History Generator

The NeoBreadth History Generator has three basic usages.

First, it is a tool that repairs NeoBreadth data that you cannot collect successfully from real-time updates due to outage of your real-time feed, or in situations that you cannot run NeoTicker during market hours, etc.

Second, it is a tool for investigative breadth data generation. You can create a new breadth formula, generate the historical data and then study the results. By studying the historical data, you can determine if the breadth data has any value for real-time data collection.

Third, it is used for the generation of end-of-day custom breadth statistics. There are market statistics that has no real-time tracking value, but, useful for end of day analysis. For example, some volume flow analysis on index is more meaningful when it is studied on a daily or weekly basis.

Default Advance Issues Historical Data Formula

c >= PrevDClose (data1)

The advantage of this formula is that it looks very similar to the real-time formula and can be converted from the real-time formula easily.

The issue is that this formula does not give you access to other daily information in case your definition gets more complex.

Alternative Formulas

For example, if you want to generate a custom advance issues definition based on the midpoint of previous trading day as oppose to the close of previous trading day, then the real-time formula will look like this,

c >= (prevDHigh (M15) + prevDLow (M15)) / 2

Or, if you want to save memory usage in real-time, you can rewrite the formula this way,

c >= (H (M390:2) + L (M390:2)) / 2

The first version of the real-time formula has a straight-forward translation into its historical data counterpart,

c >= (prevDHigh (data1) + prevDLow (data1)) / 2

And this formula is not very efficient for history generation either.

The second version of the real-time formula can be translated into historical data formula using the compressseries function,

compressseries (mydaily, data1, ppDaily, 1);
c >= (mydaily.h (1) + mydaily.l (1)) / 2

The speed of calculating this formula is significantly faster than the previous one because it does not use any indicators at all within its calculation.

How to Improve History Generation Performance

If you are investigating new breadth calculations, you can improve historical breadth data generation drastically by,

1. Download all the underlying data first from your data vendor

2. Switch to offline mode

3. Disable Real-Time Friendly option

That will boost the history generation speed 5 to 10 times.

Discuss this article

Leave a Comment

Blog Developed
By ContentRobot