{"id":53,"date":"2007-05-02T06:56:44","date_gmt":"2007-05-02T06:56:44","guid":{"rendered":"http:\/\/www.amibroker.org\/userkb\/2007\/05\/02\/resetting-indicators\/"},"modified":"2007-07-07T19:42:37","modified_gmt":"2007-07-07T19:42:37","slug":"resetting-indicators","status":"publish","type":"post","link":"http:\/\/www.amibroker.org\/editable_userkb\/2007\/05\/02\/resetting-indicators\/","title":{"rendered":"Resetting Indicators"},"content":{"rendered":"
Smoothing Indicators like MA(), EMA(), T3(), DEMA(), etc. are intended to give you an average indication of price movements. They do this by filtering out high frequency changes in a particular price variable. The problem is that such indicators introduce time lag into the system. Indicator lag is most readily apparent when the overall price chart is relatively smooth (for example, when a simple MA() stays within the High-Low range), and suddenly the price shifts or gaps. When this happens, most smoothing indicators need many bars to overcome the influence of these gaps and re-position themselves back within the average price range of the bar.<\/p>\n
Although all trading systems depend on lag to know that something has changed, the degree of lag needed by a system varies. Resettable indicators are most useful in systems that require a smoothing function that closely follows the price, i.e., one that exhibits a minimum of lag.<\/p>\n
When a Resettable Indicator encounters a sudden larger-than-normal offset to the average price, it changes behavior and resets the Indicator to a calculated reference point. While there are other patterns or conditions (Signals, Stops, Targets, etc.) in which you might want to reset an Indicator, this discussion focuses on simple gaps that are defined by the AFL functions GapUp() and GapDown(). The techniques introduced here work equally well with EOD or RT data. Another application of the concept would be in RT trading where you might want to reset your Indicator at the start of each new day or trading session.<\/p>\n
The reset idea is based on the fact that smoothing functions have a primary period and that the Indicator’s lag will be proportional to that period, i.e. longer periods increase lag and shorter periods decrease lag. Knowing that, we can reset an Indicator by simply setting its period to a lower value. Typically, resetting to a period of 1 works fine. After the reset bar, the period is increased with each passing bar until it has reached its original value.<\/p>\n
Consider the EOD example shown below. White bars identify the Gaps that trigger a reset.<\/p>\n