[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Question About MAE/MFE?



PureBytes Links

Trading Reference Links


-----Message d'origine-----
De : Ryugan Mizuta [mailto:trend456@xxxxxxxxxxx]
Envoyé : lundi 28 juillet 2003 17:00
À : omega-list@xxxxxxxxxx
Objet : Question About MAE/MFE?


I'm trying to create better stops and profit targets for my systems and
decided to use MAE and MFE. I'm looking for a EL code or anything that links
to tradestation so that I can automate this process.  If anybody has any
suggestions please send me a reply.

Thank you.

Ryugan M

Here it is:

Note: In a signal replace "IOpenEquity" by
"Grossprofit+grossloss+openpositionprofit"
and "I_MarketPosition" by "MarketPosition";

vars:mp(0),eqt(0),eprix(0),mae(0),mfe(0),memmae(0),memmfe(0),temp1(0),temp2(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
	value1=eqt-eprix+(h-c)*BigPointValue;
	value2=eqt-eprix+(c-l)*BigPointValue;
	temp1=maxlist(value1,value2);
	temp2=minlist(value1,value2);
	if temp1>mfe then mfe=temp1;
	if temp2<mae then mae=temp2;
end;

plot1(-memmae,"MAE");
plot2(memmfe,"MFE");
plot3(-mae,"mae");
plot4(mfe,"mfe");

Sincerely,

Pierre Orphelin
www.sirtrade.com
Tradestation 2000i, TradeStation 7 sales and support
Safir-X, neurofuzzy logic trading system builder

To subscribe to our FREE trading system newsletter:
http://www.sirtrade.com/newsletter.htm