PureBytes Links
Trading Reference Links
|
This topic comes up from time to time. Here are some resources for you:
In the files section of this group, read this doc: AB Backtester Basics.doc
For more detailed discussion on Forex backtester settings, read this thread:
http://finance.groups.yahoo.com/group/amibroker/message/134138
I also trade, and backtest Forex, and set most backtester options in AFL. these are the settings I have found useful at the top of my code, to mimic Interactive Broker's Forex trading:
Use this in Futures Mode,and make sure that Symbol Information --> Currency is set to USD for EUR.USD and to JPY for USD.JPY:
SetBarsRequired ( 10000 , 0 );
SetOption ( "AllowPositionShrinking" , False);
SetOption ( "AllowSameBarExit" , True);
SetOption ( "FuturesMode" , 1 );
SetOption ( "InitialEquity" , 100000 );
SetOption ( "InterestRate" , 0 );
SetOption ( "MaxOpenPositions" , 1 );
SetOption ( "MinPosValue" , 0 );
SetOption ( "MinShares" , 100000 );
SetOption ( "PriceBoundChecking" , True);
SetOption ( "ReverseSignalForcesExit" , False);
SetOption ( "UsePrevBarEquityForPosSizing" , False );
SetTradeDelays ( 0 , 0 , 0 , 0 );
SetPositionSize ( 100000 , spsShares );
MarginDeposit = - 2.5 ;
PointValue = 1;
Note that for some reason, we cannot set commissions in AFL with the above, and still have it work properly:
SetOption ( "CommissionMode" , 3 );
SetOption ( "FuturesMode" , 1 );
Therefore, simply set commissions in AA settings table.
For brokers other than IB, these settings, or some variation thereof might work.
--- In amibroker@xxxxxxxxxxxxxxx, "bigitop" <doctormuniz@xxx> wrote: > > I've used this guide to set up AB for forex > http://www.amibroker.com/kb/2006/08/09/amibroker-for-forex/ > > I'm getting disparate results in the backtester results: wrong positions > sizes, wrong profits, wrong number of contracts, etc... > > The backtester settings I have: > > 1. Initial equity: 5000 > 2. Forex Mode is on > 3. Round Lot size: 1 > 4. Tick size: 0.0001 > 5. Account Margin: 4 > > So in the results I'm getting for the first trade: > > 1. From entry price to exit price there's an 0.0008 (8 pips) difference > 2. Position value: 125,000 (this is correct) > 3. Contracts: 125 (this should be 1.25 as one lot is 100,000) > 4. Profit: 10,000 (this should be $100, not 10,000) > > In the symbol settings: > > 1. round lot size = 1 > 2. tick size = 0.0001 > 3. margin deposit = 1,000 > 4. point value = 100,000 > > Which of these settings am i not getting correct?? > > thanks for your help. >
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|