Login Page - Create Account

Support Board


Date/Time: Sun, 28 Apr 2024 09:52:55 +0000



[User Discussion] - Custom study counting candles script

View Count: 75

[2024-03-23 13:28:59]
Trader_FloW - Posts: 8
Hey there, i am still learning to script custom studies. I am wondering if its hard to build a script which is counting the first 5 min candle of every day over one month, if it is it a red or a green candle. After that i would like to get an overview in a text file of how often the day opens with a red/green candle.
Maybe one of you can give me some useful tips
If i am to dumb for that to learn to code custom studies i will continue to do it manually :P

Thanks in Advance
[2024-03-23 15:45:01]
binaryduke - Posts: 360
You could do this without custom coding.

Use the Color Bar Based on Alert Condition Study.

Build an alert for... 'it's the first bar of the day and a red candle'.

Duplicate this and build an alert for 'it's the first bar of the day and a green candle'.

The alert formula syntax including checking for bar time is well documented by the Sierra Chart.

Then, you can use the Color Bar Based on Alert Condition Study's subgraph output for Sum of Alerts to get you the totals you are seeking.

I wager it is around 50% for each :)

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

Login

Login Page - Create Account