Steve -- Copy and paste the code below at the end of your system. Next 'insert' indicator to see a new chart (it will be either empty or look just like the old chart. Right click on the new chart and select Parameters>Axis&Grid. Note the new Chart ID at the bottom of the box. Change 1405 in second line of code to your new Chart ID. If you don't want your old 'plot' displayed in this new chart, get the Chart ID for old chart and insert your old 'plot' statements in if(GetChartID()== (old Chart ID)){ old plot statements } The best part is that you don't even have to run a back test for this to work. However, be careful, it will use the "settings" and dates from the most recent AA that you run. You can overcome some of this with SetOption(), SetTradeDelays(), and a few others. (Gosh, I wish TJ would come up with one-and-only-one way of setting all the AA settings from within .afl code.) // plot Equity if(GetChartID()==1405){ // GraphXSpace=5; GraphZOrder=1; Plot( Equity(2, -2), "Equity", colorRed, styleThick); shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0 ); // now buy and hold simulation Short=Cover=0; // Buy=Status("firstbarintest"); // uncomment to display B&H from beginning of time. Sell=Status("lastbarintest"); ApplyStop(0,0,0,0); ApplyStop(1,0,0,0); ApplyStop(2,0,0,0); SellPrice = Close; // Correct SellPrice for buy and hold Plot( Equity( 0, -2 ), "Buy&Hold", colorBlue, styleThick); } sslack88 wrote: __._,_.___ Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- Re: [amibroker] Add chart to backtester report? Keith McCombs