<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments for AmiBroker Users' Knowledge Base</title>
	<atom:link href="http://www.amibroker.org/userkb/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amibroker.org/userkb</link>
	<description>Share your experience, code and everything with other AmiBroker Users'.</description>
	<pubDate>Sat, 20 Mar 2010 21:41:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Comment on High-Precision Delay and Interval Timing by Herman</title>
		<link>http://www.amibroker.org/userkb/2007/11/10/high-precision-delay-and-interval-timing/#comment-18859</link>
		<dc:creator>Herman</dc:creator>
		<pubDate>Wed, 22 Apr 2009 16:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/2007/11/10/high-precision-delay-and-interval-timing/#comment-18859</guid>
		<description>Correct, however the final practical result for the non-technical user is that we cannot expect consistently accurate timing in a Window's task-switching environment. My comment was intended to caution users that actual readings may vary significantly for many different reasons - I have never yet seen stable readings.</description>
		<content:encoded><![CDATA[<p>Correct, however the final practical result for the non-technical user is that we cannot expect consistently accurate timing in a Window&#8217;s task-switching environment. My comment was intended to caution users that actual readings may vary significantly for many different reasons - I have never yet seen stable readings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on High-Precision Delay and Interval Timing by Tomasz Janeczko</title>
		<link>http://www.amibroker.org/userkb/2007/11/10/high-precision-delay-and-interval-timing/#comment-18857</link>
		<dc:creator>Tomasz Janeczko</dc:creator>
		<pubDate>Wed, 22 Apr 2009 15:32:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/2007/11/10/high-precision-delay-and-interval-timing/#comment-18857</guid>
		<description>"Do not expect much better than about 50-millisecond absolute accuracy"

That is not true. GetPerformanceCounter function uses Windows API QueryPerformanceCounter and QueryPerformanceFrequency functions. These APIs make use of RDTSC, which in turn uses The Time Stamp Counter is a 64-bit HARDWARE register present on all x86 processors since the Pentium. It counts the number of CPU clock ticks since reset. This instruction returns the TSC in EDX:EAX. Since it is hardware counter, its precision is actually equal to precision of CPU clock and does not depend on any software. The fact that your program may get switched by pre-emptive multitasking OS, may give results that vary from measurement to measurement, but it does not change the fact that each of the measurements is accurate. It is simply your code taking different time to execute because of multitasking OS.</description>
		<content:encoded><![CDATA[<p>&#8220;Do not expect much better than about 50-millisecond absolute accuracy&#8221;</p>
<p>That is not true. GetPerformanceCounter function uses Windows API QueryPerformanceCounter and QueryPerformanceFrequency functions. These APIs make use of RDTSC, which in turn uses The Time Stamp Counter is a 64-bit HARDWARE register present on all x86 processors since the Pentium. It counts the number of CPU clock ticks since reset. This instruction returns the TSC in EDX:EAX. Since it is hardware counter, its precision is actually equal to precision of CPU clock and does not depend on any software. The fact that your program may get switched by pre-emptive multitasking OS, may give results that vary from measurement to measurement, but it does not change the fact that each of the measurements is accurate. It is simply your code taking different time to execute because of multitasking OS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Static Variables in RT Systems by Tomasz Janeczko</title>
		<link>http://www.amibroker.org/userkb/2007/04/21/static-variables-in-rt-systems/#comment-17002</link>
		<dc:creator>Tomasz Janeczko</dc:creator>
		<pubDate>Sun, 08 Mar 2009 09:57:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/2007/04/21/static-variables-in-rt-systems/#comment-17002</guid>
		<description>AmiBroker now supports static arrays natively, as of version 5.24.0 BETA.</description>
		<content:encoded><![CDATA[<p>AmiBroker now supports static arrays natively, as of version 5.24.0 BETA.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Real-Time Bar Period Timing by Yofa</title>
		<link>http://www.amibroker.org/userkb/2008/02/18/real-time-bar-period-timing-2/#comment-15308</link>
		<dc:creator>Yofa</dc:creator>
		<pubDate>Thu, 08 Jan 2009 19:59:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/2008/02/18/real-time-bar-period-timing-2/#comment-15308</guid>
		<description>Testing for new period/bar start in this way (Newperiod = SecNumber % TimeFrame == 0;) is not quite reliable! 
1 second refresh is not quarantied! It may sometimes take longer. So Newperiod may not get true value is some cases. It is much safer to compare last bar's time to a static value where we store the time when last new bar was signaled.
something like this:

if (StaticVarGet("LastNewBarSignal") != LastValue(TimeNum())
{
  StaticVarSet("LastNewBarSignal", LastValue(TimeNum());
  ....
}

P.s:
 This will signal a new bar when you start up amibroker as well!

Y</description>
		<content:encoded><![CDATA[<p>Testing for new period/bar start in this way (Newperiod = SecNumber % TimeFrame == 0;) is not quite reliable!<br />
1 second refresh is not quarantied! It may sometimes take longer. So Newperiod may not get true value is some cases. It is much safer to compare last bar&#8217;s time to a static value where we store the time when last new bar was signaled.<br />
something like this:</p>
<p>if (StaticVarGet(&#8221;LastNewBarSignal&#8221;) != LastValue(TimeNum())<br />
{<br />
  StaticVarSet(&#8221;LastNewBarSignal&#8221;, LastValue(TimeNum());<br />
  &#8230;.<br />
}</p>
<p>P.s:<br />
 This will signal a new bar when you start up amibroker as well!</p>
<p>Y</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Introduction to Trading Systems - Management by Anthony Abry</title>
		<link>http://www.amibroker.org/userkb/2007/07/19/introduction-to-trading-systems-management/#comment-15176</link>
		<dc:creator>Anthony Abry</dc:creator>
		<pubDate>Mon, 05 Jan 2009 05:41:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/2007/07/19/introduction-to-trading-systems-management/#comment-15176</guid>
		<description>I recently started organizing my systems in various ways where I can get an idea from the file name what this is about.

A functioning system, regardless of origin, but verified by me, is stored in the System folder with some descriptive title, e.g. MACrossplusADX. If the system is a clear trend following system I might name it T_MACrossplusADX. T means Trend, R means Range, C means Comment, F means Filter

A seemingly functioning system, but not verified yet, and not developed by me, is filed with a S_ upfront and stored in a folder of origin (e.g. Bandy, TASC, etc.)

A system under development by me, or abandoned, is put in the the Custom folder.

Snippets of working code are filed under their appropriate folders, i.e. Exits, Auto.

I always try to put lots of descriptions in the code itself, so that I can quickly get up-to-date with what it is about. I always include where I got it from, date, author, url address and maybe some info, e.g. "can't get it to work at this line, posted a question here about it."

Hope this helps.</description>
		<content:encoded><![CDATA[<p>I recently started organizing my systems in various ways where I can get an idea from the file name what this is about.</p>
<p>A functioning system, regardless of origin, but verified by me, is stored in the System folder with some descriptive title, e.g. MACrossplusADX. If the system is a clear trend following system I might name it T_MACrossplusADX. T means Trend, R means Range, C means Comment, F means Filter</p>
<p>A seemingly functioning system, but not verified yet, and not developed by me, is filed with a S_ upfront and stored in a folder of origin (e.g. Bandy, TASC, etc.)</p>
<p>A system under development by me, or abandoned, is put in the the Custom folder.</p>
<p>Snippets of working code are filed under their appropriate folders, i.e. Exits, Auto.</p>
<p>I always try to put lots of descriptions in the code itself, so that I can quickly get up-to-date with what it is about. I always include where I got it from, date, author, url address and maybe some info, e.g. &#8220;can&#8217;t get it to work at this line, posted a question here about it.&#8221;</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Preventing Repeat Orders and Whipsaws by Adrian</title>
		<link>http://www.amibroker.org/userkb/2007/07/14/preventing-repeat-orders-and-whipsaws/#comment-9383</link>
		<dc:creator>Adrian</dc:creator>
		<pubDate>Mon, 15 Sep 2008 14:19:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/2007/07/14/preventing-repeat-orders-and-whipsaws/#comment-9383</guid>
		<description>Hi Herman,

Re: Clearing OrderIDs at the Start of a New Bar

When  I use this code, with my DB set to 1 minute, and my chart set to a 5 minute timeframe, my timenum() still increments every minute. So although a new bar does not get created until after 5 minutes, I get my orderid reset after 1 minute since TN != PrevTN. 

For example, at 10:16am EST, my timenum is 101,600, and 10:17 is 101,700. So every minute my orderid's get reset, and new order are submitted.

I have implemented a hack to get around it, but can you think of a more elegant solution than:

PrevTN = StaticVarGet("TimeNumber"); 
TN = LastValue(TimeNum()); 
Char  = StrRight(NumToStr(TN),7);
NewBar = TN != PrevTN AND (Char =="000.000" OR Char =="500.000"); 
StaticVarSet("TimeNumber",TN);

Thank you for providing such excellent KB articles.

Cheers,

Adrian</description>
		<content:encoded><![CDATA[<p>Hi Herman,</p>
<p>Re: Clearing OrderIDs at the Start of a New Bar</p>
<p>When  I use this code, with my DB set to 1 minute, and my chart set to a 5 minute timeframe, my timenum() still increments every minute. So although a new bar does not get created until after 5 minutes, I get my orderid reset after 1 minute since TN != PrevTN. </p>
<p>For example, at 10:16am EST, my timenum is 101,600, and 10:17 is 101,700. So every minute my orderid&#8217;s get reset, and new order are submitted.</p>
<p>I have implemented a hack to get around it, but can you think of a more elegant solution than:</p>
<p>PrevTN = StaticVarGet(&#8221;TimeNumber&#8221;);<br />
TN = LastValue(TimeNum());<br />
Char  = StrRight(NumToStr(TN),7);<br />
NewBar = TN != PrevTN AND (Char ==&#8221;000.000&#8243; OR Char ==&#8221;500.000&#8243;);<br />
StaticVarSet(&#8221;TimeNumber&#8221;,TN);</p>
<p>Thank you for providing such excellent KB articles.</p>
<p>Cheers,</p>
<p>Adrian</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on FAQ by Herman</title>
		<link>http://www.amibroker.org/userkb/faq/#comment-7181</link>
		<dc:creator>Herman</dc:creator>
		<pubDate>Sat, 16 Aug 2008 09:31:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/faq/#comment-7181</guid>
		<description>Comments are individually approved - as time permits. 
Best regards,
Herman</description>
		<content:encoded><![CDATA[<p>Comments are individually approved - as time permits.<br />
Best regards,<br />
Herman</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Real-Time Bar Period Timing by Herman</title>
		<link>http://www.amibroker.org/userkb/2008/02/18/real-time-bar-period-timing-2/#comment-7179</link>
		<dc:creator>Herman</dc:creator>
		<pubDate>Sat, 16 Aug 2008 09:29:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/2008/02/18/real-time-bar-period-timing-2/#comment-7179</guid>
		<description>Your best bet is to ask this question on one of the AmiBroker forums.

Good luck,
herman</description>
		<content:encoded><![CDATA[<p>Your best bet is to ask this question on one of the AmiBroker forums.</p>
<p>Good luck,<br />
herman</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on System Ideas on the Internet by suresh</title>
		<link>http://www.amibroker.org/userkb/2007/08/17/system-ideas-on-the-internet/#comment-7157</link>
		<dc:creator>suresh</dc:creator>
		<pubDate>Fri, 15 Aug 2008 21:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/2007/08/17/system-ideas-on-the-internet/#comment-7157</guid>
		<description>how about woodies cci?</description>
		<content:encoded><![CDATA[<p>how about woodies cci?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on FAQ by JD Fagan</title>
		<link>http://www.amibroker.org/userkb/faq/#comment-6813</link>
		<dc:creator>JD Fagan</dc:creator>
		<pubDate>Thu, 07 Aug 2008 03:58:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.amibroker.org/userkb/faq/#comment-6813</guid>
		<description>Of course it just worked on this page, but didn't on others, so are some pages locked down preventing comments to be submitted?</description>
		<content:encoded><![CDATA[<p>Of course it just worked on this page, but didn&#8217;t on others, so are some pages locked down preventing comments to be submitted?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
