Support Board
Date/Time: Tue, 26 Nov 2024 18:29:11 +0000
Post From: ACSIL compare currentpricelevel of one study with many previous pricelevels of other study
[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
|