Calculates an estimate of the “noise” in the market over the specified number of bars. Noise is defined as the maximum absolute deviation from the momentum trend line. The momentum is calculated over the number of bars specified. This estimate can be helpful in placing stops outside the noise of the market.
Syntax:
MarketNoise(series, bars)
Parameter:
Description:
series
The name of the series.
bars
The number of bars over which to calculate noise amount.
Returns:
Estimate of market noise indicators showing how each of the three different number of records influences results.
Market Noise Function with 3 different Period Lengths.
Market Noise Indicator
Example:
' -------------------------------------------------------------- ' UPDATE INDICATORS SCRIPT - START ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' Delay Calculations until enough records are available Ifinstrument.bar>iBarCount1THEN ' Max absolute deviation from the momentum trend line - IPV. aPlotMktNoise1=MarketNoise(instrument.close,iBarCount1) ENDIF ' Delay Calculations until enough records are available Ifinstrument.bar>iBarCount2THEN ' Max absolute deviation from the momentum trend line - IPV. aPlotMktNoise2=MarketNoise(instrument.close,iBarCount2) ENDIF ' Delay Calculations until enough records are available Ifinstrument.bar>iBarCount3THEN ' Max absolute deviation from the momentum trend line - IPV. aPlotMktNoise3=MarketNoise(instrument.close,iBarCount3) ENDIF ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' UPDATE INDICATORS SCRIPT - END ' --------------------------------------------------------------