| 
 PureBytes Links 
Trading Reference Links 
 | 
  
Hello, 
 
You are using wrong settings. 
 
> Contract number is 800 
 
That is wrong. No forex broker would allow you to open 800 lots. 
 
You should use SetPositionSize( 1, spsShares ); to ensure you are
trading one lot 
(or what every lots you really trade). 
 
You need to read this: 
http://www.amibroker.com/kb/2006/08/09/amibroker-for-forex/ 
 
Best regards, 
Tomasz Janeczko 
amibroker.com 
 
On 2010-02-02 18:37, İlhan Ketrez wrote:
  
   
   
Hello, 
   
I am a registered user of Amibroker and have sent this problem to
Amibroker support before sending to the mailgroup. 
By now, more than one week has passed and there is no reply. 
   
I still do not want to believe that Amibroker cannot perform a correct
futures/forex bactest and I am afraid of hearing that it can't.
However, to me, my tests clearly indicate that there's something wrong
with the default behaviour of "futures mode" backtesting. Shortly, you
open a position, and as the position be exhausted you still have cash
in your account. Even after the position size goes below zero, you
still have cash and may open a position if you code accordingly.
Ability of the position size to go below zero may just be another
discussion topic. There is no such account in real life. Normally, the
position size does not change if the position is a winner and if the
position is a loser, it consumes the cash first, then consumes itself
down to the maintenance margin where the broker liquidates the position. 
   
All in all, my request from Amibroker stuff is to either invalidate
my comments by writing a few sentences or clearly
accept that Amibroker cannot perform a correct futures backtest
and stop misleading people.  
   
Best regards, 
Ilhan 
   
   
  2010/1/28 İlhan Ketrez  <ketrezilhan@xxxxxxxxx>
  
     
    
    
    [Attachment(s)
from =?UTF-8?Q?=C4=B0lhan_Ketrez?= included below]
    Dear friends 
     
    I am trying to test a simple system and understand the
behaviour of Amibroker testing mechanism. 
    I have set up an AFL file very similar to the one described here. 
     
    Testing period: 01.01.2008 - today 
    Initial equity: 1,000,000 
    Final equity: -38,033,810 
     
     
The position size is -80. 
Margin deposit: 1000. 
First entry details are as follows: 
Contract number is 800 
Entry position size: 800,000. Cash: 200,000. 
     
The details I find interesting are: 
As the position grows position size also grows and cash continues as
200,000. 
Later, position size goes below zero as cash floats constantly above
zero. 
The default result in Amibroker is something impossible to encounter in
real life. (To go into a debt of 38 million) 
I defined a real cash value and observed the difference via debugview.  
     
     
    Report and debugview log are attached including the
system codes. 
     
I hope to find a way to test correctly using Amibroker with your help. 
Thank you very much in advance. 
     
Regards, 
Ilhan Ketrez 
     
     
     
     
     
   
   
   
   
   
  
 
 
    
    
 
__._,_.___
  
**** 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/ 
 
  
     
    
 
      
   
__,_._,___
 |   
 |