TASC 2018-03 | Recursive Median Filters (Ehlers)

Modified on 2018/02/10 09:29 by Eugene — Categorized as: TASC Traders Tips

Traders' Tip text

In March 2018 issue of Stocks & Commodities, author John F. Ehlers presents two new indicators. The Recursive Median Filter ignores the spiking types of the price noise. The Recursive Median Osclillator has less lag and a faster response to the larger moves in the price data.

Image

Figure 1. Application of the oscillators to a daily chart of SPY (SPDR S&P 500 ETF Trust).

After updating our TASCIndicators library to v2018.02 (or higher), the RMF and RMO indicators could be found under the TASC Magazine Indicators group. You can plot them on the chart or use as an entry or exit condition in a Rule-based Strategy without having to program a line of code yourself.

Enclosed C# Strategy code will help you plot the indicators on the chart:




C# Code


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

namespace WealthLab.Strategies { public class TASC201803: WealthScript { private StrategyParameter slider1; private StrategyParameter slider2; private StrategyParameter slider3; private StrategyParameter slider4; private StrategyParameter slider5;

public TASC201803() { slider1 = CreateParameter("RMO LPPeriod",16,2,300,20); slider2 = CreateParameter("RMO HPPeriod",40,2,300,20); slider3 = CreateParameter("RMO Median",5,2,300,20); slider4 = CreateParameter("RSI Period",14,2,200,20); slider5 = CreateParameter("EMA(RSI) Period",16,2,200,20); } protected override void Execute() { var rmf = RMF.Series(Close,slider1.ValueInt,slider3.ValueInt); var rmo = RMO.Series(Close,slider1.ValueInt,slider2.ValueInt,slider3.ValueInt); var rsi = EMA.Series(RSI.Series(Close,slider4.ValueInt),slider5.ValueInt,EMACalculation.Modern) / 100d;

ChartPane paneRSI = CreatePane(30,false,true); ChartPane paneRMO = CreatePane(30,false,true); HideVolume(); PlotSeries(paneRSI,rsi,Color.Blue,LineStyle.Solid,2); PlotSeries(paneRMO,rmo,Color.Red,LineStyle.Solid,2); PlotSeries(PricePane,rmf,Color.Black,LineStyle.Solid,2); } } }

Eugene (Gene Geren)
Wealth-Lab team
www.wealth-lab.com