NRTR_WATR

Modified on 2010/09/13 15:32 by Eugene — Categorized as: Community Indicators

NRTR_WATR: Indicator Documentation

Syntax

DataSeries NRTR_WATR( Bars bars, int lookback, double multiple );

Parameter Description

bars A Bars object
lookback Period lookback for trailing price extremes
multiple The Weighted ATR multiplier

Description

The NRTR_WATR indicator was created by Russian trader Konstantin Kopyrkin: an adaptive variation of the trailing reverse technique (see NRTR%.)

To gauge current volatility, the true range value is smoothed by Weighted Moving Average, thus the trailing reverse level becomes adaptive to the market conditions. Crossovers and crossunders of the NRTR_WATR line can be used to trigger trend trades, as in this example, or as the basis of a stop-and-reverse (SAR) strategy.

Original article (in Russian)

Example

This simple trading system illustrates how to trade on crossings of the closing price with the NRTR_WATR:

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using Community.Indicators;

namespace WealthLab.Strategies { public class Demo : WealthScript { private StrategyParameter paramLookback; private StrategyParameter paramMultiple;

public Demo() { paramLookback = CreateParameter("Lookback", 20, 5, 50, 1); paramMultiple = CreateParameter("Multiple", 3, 1, 5, 1); } protected override void Execute() { int Lookback = paramLookback.ValueInt; double Mult = paramMultiple.Value; NRTR_WATR nrtr = NRTR_WATR.Series( Bars, Lookback, Mult ); // Display the resulting NRTR_WATR data series PlotSeries( PricePane, nrtr, Color.Teal, LineStyle.Dotted, 2 ); // A simple strategy for(int bar = nrtr.FirstValidValue+1; bar < Bars.Count; bar++) { if (IsLastPositionActive) { if( CrossUnder( bar, Close, nrtr ) ) SellAtMarket( bar+1, LastPosition, "NRTR Exit" ); } else { if( CrossOver( bar, Close, nrtr ) ) BuyAtMarket( bar+1, "NRTR Entry" ); } } } } }