Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 08:23:10 +0000



How to determine Doji bar color using Range Bars and Numbers Bars study

View Count: 794

[2021-04-29 18:48:48]
TriStar Trading - Posts: 116
I need to determine if a doji bar is considered up or down with Range Bars and the Numbers Bars study. I seem to recall reading about how to determine this somewhere in the doco sometime but I'll be damned if I can find it again. Been looking for hours it seems. :) Anyone have the formula? Thanks! Mike
[2021-04-29 19:01:20]
John - SC Support - Posts: 31704
There are several Doji options available in the Candle Stick Patterns Finder study. Refer to the following:
CandleStick Patterns Finder

Otherwise, you can find the definition for a Doji candle online and then use the Color Bar Based on Alert Condition to mark the candlestick. Refer to the following:
Color Bar Based on Alert Condition
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-04-29 20:04:08]
Sawtooth - Posts: 4000
This formula will return the up/down coloring:
Spreadsheet Example Formulas and Usage: Formula that Matches the Coloring of Up and Down Price Bars
-assuming this option is unchecked:
Graphics Settings: Up/Down Coloring for OHLC Bars Based on Previous and Current Close (Global Settings >> Graphics Settings >> Other)
[2021-04-29 20:07:01]
TriStar Trading - Posts: 116
Sorry, I wasn't very clear. My bad. Thanks for the quick response. You guys are great about that. I'm writing an ACSIL study and my logic needs to be able to determine this: if the previous bar [sc.Index-1] is a doji bar(sc.Open = sc.Close), how can I determine to consider it an up(green) or down(red) bar? Sometimes I see for example a doji that closes at the high and it's a down bar, and sometimes I see a doji that closes at the low and it's a green bar. Is there something relative to the previous bar that determines this coloring? I swear I read something in the doco that explains this coloring logic but I cannot find it again. Thanks! Mike
[2021-04-29 20:40:35]
TriStar Trading - Posts: 116
Please disregard and thanks for the answers gents. I found the rules under Chart Settings/Range Bar Standard. :)
The rules for determining the direction of a Range bar are as follows:
1. If the close is below the open, then the bar is down.
2. If the close is above the open, then the bar is up.
3. If the close is the same as the open, then we look at the difference between the current close and the prior close. If the current close is below the prior close, then the bar is down. If the current close is above the prior close, the bar is up. If the current close is the same as the prior close, repeat the algorithm using the next previous bar.

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

Login

Login Page - Create Account