Login Page - Create Account

Support Board


Date/Time: Tue, 25 Feb 2025 22:36:18 +0000



[User Discussion] - Get the lowest low of 5 past bars

View Count: 989

[2021-04-23 04:36:47]
Ticks - Posts: 198
Would anyone have a code block to get the lowest value of 5 past bars then
convert that value to tics and place in an array?
[2021-04-23 08:50:36]
Ackin - Posts: 1865
study: Highest High / Lowest Low Over N Bars

studies7.cpp in the ACS Source folder of your main SC install.
[2021-04-23 09:12:34]
Ticks - Posts: 198
Yes, I have already looked at that study.
Does not perform what i need.

My trade entries are all limit orders that is offset by an amount of tics.
I`m looking to have the offset dynamic that looks back at the amount of pullbacks after previous 5 trade entry signals.

The lowest pullbacks are captured at 5 bars after every signal and placed in an array.
Take average number of 5 array fields of tics captured in that array and use that average ticks as the offset for the current trade entry.
Date Time Of Last Edit: 2021-04-23 09:53:36
[2021-04-28 02:04:47]
Ticks - Posts: 198
Unfortunately, no one was willing to provide a working code snippet.

But, I was able to get what I needed working.
On to the next coding road block to break thru.
[2021-04-28 04:29:42]
Sierra_Chart Engineering - Posts: 18565
These are the relevant ACSIL members to work with to accomplish what you want:
ACSIL Interface Members - Functions: sc.GetLowest()

ACSIL Interface Members - Variables and Arrays: sc.TickSize

And also refer to:
Working with ACSIL Arrays and Understanding Looping: Overview of sc.BaseData[][]sc.Subgraph[].Data[]sc.Subgraph[].Arrays[][]
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2021-04-28 04:30:14
[2021-04-28 09:19:24]
Ticks - Posts: 198
Thanks. I will add the links to my collection.

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

Login

Login Page - Create Account