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 »


Syntax

public static TRIX Series(DataSeries source, int period)
public TRIX(DataSeries source, int period, string description)

Parameter Description

source The source DataSeries
period Indicator calculation period

Description

TRIX displays the percentage Rate of Change, ROC, of a triple exponentially-smoothed moving average, EMA, over the specified Period. TRIX oscillates above and below the zero value. The indicator applies triple smoothing in an attempt to eliminate insignificant price movements within the trend that you're trying to isolate.

Interpretation

TRIX generates a signal when it changes direction (turns up or down). Alternately, you can create a signal line using a moving average and wait until TRIX crosses this signal line.

Example

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

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { /* Buy when TRIX turns up from below zero. Sell when TRIX crosses above zero. */

int Per = 24; DataSeries trix = TRIX.Series( Close, Per ); ChartPane TRIXPane = CreatePane( 25, true, true ); PlotSeries( TRIXPane, trix, Color.Brown, WealthLab.LineStyle.Solid, 2 ); for(int bar = 60; bar < Bars.Count; bar++) { if (!IsLastPositionActive) { if( TurnUp( bar, trix ) && ( trix[bar] < 0 ) ) BuyAtMarket( bar+1 ); } else { if( CrossOver( bar, trix, 0 ) ) SellAtMarket( bar+1, LastPosition ); } } } } }

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.