need afl for special MACD PLOT-hint included

#1
hi friends
here is a code concept for special macd plot.
need afl for same.
thanks



HTML:
/*MOMENTUM DIVERGENCE
The following is a “translation” of the Easy Language Code for Momentum  Divergence 
into MetaStock’s Formula Language I’ve added some {notes}.  
I’ve created 2 separate MetaStock Functions (Indicaors) one for Close, the other for MACD. 
 It enables me to identify them more readily. However, you must be absolutely sure
 you have the same LBP for both the Close AND MACD plots!!!!  To get both plots into the same window simply drag them in. 


if you are going to be using these in Explorations, AND you are going to be using both the 15 AND 40 period divergences,
 create separate indicators for each. (eg  Diverge15 AND Diverge40) where each has the appropriate default period. 
The Explorer uses the default value.  I add the Buy Zone AND Sell Zone lines apart from the Plot. 
It enables me to control them independently.

{Close Plot - Creates Plot1}

LBP:=Input("Look Back Period",5,200,15);
{The above default is 15. 5 to 200 are available settings.}
CloseValue:=if(HHV(Close,LBP)-LLV(Close,LBP)<>0,HHV(Close,LBP)-LLV(Close,LBP),50);
ClosePlot:=100*(Close-LLV(Close,LBP))/CloseValue;
ClosePlot;


{MACD Plot - Creates Plot2}

FastMA:= Input("FastMA periods",5, 200, 12);
SlowMA:= Input("SlowMA periods",5, 200, 26);
LBP:=Input("Look Back Period",5,200,15);
MyMACD:=Mov(Close,FastMA,E)-Mov(Close,SlowMA,E);
{Above line required because MS doesn’t permit changes to the MACD moving average periods in its built-in MACD function.  I’m using exponential moving averages.}
MACDvalue:=
if(HHV(MyMACD,LBP)-LLV(MyMACD,LBP)<>0,{THEN}
HHV(MyMACD,LBP)-LLV(MyMACD,LBP), {else}
50);
MACDplot:=100*(MyMACD-LLV(MyMACD,LBP))/MACDvalue;
MACDplot;
*/
 

Similar threads