PureBytes Links
Trading Reference Links
|
:In the omega arhive (see below ) Craig (Nelson?) posted on Fri, 04 Oct
:96 "My Favorite Stop Method" (see below).
:Anyone got the code for the "MAE"?
----------------------------------------------------------
Maximum Adverse Excursion and Maximum Favorable Excursion
by Pierre Orphelin
{Indicator; MAE/MFE}
vars:mp(0),eqt(0),eprix(0),mae(0),mfe(0),memmae(0),memmfe(0),temp(0);
mp=I_MarketPosition;
eqt=I_OpenEquity;
if mp<>mp[1] and absvalue(mp[1])=1 then begin
eprix=eqt;
mae=0;
mfe=0;
if mae[1]<memmae then memmae=mae[1];
if mfe[1]>memmfe then memmfe=mfe[1];
end else begin
temp=eqt-eprix;
if temp>mfe then mfe=temp;
if temp<mae then mae=temp;
end;
plot1(-memmae,"MAE");
plot2(memmfe,"MFE");
plot3(-mae,"mae");
plot4(mfe,"mfe");
|