PureBytes Links
Trading Reference Links
|
Dear all,
Many thanks for sharing your codes and experience. I am a newbie testing the trading system using ib controller with this code for buy as in the manual:
//trading system ibc = GetTradingInterface("IB");
if(ibc.IsConnected()) { if(LastValue(Buy)) { if(ibc.GetPositionSize(Name()) == 0) { ibc.PlaceOrder(Name(),"Buy",1,"MKT",0,0,"Day",True);
} } }
What I find is that more than 8 buy signals are produced.
I suspect that GetPositionSize() is not fast enough to report the actual position.
I would be grateful if anyone could help me code this so the buy condition will only be triggered once per bar, as is the case for arrows on the charts.
Thanks in advance.
Keith
On 18 Apr 2007 07:59:14 -0700, Roger <rogerz@xxxxxxxxxxx
> wrote:
Thanks Don for sharing. Very nice indicator!
Roger
__._,_.___
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
SPONSORED LINKS
__,_._,___
|