Sorry for the confusion. Hopefully this will be more comprehensive. If you scroll through these two posts, you should get a solid understanding:
This first one starts off with another question, but later in the thread Tomasz answers about Forex settings: http://finance.groups.yahoo.com/group/amibroker/message/134138 and then again in a more direct post: http://finance.groups.yahoo.com/group/AmiBroker-at/message/4107 Here is a summary, based on my understanding, but you should really go through the above two posts: For Interactive Brokers forex : 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", 1000); SetOption("InterestRate",0); SetOption("MaxOpenPositions", 1); SetOption("MinPosValue", 0); SetOption("MinShares", 20000); SetOption("PriceBoundChecking", True ); SetOption("ReverseSignalForcesExit", False); SetOption("UsePrevBarEquityForPosSizing", False ); SetTradeDelays(0, 0, 0, 0); SetPositionSize( 20000, spsShares ); // min lot at Interactive Brokers MarginDeposit = -1.0; // 100: 1 leverage, 1% Note that for some reason, we cannot set commissions in AFL with the above, and still have it work properly. Therefore, simply set commissions in AA settings table, under Settings. Note that IB leverage is actually 2.5%, so the above margin of 1% will not be an accurate backtest For brokers other than IB, these settings, or some variation thereof should work: SetBarsRequired(10000, 0); SetOption("AllowPositionShrinking", False); SetOption("AllowSameBarExit", True); SetOption("CommissionAmount", 2.50); SetOption("CommissionMode", 3); SetOption("FuturesMode", 1); SetOption("InitialEquity", 1000); SetOption("InterestRate",0); SetOption("MaxOpenPositions", 1); SetOption("MinPosValue", 0); SetOption("MinShares", 1); SetOption("PriceBoundChecking", True ); SetOption("ReverseSignalForcesExit", False); SetOption("UsePrevBarEquityForPosSizing", False ); SetTradeDelays(0, 0, 0, 0); SetPositionSize(1, spsShares); TickSize = 0.0001; // The minimum price move of symbol for Forex PointValue = 20000; // Each mini lot is 20,000 RoundLotSize = 1; MarginDeposit = 1; // 100:1 leverage. --- In [email protected], "gabriel...@..." <fina...@...> wrote: > > ok.. thx for reply.. but was not much help.. because i told, i > already know that page.. and also i know that little tutorial (AB > Backtester Basics).. from both sources i took that options.. from my > previous message.. > > My question was how can i set for 10K lots size.. instead 100K lots > size... > > > > --- In [email protected], "ozzyapeman" zoopfree@ wrote: > > > > It's all answered here: > > > > http://www.amibroker.com/kb/2006/08/09/amibroker-for-forex/ > > > > and there is no setoption for slippage. > > > > > > --- In [email protected], "gabriel_id@" <finance@> wrote: > > > > > > Hi there, > > > > > > Until now.. from what i understood.. for forex this settings will > > > work.. on 100.000 lot with 10$ point value and with 100% margin, > > > initial capital 1000$.. and of course the spread of 2 pips in this > > > example.. > > > > > > SetOption("InitialEquity", 1000); > > > SetOption("FuturesMode",1); > > > RoundLotSize = 1; > > > MarginDeposit = 100; > > > TickSize = 0.0001; > > > PointValue = 100000; > > > Spread = 2; > > > SetOption("CommissionMode",3); > > > SetOption("CommissionAmount", 0.5 * Spread * TickSize * PointValue); > > > > > > How can i apply the 10K lot size.. not the 100K .. only by decrease > > > PointValue to 10000 ? > > > > > > And also the slippage.. there is no option like the commission !? > > > > > > > > > Thank you, > > > GV > > > > > >
