Support Board
Date/Time: Tue, 26 Nov 2024 16:19:45 +0000
[Programming Help] - ACSIL compare currentpricelevel of one study with many previous pricelevels of other study
View Count: 263
[2023-11-05 20:52:22] |
User951358 - Posts: 15 |
Hello, can anybody give me please a hint how to compare the e.g. current EMA price with previous price levels of another study e.g. Swing highs and lows. I want to dectect the EMA crossing with previous swing highs and lows. Maybe one of you knows a similar study with this basic function? Any basic information is helpful. Shall I use a for loop? how to set the function that not only each of the "i" is compared with each other: 1 with 1, 2 with 2. Instead I want to compare the last value with e.g. all fifth to last, means "[I-5], [I-4]..." the number can differ. Therefore I used the IndexoflastVisibleBar. This is what I have (with comments to explain not real functions): for (int i=sc.IndexOfFirstVisibleBar; i<=sc.IndexOfLastVisibleBar; i++) { //when is ExponentialMA20 > 1 tick than e.g. one of the previous swings highs? if (1 tick = ExponentialMA20Ref - (minus) one of previous swings high=) { As I am searching for support a 3rd time for this topic, I would be interested in who can help me with the basic program functions for a study. I need the source code not only the study in order to continue on my own. Many thanks for your information Date Time Of Last Edit: 2023-11-05 21:02:29
|
[2023-11-08 21:32:14] |
ForgivingComputers.com - Posts: 960 |
If enable spreadsheet output from the Zig Zag study, you will find a column for the type of value it is: HH, HL, LL, LH. (It will be numeric.) By looping through all bars (repeat for each new bar) you can do a price comparison to the bars that match the HH/LH and LL/HL values.
|
To post a message in this thread, you need to log in with your Sierra Chart account: