Monday, November 19, 2007

Retrieving Calculations (API) - Part 2

The Swing indicator is a very central indicator in the toolset. Like most of the indicators, it writes data in the appropriate segment of the DLL to be used either through the API or to be used in EasyLanguage.

For instance, the no-lag smoothed data series is recorded in an array which can be retrieved back from the DLL using:

RetrieveLagPrices (EasyLanguage)
BV_RetrieveLagPrices (VC++)


Same for swings with:

RetrieveSegPrices (EasyLanguage)
BV_RetrieveSegPrices (VC++)


For the time being, the EasyLanguage indicator only save the retrieved data to file, but all sorts of calculations can be done. In Part 1, we have shown how to calculate Fibonacci retracement and expansions.

The EL indicators are obviously not code protected, and are very simple to understand. They identify which is the calling chart using a common symbol identification (symbol + bartype + interval + TF multiplier). A loop is then used to extract prices individually.