TASC 2018-02 | Weekly & Daily PPO (Apirine)

Modified on 2017/12/29 10:17 by Eugene — Categorized as: TASC Traders Tips

Traders' Tip text

The weekly & daily PPO (W&D PPO) oscillator by Vitali Apirine from February 2018 issue of Stocks & Commodities combines the two PPO oscillators (weekly and daily) on a daily chart.

Image

Figure 1. Application of the oscillators to a daily chart of ^RUT (Russell 2000).

After updating our TASCIndicators library to v2018.01 (or higher), the RelativeDailyPPO and WeeklyPPO indicators could be found under the TASC Magazine Indicators group. You can plot them on a 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 MyStrategy : WealthScript { private StrategyParameter paramDailyLength1; private StrategyParameter paramDailyLength2; private StrategyParameter paramWeeklyLength1; private StrategyParameter paramWeeklyLength2; public MyStrategy() { paramDailyLength1 = CreateParameter("Daily Length 1",12,2,300,20); paramDailyLength2 = CreateParameter("Daily Length 2",26,2,300,20); paramWeeklyLength1 = CreateParameter("Weekly Length 1",60,2,300,20); paramWeeklyLength2 = CreateParameter("Weekly Length 2",130,2,300,20); } protected override void Execute() { var RDM = RelativeDailyPPO.Series(Close,paramDailyLength1.ValueInt,paramDailyLength2.ValueInt, paramWeeklyLength1.ValueInt,paramWeeklyLength2.ValueInt); var WM = WeeklyPPO.Series(Close,paramWeeklyLength1.ValueInt,paramWeeklyLength2.ValueInt); HideVolume(); LineStyle solid = LineStyle.Solid; ChartPane paneWDPPO = CreatePane( 40,true,true ); PlotSeries( paneWDPPO,RDM,Color.FromArgb(255,0,100,0),LineStyle.Solid,2 ); PlotSeries( paneWDPPO,WM,Color.FromArgb(255,0,0,0),LineStyle.Solid,2 ); DrawHorzLine( paneWDPPO,0,Color.Blue,LineStyle.Solid,1 ); } } }


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