Login Page - Create Account

Support Board


Date/Time: Wed, 19 Mar 2025 07:42:43 +0000



Calculate wicks movement

View Count: 987

[2022-10-12 16:03:29]
awakef - Posts: 72
Hi there's a way to calculate the movement of the candlestick wicks from low to close and viceversa from high to close

For example a short candle left a down wick. I want to calcuate the distance between the lowest point ot the candle to the close of the candle as like the picture.

Thanks
imageScreenshot 2022-10-12 120029.png / V - Attached On 2022-10-12 16:00:43 UTC - Size: 22.49 KB - 179 views
[2022-10-12 16:38:24]
John - SC Support - Posts: 38782
What do you want to do with that information? Are you wanting an Alert based on a certain condition, or do you want to just display the information, and do you want it displayed for all bars, or just the most recent one?
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-10-12 17:07:21]
awakef - Posts: 72
I just want to display that info on the chart just for the recent one bar.

It can be on top of the candle with a study overlay or on the chart header.

Thanks
[2022-10-12 17:21:58]
John - SC Support - Posts: 38782
The first thing is to get the data calculated. Personally, I like the Spreadsheet Formula study for this, but there are multiple ways to get to the same information, particularly using the Arithmetic studies. Refer to the following:
Spreadsheet Formula
Using the Basic Arithmetic Studies

Since the Spreadsheet Formula study actually uses the Alert syntax, this means that the Alert Main Price Identifiers are available. Refer to the following:
Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables

Therefore to calculate the distance from the Close to the Low, you would enter the following for the formula in the Spreadsheet Formula:
= C - L

Or to go from the High to the Close, would be the following:
= H - C

To then display this information on the chart for the most recent bar, use the Text Display for Study study. Refer to the following:
Text Display For Study
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-10-12 19:01:30]
awakef - Posts: 72
Perfect but John how I can make to the calculations depending of the candle if a bullish or a bearish one?
Date Time Of Last Edit: 2022-10-12 19:24:55
[2022-10-12 21:13:41]
John - SC Support - Posts: 38782
You would have to use an IF() statement. So for a Bullish (Up) candle (where we assume you want the High minus the Close), you would have the following:
=IF(C > O, H - C, 0)
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-10-12 21:16:58]
awakef - Posts: 72
Thanks John thats what I was thinking of the if formula but I didn't know how to translate it.
[2022-10-12 22:24:11]
awakef - Posts: 72
Can I make nested if statements like this?
=IF(C > O, L - O, "0",IF(O > C, L - C, "0"))

Because Im trying to put 2 conditions if the first doesn't give me any value.

Im doing that on the Spreadsheet formula study.
Date Time Of Last Edit: 2022-10-12 22:25:18
[2022-10-13 13:36:53]
John - SC Support - Posts: 38782
Yes, you can do that. Just do not put quotes around the 0's.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-10-13 14:15:51]
awakef - Posts: 72
Good Morning John,
If I do the first IF formula without the other nested it works good on bullish candles but on the bearish ones it gives me 0 value and thats ok because I want to give me a number when the candle is bullish.

Thats why I nested the other if formula so when the candle is bearish give me a value instead of giving 0 of the first if formula when the candle is bullish only.
imagesingle if.png / V - Attached On 2022-10-13 14:12:54 UTC - Size: 197.44 KB - 157 views
imagespreadsheet with 2 if formulas.png / V - Attached On 2022-10-13 14:13:20 UTC - Size: 141.93 KB - 124 views
[2022-10-13 14:44:57]
John - SC Support - Posts: 38782
Sorry, we missed how you had your IFs nested. Here is what your formula should look like:
=IF(C > O, L - O, IF(O > C, L - C, 0))
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-10-13 15:48:33]
awakef - Posts: 72
Now is working thanks John for all your help! ;)

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

Login

Login Page - Create Account