Hello,

No, it is not a bug. 

Depending on settings AB may not be able to open position of requested size.

For example if you have turned off "Allow Position Size Shrinking" it may not 
be able
to open position with desired round lot and min. shares not exceeding available 
equity.

So it is recommended to turn ON (it is tuned on by default) "Allow Position 
Size Shrinking"
or adjust position size or other settings (round lot size, min shares, etc) to 
allow position to be opened.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Chris" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, June 11, 2006 8:09 PM
Subject: [amibroker] Re: Margin Bug?


I'm not controlling the margin in code, but with the Settings button 
in the Automatic Analysis window. I think this is a legitimate bug.

--- In [email protected], "Terry" <[EMAIL PROTECTED]> wrote:
>
> If you're controlling the margin with code you need to adjust the
> positionsize too. If margin = 50 then Positionsize = -200
> 
> Some actual code;
> 
> margin = 50; //or use param statement
> SetOption("MarginRequirement",margin);
> leverage = 100/margin; //defines leverage
> PositionSize = PositionSize * leverage;
> --
> Terry
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] 
On
> Behalf Of Chris
> Sent: Saturday, June 10, 2006 20:10
> To: [email protected]
> Subject: [amibroker] Margin Bug?
> 
> I have written a script to simulate buy and hold:
> 
> Buy = 1;
> Sell = 0;
> 
> I have tried this script using various account margin settings. 
Using 
> 50% margin the results are as predicted. Using a margin setting >= 
> 56.1, the system does not trade.
> 
> Has anyone else encountered this?









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 other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links



 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

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


Reply via email to