Login Page - Create Account

Support Board


Date/Time: Fri, 07 Feb 2025 14:59:15 +0000



reversal bar formula with conditions

View Count: 1088

[2021-09-11 10:27:31]
User929256 - Posts: 5
Hi,
Condition: The shadow is equal to and larger than the body
To mark the reversal bar with these conditions, what formula should be used in which indicator?
These 2 conditions (=AND(L<L[-1],C>C[-1]) & =AND(H>H[-1],C<C[-1])) in "Indicator Color Bar Based On Alert Condition" a show the reversal bar well.
but there are no conditions for determining the shadow's size relative to the body.
[2021-09-11 12:04:45]
Sawtooth - Posts: 4173
Include this in each formula:
H-L-ABS(O-C)>=ABS(O-C)
This will find bars where the sum of both shadows is >= the body.

=AND(L<L[-1],C>C[-1],H-L-ABS(O-C)>=ABS(O-C))

=AND(H>H[-1],C<C[-1],H-L-ABS(O-C)>=ABS(O-C))
[2021-09-11 13:07:31]
User929256 - Posts: 5
Is it possible to just calculate the agreeable side of Reversal Bar? For example, the sample should not be marked in the image
imageScreenshot 2021-09-11 173631.jpg / V - Attached On 2021-09-11 13:06:43 UTC - Size: 3.98 KB - 232 views
[2021-09-11 13:25:31]
Sawtooth - Posts: 4173
Is the 'agreeable side' the lower wick of a green bar, and the upper wick of a red bar?
[2021-09-11 13:42:59]
User929256 - Posts: 5
This is exactly what I meant
[2021-09-11 14:17:36]
Sawtooth - Posts: 4173
Your reversal bar formulas sometimes find bars of the 'wrong' color.
Do you want to limit the AND(L<L[-1],C>C[-1] formula to only green bars?
And limit the AND(H>H[-1],C<C[-1]) formula to only red bars?
[2021-09-11 14:34:53]
User929256 - Posts: 5
I did not write this formula and found it in one of the posts here.
In fact, I want to filter the reversal bar so that, for example, in the green candlestick, if the bottom shadow is equal to and larger than the body, it will be marked. And in the red candlestick, the upper shadow should be marked larger than or equal to the body.
I hope I have explained correctly and clearly.
And thank you for your time
[2021-09-11 17:00:16]
Sawtooth - Posts: 4173
Try these:

Green bar:
=AND(L<L[-1],C>C[-1],C>O,O-L>=C-O)

Red bar:
=AND(H>H[-1],C<C[-1],C<O,H-O>=O-C)
[2021-09-11 17:45:55]
User929256 - Posts: 5
Yes, that's exactly what I needed.
Thank you very much for your help

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

Login

Login Page - Create Account