Home
    Product
    Support
    Purchase
    Company

Advanced trading software with proprietary analytics and artificial intelligence

Support Center
Publications
Tradecision FAQs
Improvian Consulting
Contact Support Team
Knowledgebase
Collection of Indicators
Custom Indicators
Custom Studies
TASC Traders' Tips
Active Trader Strategies
Golden Trading Rules
Trader’s Quiz

Traders' Tips from TASC Magazine
The Fourier indicator

In the Fourier Transform for Traders article, John F. Ehlers explains how to use Fourier transforms for measuring and estimating market cycles.

Tradecision's Indicator Builder enables you to create a custom indicator using the described method.

This indicator allows building only some of the price data spectrum components, defined by the parameter Peridq. The parameter Peridq is the component to be analyzed with the fluctuations for the indicated period. If the parameter ShowDC is true, Peridq is invalid, and the graph shows the behavior of the Dominant Cycle component, calculated automatically.

The following is the code for the Fourier custom indicator:

Input
  Price :"Price" ,((H+L)/2);
  Window:"Window",50;
  ShowDC:"ShowDC",false;
  Peridq:"Period",30,1,50;
end_input

var
alpha1:=0;
HP:=0;
CleanedData:=0;
Period:=0;
n:=0;
MaxPwr:=0;
Num:=0;
Denom:=0;
DominantCycle:=0;


array:CosinePart[50]:=0;
array:SinePart[50]:=0;
array:Pwr[50]:=0;
array:DB[50]:=0;

end_var

{Get a detrended version of the data by High Pass Filtering with
a 40 Period cutoff}

If HISTORYSIZE <= 5 Then Begin
  HP := Price;
  CleanedData := Price;
End; else Begin
  alpha1 := (1 - Sin(360/40))/Cos(360/40);
  HP := 0.5*(1 + alpha1)*(Price - Price\1\) + alpha1*HP\1\;
  CleanedData := (HP + 2*HP\1\ + 3*HP\2\ + 3*HP\3\ + 2*HP\4\ + HP\5\)/12;
End;

{This is the DFT}

For Period := 8 to 50 do Begin
  CosinePart[Period] := 0;
  SinePart[Period] := 0;

  For n := 0 to Window - 1 do Begin
CosinePart[Period] := CosinePart[Period] + CleanedData\n\*Cos(360*n/Period);
  SinePart[Period] := SinePart[Period] + CleanedData\n\*Sin(360*n/Period);
  End;
  Pwr[Period] := CosinePart[Period]*CosinePart[Period] +
      SinePart[Period]*SinePart[Period];
End;

{Find Maximum Power Level for Normalization}

MaxPwr := Pwr[8];
For Period := 8 to 50 do Begin
  If Pwr[Period] > MaxPwr Then MaxPwr := Pwr[Period];
End;

{Normalize Power Levels and Convert to Decibels}

For Period := 8 to 50 do Begin
  IF MaxPwr > 0 and Pwr[Period] > 0 Then DB[Period] := -
  10* LogN(0.01 / (1 - 0.99*Pwr[Period] / MaxPwr))/LogN(10);
  If DB[Period] > 20 then DB[Period] := 20;
End;

If ShowDC = True then Begin
{Find Dominant Cycle using CG algorithm}


Num := 0;Denom := 0;
For Period := 8 to 50 do Begin
     Num := Num + Period*(3 - DB[Period]);
     Denom := Denom + (3 - DB[Period]);
  End;
End;
If Denom <> 0 then DominantCycle := Num/Denom;

this:=DominantCycle;
End;
Else this :=DB[Peridq];

return this;


Download to import into Tradecision.

How to use this indicator in Tradecision:
  1. Click Download.
  2. Save this indicator in a safe location on your hard drive.
  3. Open Tradecision and in the Tools menu click Indicator Builder.
  4. In the Indicator Builder dialog, click Import, locate the saved file and then click OK.
The indicator will be added to the Custom Indicators list.
 
Smoothing The Bollinger %b
Modified Volume- Price Trend Indicator
Empirical Mode Decomposition
The 350 Swing Trade
The Vortex Indicator
Making The Most Of A Trend With The Disparity Index
A Seasonal System For Soybean Futures
Volume-Weighted Macd Histogram
Pivot Detector Oscillator, Simplified
Combining DMI and Moving Average for a EUR/USD trading system
Trailing Resistance &nd Support Stops
Average True Range Trailing Stops
Using Initial Stop Methods
Profit With High Relative Strength Mutual Funds
Trading Trendline Breaks, part 2
Building A Trading Template
Volume Price Confirmation Indicator
Rectangles
Trongone moving average (TMA)
Adjusted Rate of Change
MA crossovers, part 2
MA crossovers
The Fourier indicator
Stochastics with Long Term EMA filter strategy
Active Trendline Indicator
Relative Spread Strength Indicator
Trading With An Adaptive Price Zone
Modeling the Market = Building Trading Strategies
The Wilson Relative Price Channels
Harnessing The (Mis)Behavior Of Markets
Cross-Market Evaluations with Normalized Average True Range
The Average Peak Excursion
Trading Trends With Bollinger Bands Z (BBZ)
The Self-Adjusted RSI
Swiss Army Knife Indicator
Directional Down
Directional Up
Volatility Profit Indicator
Volatility Trailing Stop Indicator
Trend Trigger Factor
TRsV
Normalized RSI with IFT
Linear Regression Reversal Indicator
Bull and Bear Balance Indicator
Regularized EMA
FVE - lin reg slope
Laguerre Filter
Laguerre RSI
Deviation Oscillator
Average True Range Bands HA line
Average True Range Bands LA line
Elastic Volume Weighted Moving Average
Standard Deviation Bands H line
Standard Deviation Bands L line
Ehlers Filters
Buff Up Your Moving Averages
Balance of Market Power
Breakout Range 2
TargetPrice
Modified Moving Average
Stochastics D
Stochastics K
Tradecision Reviews
Video Tours
Discussion Boards
Chat with a live Rep
Ask a question
(510) 931 7808

Site Map   |   Terms of Use   |   Privacy Policy   |   Risk Warning
Forex, equities or futures trading involves substantial risk of loss and is not suitable for all investors.
Copyright © 2001-2010 Alyuda Research.  All rights reserved