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

Re: [amibroker] Blau: TSI & Ergodic Oscillator



PureBytes Links

Trading Reference Links

Dear Ed,

Many thanks, will check out static variables.

Cheers,
Keith

On 4/19/07, Edward Pottasch < empottasch@xxxxxxxxx> wrote:

code in the active window will execute at every refresh. When data comes in the charts is refreshed. Therefor you need to work with static variables.  Herman wrote some code that you can use as an example. It can be found in the files section of the Yahoo Amibroker-at group, see ER2 Project 01-12-2006
 
 
Ed
 
 
 
 
----- Original Message -----
From: Keith Kee
Sent: Wednesday, April 18, 2007 7:23 PM
Subject: Re: [amibroker] Blau: TSI & Ergodic Oscillator

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
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___