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

[amibroker] Re: What's the easiest way to check for bar time?


  • Date: Sun, 03 Jan 2010 18:55:53 -0000
  • From: "dotnetsdkforab" <dotnetsdkforab@xxxxxxxxx>
  • Subject: [amibroker] Re: What's the easiest way to check for bar time?

PureBytes Links

Trading Reference Links

Hi,

this is almost perfect, but it will output the debug info at each AFL execution while in the bar at midnight...

To avoid this you have to block subsequent executions.

if (TimeNum() == 000000)  // run while in the midnight bar
{
    MyBlockingVar == LastValue(DateNum));
    if (Nz(StaticVarGet("MyBlockingVar"), 0) != MyBlockingVar)
    {
        // Do your stuff here. It will run once a day at midnight
        StaticVarSet("MyBlockingVar", MyBlockingVar);
    }
}
 
Regards,

DotNetSDKforAB


--- In amibroker@xxxxxxxxxxxxxxx, "Neil Wrightson" <neilw@xxx> wrote:
>
> Hi,
>  
> How about 
> if (TimeNum() == 000000)
> {
>     // output debug
> }
> 
> Regards, 
> 
> Neil Wrightson. 
> 
>  
> 
>   _____  
> 
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
> Of Potato Soup
> Sent: Sunday, 3 January 2010 3:20 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] What's the easiest way to check for bar time?
> 
> 
>   
> 
> 
> I would like to output some debug text whenever a bar hits midnight. What's
> the easiest way of doing this? I see so many time functions in the help
> files that it's a bit overwhelming on where to start.
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/