[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: HELP - Backtest on Minute Data vs Daily



PureBytes Links

Trading Reference Links

(1) How do I get the backtest to run on the one-minute data, not 
daily?

THIS IS SET IN AUTOMATIC ANALYSIS>SETTINGS

(2) Is there a quick and easy way to automatically plot the buy/sell 
points so I can view the entry and exit positions on the graph?

AFTER BACKTEST, RIGHT CLICK ON THE RESULTS IN THE AUTOMATIC ANALYSIS 
WINDOW AND SELECT THE OPTION YOU DESIRE TO HAVE SHOWN. MAKE SURE YOUR 
PRICE PLOT BUY/SELL ARROWS ARE ENABLED BY RIGHT CLICK ON 
PLOT>PARAMETERS MENU

(3) Does the backtest engine choose close prices for the entry and 
exits? If so, is this realistic, given that the high/low within each 
bar can often be plus or minus several PIPs away from the actual 
close?

YOU SPECIFY BUYPRICE & SELLPRICE AND BUY/SELL DELAYS IN SETTINGS. SO 
IF YOU HAVE BUY DELAY = 1 AND THE BUYPRICE = OPEN, YOUR TRADE ENTRY 
WILL BE THE NEXT BARS OPEN AFTER THE CROSS OVER.

Hope this helps
Larry

--- In amibroker@xxxxxxxxxxxxxxx, "ozzyapeman" <zoopfree@xxx> wrote:
>
> I'm still at the early phase of learning AmiBroker and am trying to 
code
> my first easy test system.  It's the example EMA crossover system 
given
> in the User's Guide.
> 
> I have a one-minute chart open with  a year's worth of historical
> one-minute FOREX data (Euro-USD). After writing my formula, I click 
on
> Analysis. On the pop-up panel, I check off  "Run every 1 min" on all
> quotations. But when the back test runs, it runs on daily data 
instead
> of the one-minute data.
> 
> (1) How do I get the backtest to run on the one-minute data, not 
daily?
> 
> (2) Is there a quick and easy way to automatically plot the buy/sell
> points so I can view the entry and exit positions on the graph?
> 
> (3) Does the backtest engine choose close prices for the entry and
> exits? If so, is this realistic, given that the high/low within 
each bar
> can often be plus or minus several PIPs away from the actual close?
> 
> 
> Below is my code:
> 
> _SECTION_BEGIN("Price");
> 
> SetChartOptions(0,chartShowArrows|chartShowDates);
> _N(Title = StrFormat("{{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, 
Close
> %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C,
> SelectedValue( ROC( C, 1 )) ));
> Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
> ParamStyle("Style") | GetPriceStyle() );
> 
> if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
> {
>   ToolTip=StrFormat("Open: %g\nHigh:  %g\nLow:   %g\nClose:  %g
> (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC
( C,
> 1 )));
> }
> _SECTION_END();
> 
> /////////////////////////////////////////////////////
> // simplest buy sell rules;
> // Buy when the Close crosses above the 45-Day EMA;
> // sell when the 45-day ema crosses above the close;
> //////////////////////////////////////////////////////
> 
> Buy = Cross( Close, EMA( Close, 45 ) );
> Sell = Cross( EMA( Close, 45 ), Close );
> SetPositionSize(5,spsShares);
>



------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/