Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 06:46:49 +0000



Post From: Referencing Current Bar Number on Intraday Chart

[2014-04-08 21:18:51]
Sawtooth - Posts: 4120
There is no SUMMATION function, but you could use the Cumulative Sum Of Study study, and 4 instances of the Color Bar Based On Alert Condition study.

Since Simple Alert formulas must be Boolean, use a formula like this in each color bar study:
=ID1.SG1/((MROUND(BARTIME,1/86400)-MROUND(TIMEVALUE("09:30:00"),1/86400))/(2/1440))>10000
where:
-the Cumulative Sum study is ID1
-the bartime and timevalue are rounded to the second to remove floating point errors
-each bar is 2 min

IMO, a spreadsheet study is the more direct way, unless you want to build a custom dll with ACSIL.
All 4 alerts/colors can be handled by one spreadsheet study.