PureBytes Links
Trading Reference Links
|
Stephane:
Thanks, I have quite a reference library of your old messages that help..I
should refer to them before asking questions.
Here is a question:
In older messages the equity function is stated as
Eq=scEquityLong(Buy,Sell,BuyPrice,SellPrice,cost);
In this message it is stated as:
scCEquityLong(Buy,Sell,C,C,0);
I assume it was just faster to type C instead of BuyPrice, ditto SellPrice
and cost=0.
The function in the latest update appears to have a typo--
scCEquityLong instead of the previous scEquityLong. No big deal but folks
may stumble over this if they refer to an old message or an old code that
does not have the new, extra "C".
Other terms in the AFL code are not defined and are confusing but I assume
they are in the dll code and are not to be worried about....(I worry a
little because I want to trade real money using these tools).
What is "trade"?
What is Ep? -- Entry Price I assume.
What is WgtAE weighted with? Does it matter to know this?
What is "Ib" and "Lb"?? again, I probably don't want to know.
Some say that you need to know every tiny detail of code that you use to
trade; others say, it is not necessary to know the details, only understand
the output effects of the code.
Thanks as usual for good time saving creations that help us all use AB.
Ken
-----Original Message-----
From: nenapacwanfr [mailto:nenapacwanfr@x...]
Sent: Tuesday, June 25, 2002 11:33 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Maximum Profit in Trades Closed at a Loss
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.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|