MACD price projection line

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

MACD price projection line

Postby fortcentral » Sun Jan 13, 2019 9:53 am

Indicator: Moving Average Convergence/Divergence (MACD) price-projection line

The MACD price projection line projects a calculated closing price, one period forward. This is a type of trendline. The calculation for the price-projection line uses the MACD Indicator with decimal point calculation noted below and calculates the pricepoint one period ahead, where the MACD and signal line would cross. The projected line is an overlay on the price chart to indicate where current price is compared to the price-projection line.

Thanks,
Fortcentral

-------------------------------------------------------------------------------------------------------
This indicator uses the Moving Average Convergence/Divergence (MACD) with decimal point calculation
(viewtopic.php?f=17&t=60055&p=112972&hilit=macd+with+decimal#p112972)
-------------------------------------------------------------------------------------------------------

--> Price Source: Bars

Calculation for Exponential Moving Average (EMA)
EMA(time) = {[(1-SF)*EMA(time-1)] + [SF*Price(time)]}

Calculation for Smoothing Factor
SF = [2/(n.period+1)]

Note:
1) EMA(time) is the current time-period Exponential Moving Average value
2) EMA(time-1) is the previous time-period Exponential Moving Average value
3) SF is the smoothing factor for the EMA calculation
4) Price(time) is the current time-period closing price of price-bar
5) "n.period" is the total number of bars used in the calculation, i.e. the lookback period --> this could be a decimal value.
6) The smoothing process for the EMA calculation is started by letting EMA(1)=P(1) and calculating the next value EMA(2)=[(1-SF)*EMA(1)]+[SF*P(2)].


--> User Input Parameters:
1) EMA1(n.period) - decimal lookback period for the first EMA line calculation. Default value -> "8.3896"
2) EMA2(n.period) - decimal lookback period for the second EMA line calculation. Default value -> "17.5185"
3) SL(n.period) - decimal lookback period for signal line calculation. Default value -> "9.0503"
4) Option for choosing line thickness, style and colour for MACD price projection line

Calculation MACD:
EMA1(time) = [(1-SF1)*EMA1(time-1) + SF1*Price(time)]
EMA2(time) = [(1-SF2)*EMA2(time-1) + SF2*Price(time)]
MACD(time) = [EMA1(time)-EMA2(time)]
SL(time) = [(1-SF3)*SL(time-1) + SF3*MACD(time)]

*************************************************************************************************
--> Calculation for MACD Price Projection line
P.Price(time+1) = {{[SL(time)]-[(1-SF1)*EMA1(time)]+[(1-SF2)*EMA2(time)]}/(SF1-SF2)}

*************************************************************************************************

Note:
1) P.Price(time+1) is the projected closing-price for the next time-period -> the next value for the MACD price-projection line.
2) EMA1(time) and EMA2(time) are the two Exponential Averages' current time-period values, based on the EMA formula above.
3) EMA1(time-1) and EMA2(time-1) are the two Exponential Averages' previous time-period values
4) SF1 is the smoothing factor for the EMA1 calculation. The smoothing factor is derived using the formula above.
5) SF2 is the smoothing factor for the EMA2 calculation. The smoothing factor is derived using the formula above.
6) Price(time) is the current period closing price of price-bar
7) MACD(time) is the current time-period MACD value
8) MACD(time-1) is the previous time-period MACD value
9) SL(time) is the current time-period Signal-Line value
10) SL(time-1) is the previous time-period Signal-Line value
11) SF3 is the Signal-Line smoothing factor
fortcentral
 
Posts: 47
Joined: Wed Oct 17, 2018 9:34 am



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 40 guests