Howard - as usual, thank you so much for your thoughts - a couple of questions:
1. The Equity() function, as I've read, only calculates the equity of current symbol, not the portfolio - so in the manual it says you need to use the custom backtester to access portfolio equity. My issue with this is that if you access the ~~~Equity symbol, it actually represents the equity of the last run, not the current run. 2. In your example, aren't you filtering based on the equity curve? I'm curious what you mean by shadow equity in this case. 3. Is this covered in your book? That would give me another reason to purchase it! Thanks in advance! --- In [email protected], "Howard B" <[EMAIL PROTECTED]> wrote: > > Greetings -- > > See if this helps: > > ///////////////////////////////////////////// > // EquityCurveFilter.afl > // > // Howard Bandy > // October 2008 > > > MALength = Param("MALength",5,1,100,1); > > Buy = Cross(C,MA(C,MALength)); > Sell = BarsSince(Buy) >= 5; > > e = Equity(); > > EquityFilter = ROC(e,5)>0; > > Buy = Buy AND EquityFilter; > > Buy = ExRem(Buy,Sell); > Sell = ExRem(Sell,Buy); > > ef = Equity(); > > Plot(C,"C",colorBlack,styleCandle); > Plot(e,"e",colorGreen,styleLine|styleLeftAxisScale); > Plot(ef,"ef",colorBlue,styleLine|styleLeftAxisScale); > ////////////////////////////////////////// > > Trading the equity curve is essentially the same as trading a price series. > Apply any indicator you want to the daily equity. > > With a little more complexity, you can wait for trades to exit normally, > then use the equity curve filter to allow or block the next signaled trade. > Keep track of the "shadow equity" to determine when to resume trading. > > Thanks, > Howard > > > > On Sun, Oct 5, 2008 at 7:43 AM, droskill <[EMAIL PROTECTED]> wrote: > > > I'm trying to create a system that uses the equity curve to make > > determinations of what trades to take. I understand I need to use the > > custom backtester - but I could really use an example if anyone has > > one lying around. Any help greatly appreciated! > > > > > > >
