Login Page - Create Account

Support Board


Date/Time: Thu, 13 Dec 2018 07:29:41 +0000



New Bar formation

Support Request:
[2018-12-07 11:50:17]
User48838 - Posts: 29
Can someone please help me understand how to tell if a new bar has formed in a Spreadsheet Study, I have tried checking cell J41 for a seconds value =0 and G3 for # of trades =1, but i haven't found them to be reliable. Right now I am checking "second($J$41)" for a value <=2 which seems reliable (after hours, so far). I am using 1 minute ES bars at this time. TY.
[2018-12-07 15:53:42]
tomgilb - Posts: 2019
Try this:
=AND($J$41>A3,$J$41<A3+30/86400)

The timing accuracy of this depends on how often J41 updates.
IOW, it would go TRUE more quickly at a new bar in a fast market, and possibly be late in a slow market.

You could use a shorter window than 30 seconds to look for a TRUE, but J41 might not update in a very short window, and a TRUE would be missed for that new bar. Using 30 seconds will at least give you a TRUE/FALSE transition in most cases.

30/86400 = 30 seconds in Serial DateTime Value.
https://www.sierrachart.com/index.php?page=doc/SpreadsheetExampleFormulasAndUsage.php#UsingDateTime
Date Time Of Last Edit: 2018-12-07 16:04:33

To post a message in this thread, you need to login with your Sierra Chart account:

Login


Login Page - Create Account