+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

MACD System

An efficient MACD System developed within Amibroker AFL tracks momentum and identifies trend shifts. Using amibroker data feed functionalities, traders can design a comprehensive system based on MACD crossovers, histogram variations, or divergences to trigger trading signals. The key advantage of employing Amibroker AFL is the ability to backtest strategies rigorously using historical data feeds, allowing traders to refine and optimize the MACD System for consistent performance.

/
eq=Param("0 equity",1,0,1,1);
n=Param("1 profit",2.5,0.1,10,0.1);
b=Param("2 media breve",2,1,50,1);
m=Param("3 media lunga",5,1,50,1);
s=Param("4 segnale",3,2,50,1);




ppo=( (EMA(C,(b))) -EMA(C,(m)) ) /EMA(C,(m))*100 ;
signa=EMA(ppo,(s));
PositionSize=-100;
Buysetup=Cross(ppo  ,Signa);
Shortsetup=Cross(Signa,ppo);
Buysetupvalid=Flip(Buysetup,Shortsetup);
Shortsetupvalid=Flip(Shortsetup,Buysetup);

Buy=Cover= Ref(Buysetupvalid,-1)==1  AND H>ValueWhen(buysetup,H)+0.02;

BuyPrice=CoverPrice=IIf(O>ValueWhen( buysetup==1,H),O,ValueWhen( buysetup==1,H) +0.02)    ;


Short=Sell=Ref(Shortsetupvalid,-1)==1  AND LValueWhen (buysetup, H) +2; 

BuyPrice=CoverPrice=IIf (O>ValueWhen (buysetup==1, H), O+1, ValueWhen (buysetup==1, H) +2+1); 

Short=Sell=Ref (Shortsetupvalid, - 1) ==1 AND L

Open chat
1
Hi, how can I help you?