Amazing but true....the simple code I posted earlier in this thread no longer works. I have not made any changes that I can remember (other than turning off computer and restarting this morning). This most simple code will not produce any equity results, either by using the Equity() command or by switching to the AA window and running a Backtest. Oh, yes, I tried the parameters suggested by the Help files (Equity(0,0), but then set it back to Equity().
The test code could not be more simple. The Buy and Sell arrays have signals (arrows plot fine), but no trades are made. I have checked Parameters (there are none); Settings (they have not changed and other backtests perform fine); I have rebooted the computer twice (I am not sure how to "flush the cache" as TJ instructions frequently, but would guess that rebooting would do so). Nothing I have tried can produce trades in this simple code. Anyone have a suggestion? Ken This happens once or twice in a year and is totally frustrating and makes you want to give up trying to program...but then the solution is pointed out, and on you go....please help. Code reproduced again so you dont have to scroll: SetChartOptions(chartShowDates,2); E5 = EMA(C,5); E45 = EMA(C,45); Buy = Cross(E5,E45); Sell = Cross(E45,E5); PlotShapes(Buy*shapeUpArrow,colorGreen); PlotShapes(Sell*shapeDownArrow,colorRed); Eq = Equity(); Plot(Eq,"Equity",colorBlue,styleLine); ================================================= --- In [email protected], Ken Close <[EMAIL PROTECTED]> wrote: > > Many thanks TJ and Keith. I just missed the range parameter....:( > > Ken > > _____ > > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > Of Tomasz Janeczko > Sent: Monday, March 26, 2007 5:09 PM > To: [email protected] > Subject: Re: [amibroker] Equity() Command > > > Ken, > > Equity without any parameters uses LAST BACKTEST settings (including the > range), > so if his settings are for example 1 last bar - then the backtest will be > performed on last one bar only. > > Instruct your friend to adjust settings in AA window (and run backtest). > > Alternativelly provide PARAMETERS to Equity() to override analysis range. > http://www.amibroker.com/f?equity > > And no, you don't need to run backtest everyday. > > Best regards, > Tomasz Janeczko > amibroker.com > > ----- Original Message ----- > From: Ken Close <mailto:[EMAIL PROTECTED]> > To: [email protected] > Sent: Monday, March 26, 2007 8:45 PM > Subject: [amibroker] Equity() Command > > I understood the Equity() command to act as a builtin Backtest. > > Accoringly, I create the following simple code to create and plot the > Equity. > > E5 = EMA(C,5); > > E45 = EMA(C,45); > > > > Buy = Cross(E5,E45); > > Sell = Cross(E45,E5); > > PlotShapes(Buy*shapeUpArrow,colorGreen); > > PlotShapes(Sell*shapeDownArrow,colorRed); > > Eq = Equity(); > > > > Plot(Eq,"Equity",colorBlue,styleLine); > > > I loaded this into the Indicator Bulder, and applied it and got my Equity > plot. No other steps required. > > I shared the code with a friend. He did the same thing, applied it, and got > an {Empty} array and no plot. > He loaded the code into the AA window, clicked Backtest, and the plot of > Equity appeared. > > Question: why did the same code act differently? Next, will it be > necessary to run the backtest every day to update the Equity curve? > > Insights and suggestions will be appreciated. > > Thanks, > > Ken >
