Home
    Product
    Support
    Purchase
    Company

Advanced trading software: technical analysis and neural networks

Empowering wise traders

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
Reversing MACD

In his article “Reversing MACD”, Johnny Dough showed that the reversing MACD can be used to calculate the price value of a specific MACD level and the price value that will cause the MACD to change direction.

Using Tradecision’s Function Builder, one needs to create the following functions:

PMACDeq function:

function (price:numeric, period_x:numeric, 
period_Y:numeric):Numeric;

Var
alphaX:= 2 / ( 1 + period_X );
alphaY:= 2 / ( 1 + period_Y );
End_var

return ( EMA( price, period_X ) * alphaX - 
EMA( price, period_Y )* alphaY ) / 
( alphaX - alphaY );

PMACDlevel function:

function (level:numeric,price:numeric, 
period_x:numeric, period_Y:numeric):Numeric;

var
alphaX := 2 / ( 1 + period_X );
alphaY := 2 / ( 1 + period_Y );
One_alphaX := 1 - alphaX;
One_alphaY := 1 - alphaY;
end_var

return ( level + EMA( price, period_Y ) * 
One_alphaY - EMA( price, period_X )* 
One_alphaX ) / ( alphaX - alphaY );

PMACDzero function:

function (price:numeric, period_x:numeric, 
period_Y:numeric):Numeric;

return PMACDlevel( 0 , price, period_X, period_Y );

Using Tradecision’s Indicator Builder, one needs to create the following indicators:

PMACDzero indicator:

Inputs
p_px: "Price field", Close;
p_fast: "Period fast", 12, 1, 24;
p_slow: "Period slow", 26, 2, 52;
p_signal: "Period signal", 9, 0, 18;
End_input

return PMACDeq(p_px, p_fast, p_slow );

EMA_PMACD indicator:

Inputs
p_px: "Price field", Close;
p_fast: "Period fast", 12, 1, 24;
p_slow: "Period slow", 26, 2, 52;
p_signal: "Period signal", 9, 0, 18;
End_input

return EMA(PMACDeq(p_px, p_fast, p_slow ),p_signal);

PMACD_level indicator:

Inputs
p_px: "Price field", Close;
P_level: "Price level", 1, 0, 52;
p_fast: "Period fast", 12, 1, 24;
p_slow: "Period slow", 26, 2, 52;
End_input

return PMACDlevel(p_level,p_px,p_fast,p_slow);

PMACD_BBBottom indicator:

Inputs
p_px: "Price field", Close;
p_fast: "Period fast", 12, 1, 24;
p_slow: "Period slow", 26, 2, 52;
p_signal: "Period signal", 9, 0, 18;
p_bbperiod: "BB period", 10;
p_bbwidth: "BB width", 1;
End_input

return BBBot(PMACDeq(p_px, p_fast, p_slow ), 
p_bbperiod, p_bbwidth);

PMACD_BBTop indicator:

Inputs
p_px: "Price field", Close;
p_fast: "Period fast", 12, 1, 24;
p_slow: "Period slow", 26, 2, 52;
p_signal: "Period signal", 9, 0, 18;
p_bbperiod: "BB period", 10;
p_bbwidth: "BB width", 1;
End_input

return BBTop(PMACDeq(p_px, p_fast, p_slow ), 
p_bbperiod, p_bbwidth);

PMACD_BBMiddle indicator:

Inputs
p_px: "Price field", Close;
p_fast: "Period fast", 12, 1, 24;
p_slow: "Period slow", 26, 2, 52;
p_signal: "Period signal", 9, 0, 18;
p_bbperiod: "BB period", 10;
p_bbwidth: "BB width", 1;
End_input

return  (BBBot(PMACDeq(p_px, p_fast, p_slow ), 
p_bbperiod, p_bbwidth) + BBTop(PMACDeq(p_px, 
p_fast, p_slow ), p_bbperiod, p_bbwidth)) / 2;

PMACD_MTF_fast indicator:

Inputs
p_px: "Price field", Close;
p_fast: "Period fast", 12, 1, 24;
p_slow: "Period slow", 26, 2, 52;
p_signal: "Period signal", 9, 0, 18;
End_input

Var
X:= 21;
End_var

return PMACDeq( p_px, X * p_fast, X * p_slow );

PMACD_MTF_slow indicator:

Inputs
p_px: "Price field", Close;
p_fast: "Period fast", 12, 1, 24;
p_slow: "Period slow", 26, 2, 52;
p_signal: "Period signal", 9, 0, 18;
End_input

Var
X:= 5;
End_var

return PMACDeq( p_px, X * p_fast, X * p_slow );



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.
 
Reversing MACD
Tradecision Reviews
Video Tours
Ask a question

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-2017 Alyuda Research, LLC.  All rights reserved