PureBytes Links
Trading Reference Links
|
hello,
This is what I use ( you need the latest version of plugin),
I think that
Buy = Cross(MACD(),Signal());
Sell= Cross(Signal(),MACD());
BuyPrice=Close;
SellPrice=Close;
scCEquityLong(Buy,Sell,C,C,0);
////////////STATS//////////////////////
AE= IIf( Hold(Trade,2) ,abs(Ep-LowestSince(Buy ,L)),0);
FE= IIf( Hold(Trade,2),abs(Ep-HighestSince(Buy ,H)),0);
WinAE = IIf((Sell OR Lb) AND Gain>0,AE,0);
WgtAE= IIf((Sell OR Lb) AND Gain>0 AND AE<FE,AE,0);
LosAE = IIf((Sell OR Lb) AND Gain<=0,AE,0);
WinFE = IIf((Sell OR Lb) AND Gain>0,FE,0);
WinMAE = HighestSince(Ib,WinAE,1);
/* Maximum Adverse Excursion of Winning trade*/
LosMAE = HighestSince(Ib,LosAE,1);
/* Maximum Adverse Excursion of Losing trade*/
MFE = HighestSince(Ib,WinFE,1);
/* Maximum Favorable Excursion*/
WgtMAE = HighestSince(Ib,WgtAE,1);
/* Weighted Adverse Excursion*/
Plot(LosAe,"",8,1);//
must be what you write the
> - the highest (paper) profit reached in an open trade that
eventually closes
> for a loss;
> Ken, I have a set of HighestHigh/lowestlow excel fncs for qp2 that
will return the respective value in a date range. I can probably
locate them if that would be useful. I think they were derived from
a simple fcn in the qp2 group or perhaps even this list.
>
> It would be more interesting to find the equivalent functionality
in AB.
>
> Cordially,
>
> Richard
> ----- Original Message -----
> From: Ken Close
> To: AmiBroker List
> Sent: Tuesday, June 25, 2002 9:07 AM
> Subject: [amibroker] Maximum Profit in Trades Closed at a Loss
>
>
> Reread the subject line, as it is not quickly understood.
Tushar Chande
> says, in his 2nd edition book, that there is a lot of good
system evaluation
> data by looking at:
>
> - the distribution of max profits in all trades eventually
closed at a
> loss.
> - the distribution of max losses in all trades eventually
closed at a
> profit.
>
> I assume this to mean:
>
> - the highest (paper) profit reached in an open trade that
eventually closes
> for a loss;
> - the maximum (paper) drawdown or loss reached in an open trade
that
> eventually closes for a profit.
>
> How would one do this either within AB or in exported results
that are then
> manipulated in Excel??
>
> Some use of HHV or LLV between Buy and Sell signals, I would
guess.
> However, the trade report does not keep track of price movement
between
> entries and exits.
>
> Any ideas from the expert coders in the list??
>
> Thanks,
>
> Ken
>
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
|