Support Board
Date/Time: Mon, 03 Nov 2025 05:33:36 +0000
[Programming Help] - Reference previous study values when a condition was true
View Count: 648
| [2022-04-05 20:32:53] |
| User411641 - Posts: 3 |
|
In my ACSIL code, I am able to refer the study values using the current index. I am trying to get the values when a certain condition is true. What is the best way to do this? I do this in tradingview pinescript using "valuewhen(condition, source, index)". Is there something similar to valuewhen util function in ACSIL? |
| [2022-04-06 14:13:59] |
| Tony - Posts: 640 |
|
you have access to all indexes not just the current one (sc.Index) i.e.: int TargetIndex; for (int IndexCount = sc.Index; IndexCount>=0; IndexCount--) { if (condition_source) TargetIndex = IndexCount; } Date Time Of Last Edit: 2022-04-06 14:18:16
|
To post a message in this thread, you need to log in with your Sierra Chart account:
