user3822:
When the number of bars to count is == 0, iHighest counts the whole array. However, in certain situations, the candle with the highest value is the same candle from which to start counting. As you can see, this is a problem. As a result, I've added the highlighted part to make sure that the range of candles to count will always be at least 1. |
|
whroeder1:
I'm not using an array. x is a variable representing a Sunday Gap Open. i is a variable representing a Sunday Gap Fill. What's not clear?
|
user3822: x is a variable representing a Sunday Gap Open. i is a variable representing a Sunday Gap Fill. What's not clear? |
|

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi everyone,
First time working with iHighest.
When the number of bars to count is == 0, iHighest counts the whole array.
However, in certain situations, the candle with the highest value is the same candle from which to start counting.
As you can see, this is a problem.
As a result, I've added the highlighted part to make sure that the range of candles to count will always be at least 1.
My question is: will adding +1 to the range of candles to count skew the results of always grabbing the highest value between the range I want to search through? I was wondering if I should stick with this or just add an if statement that makes 'maeShift' = 1 if x-i is equal to 0.
In case you're wondering what the variables x and i are:
x = H1 Sunday Gap Open Candle
i = H1 Sunday Gap Fill Candle