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

Re: [amibroker] Re: Delayed buy/sell signals in Realtime.



PureBytes Links

Trading Reference Links

Run every works with SECONDS intervals too, for example: just type 5 sec in "run every field.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "liberte721" <daniel.laliberte@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, March 16, 2008 5:37 PM
Subject: [amibroker] Re: Delayed buy/sell signals in Realtime.


> After I wrote about this before, someone suggested a brilliant
> workaround.  Use "Run every", but with shorter time, and wrap your
> code with a conditional check for whether it is time to run.  I
> haven't implemented this yet (still testing my system), but I can
> think of two ways to do this.  
> 
> One way is to check whether the current time is past the start time
> but within the shorter time interval.  There might be a risk of
> missing a start time, however, if there is some delay longer than the
> shorter time interval.
> 
> Another way is, using a static variable, remember the last time a run
> was done, and if the current time is past the next start time, and the
> previous run was before that, then it is time for another run.  This
> would be more reliable.
> 
> dan
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "pmxgs" <pmxgs@xxx> wrote:
>>
>> Hi Dan,
>>  I agree with you. "Run every x minutes" might be misleading.
>>  Anyway regarding the main subject, as long as the scan doesn't take 5
>> minutes to run (which is perfectly possible, since AB runs fast), it
>> would be nice to write code (maybe using some script languae) to make
>> the scan run every five minutes. 
>> I think this is possible, but can you confirm Howard?
>> 
>> thanks
>> 
>> 
>> --- In amibroker@xxxxxxxxxxxxxxx, "liberte721" <daniel.laliberte@>
>> wrote:
>> >
>> > Note that if you are using the AA Scan "Run every:" 5 min, it will not
>> > run every 5 minutes, but delay 5 minutes between each run.  I
>> > complained about this as a bug - it is at least a UI design bug since
>> > it is not clear.  (It would be more useful if it actually did run on
>> > regular intervals, as soon as it could anyway, making noise if it runs
>> > out of time.)
>> > 
>> > I don't know about your delayed buy signals, which might be due to
>> > your broker.  But if you are estimating time of the order based on the
>> > number of intervals executed, then you will be out of sync.   If your
>> > 5 minute intervals take 3 minutes to run, then you will be delayed by
>> > about equivalent real time. 
>> > 
>> > Hope that helps.
>> > 
>> > dan
>> > liberte@
>> > 
>> > 
>> > --- In amibroker@xxxxxxxxxxxxxxx, "j_john66" <j_john66@> wrote:
>> > >
>> > > Hello, 
>> > > 
>> > >      I am trying to write AFL code to trade in realtime. 
>> > > 
>> > > The problem I am facing is this. 
>> > > 
>> > > I have a watchlist of around 150 stocks.  
>> > > 
>> > > Buy/sell signals for these stocks in the watchlist get generated 
>> > > using common indicators  MACD and stochastics  in a 5 minute 
>> > > timeframe on completed bars.    
>> > > 
>> > > I run this AFL after 10-15 minutes of market opening at regular 
>> > > intervals of 5 mins. ( each pass takes around 3 to 3.5 minutes )The 
>> > > system lists buy sell signals in the AA window. 
>> > > 
>> > > what happens is, buy sell signals for some stocks which actually
> get 
>> > > generated at a earlier time gets listed late.   ie., at 12:00PM
> I may 
>> > > get a buy sell signal for a stock to be bought /sold at 10:30 AM. 
>> > > 
>> > > What mistake I may be doing? Have any one faced such situations ? ( 
>> > > the current version of amibroker is 5.05 beta).
>> > > 
>> > > Thanks in Advance.
>> > > 
>> > > John.
>> > >
>> >
>>
> 
> 
> 
> ------------------------------------
> 
> 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
> 
> 
> 

------------------------------------

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/