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

Re: [amibroker] Re: Backtesting for Oanda



PureBytes Links

Trading Reference Links

There is a afl code

/* Backtester Settings*/
SetOption("initialequity", 1000);
SetOption("FuturesMode" ,True);
SetOption("ActivateStopsImmediately",0);
SetOption("PriceBoundChecking", 0);

/*Contract Specifications*/
ContractSize = 1;
Leverage = 50;
PointValue = ContractSize;
MarginDeposit = C * ContractSize / Leverage;
TickSize = 0.0001;

/*Trade Entry*/
Buy = Cross( RSI(), 30 );
Short = Cross( 70, RSI() );
BuyPrice = ShortPrice = C;

/*Trade Exit*/
Sell= Cover=0;
ApplyStop(stopTypeLoss,stopModePoint,20*TickSize,1);
ApplyStop(stopTypeProfit,stopModePoint,20* TickSize,1);

// Trade Size:  10000 units
SetPositionSize( 10000, spsShares );



in symbol information grid:
Contract specification:
RoundLotSize: 1
MarginDeposit: 0
Tick Size: 0.0001
PointValue: 1

Which other setting are you need?





2009/1/8 Aron <aron.groups@xxxxxxxxx>:
> Piotr Rysak wrote:
>
> Thanks for answer.
>
> I try to use your setup, but I still have a problem.
>
> There is a my result.
>
> Trade list
> Ticker Trade Entry Exit % change Profit Shares Pos. value Cum. profit
> # bars Profit/bar MAE/MFE Scale In/Out
> AUDUSD Long (profit) 2008-05-29 10:21:00 0.9605 2008-05-29 10:23:00
> 0.9607 0.02% -0.02 -140.74% 1 0.01 -0.02 3 -0.01 -0.05% 0.02% 0/0
> AUDUSD Long (profit) 2008-05-29 10:35:00 0.9592 2008-05-29 10:36:00
> 0.95941 0.02% -0.02 -69.59% 2 0.03 -0.04 2 -0.01 -0.05% 0.02% 0/0
> AUDUSD Long (max loss) 2008-05-29 15:04:00 0.9594 2008-05-29 15:06:00
> 0.9592 -0.02% -0.02 -72.50% 2 0.03 -0.06 3 -0.01 -0.05% 0.04% 0/0
> ....
>
> Probably I have somwhere set something wrong.
> Any suggestion ?
>
> PR
>
>
>
> Post your code and settings
> make sure you have correct value for Ticksize
>
>
> 

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

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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/