Wealth-Lab Wiki

API ChartStyles Community Components Community Indicators IndexDefinitions Knowledge Base Misc Optimizers Pending Deletion PosSizers Providers Standard Indicators TASC Traders Tips TASCIndicators Tutorial Videos Visualizers
RSS

Navigation


Quick Search
»
Advanced Search »


RevEngSMA_TC (Tomorrow's Close)

RSS

Syntax

public RevEngSMA_TC(DataSeries ds, int period1, int period2, string description)
public static RevEngSMA_TC Series(DataSeries ds, int period1, int period2)

Parameter Description

ds Source Series
period1 Period for SMA #1
period2 Period for SMA #2

Description

The RevEngSMA_TC indicator derived by Tsokakis in the February 2007 issue of Stocks & Commodities magazine solves for the value of "Tomorrow's Close" (i.e., the Source Series) at which two SMAs with period1 and period2 would be equal.

Tsokakis observed and demonstrated that crossovers of this indicator with its source series occurred one bar earlier than crossovers of the two SMA indicators using the same periods a very high percentage of the time.

Example

This example demonstrates that the RevEngSMA_TC DataSeries crosses over/under its source series prior to the crossing of the SMAs a very high percentage of the time (probably over 90%).

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 { protected override void Execute() { LineStyle LS = LineStyle.Solid; DataSeries tc = RevEngSMA_TC.Series(Close, 20, 50); DataSeries sma1 = SMA.Series(Close, 20); DataSeries sma2 = SMA.Series(Close, 50); ChartPane tcPane = CreatePane( 50, true, true ); // Plot the Close with the RevEngSMA_TC to observe the crossovers PlotSeries(tcPane, Close, Color.Black, LS, 1); PlotSeries(tcPane, tc, Color.Blue, LS, 1); // Plot the SMAs as you normally would in the PricePane PlotSeries(PricePane, sma1, Color.Green, LS, 1); PlotSeries(PricePane, sma2, Color.Red, LS, 1); // Highlight the crossovers of Close and RevEngSMA_TC for (int bar = 50; bar < Bars.Count; bar++) { if( CrossOver(bar, Close, tc) || CrossUnder(bar, Close, tc) ) SetBackgroundColor(bar, Color.Beige); } } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

Used under license from FMR Corp. Copyright 2008 FMR Corp. All rights reserved.


ScrewTurn Wiki. Some of the icons created by FamFamFam.