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

[amibroker] MaxOpenPositions Exceeded



PureBytes Links

Trading Reference Links

Hello,

I have an EOD trading system applied to a pool of thousands of 
stocks. The system looks like:

SetOption("MaxOpenPosition",Pos);
Buy = "  "
buyprice= " "  // entry on limit price, not open or close
Sell= "  "
SellPrice= C;
Applystop (1,1,profit,1,false,1)  )    //this is a profit stop

I allow single bar trades.  For some bars,  I am seeing cases where 
the MaOpenPosition is exceeded. It appears that AmiBroker is not 
treating the single bar trades as an open position. It also might be 
that it is not treating the profit stops properly.  If a stock gaps 
up overnight, and my stop is hit on the opening price, I expect that 
to free up cash for that day. If, however, a profit stop is hit 
during the day, there is no way for AmiBroker to know when that stop 
is hit (EOD data), so I expect that cash to be tied up for the bar.

Any suggestions how to resolve this? Any test that I should do?

Thanks,

Mtrade




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