Hello forum,
I am trying to get the Array Maximum value of an array. For this purpose, I copied the Bull Power Indicator.
I get the value of the HighestBullValueData array, but when I use the array maximum function, it gives me a different number (which is way off the value of the range of values from the HighestBullValueData array ).
Thanks in advance for any explanation.
If you only need the Highest value from the HighestBullValueData bar 0-14 (15 bars), then you don't need to use iterations.
- Fill the array. Then, outside the loop, search the entire array
for the one value
ArrayMaximum(HighestBullValueData, WHOLE_ARRAY, 0);
- Or eliminate the copying and just search the source array
ArrayMaximum(ExtBullsBuffer, 15, 0);
- Fill the array. Then, outside the loop, search the entire array
for the one value
- Or eliminate the copying and just search the source array
Thanks. Here is now the code. Didn't realize it's that simple.
for(int i=0; i<15; i++) { ArrayMaximum(ExtBullsBuffer, 15, 0); PrintFormat("ExtBullsBuffer = %f ", ExtBullsBuffer[i]); }
If you only need the Highest value from the HighestBullValueData bar 0-14 (15 bars), then you don't need to use iterations.
Thanks. Here is now the code. Didn't realize it's that simple.
for(int i=0; i<15; i++) { ArrayMaximum(ExtBullsBuffer, 15, 0); PrintFormat("ExtBullsBuffer = %f ", ExtBullsBuffer[i]); }
No, wrong. Read the specs.
int i=ArrayMaximum(ExtBullsBuffer, 15, 0); PrintFormat("ExtBullsBuffer maximum = %f ", ExtBullsBuffer[i]);No loop required.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello forum,
I am trying to get the Array Maximum value of an array. For this purpose, I copied the Bull Power Indicator.
I get the value of the HighestBullValueData array, but when I use the array maximum function, it gives me a different number (which is way off the value of the range of values from the HighestBullValueData array ).
Thanks in advance for any explanation.