PDA

View Full Version : ArrayMinimum function



Edakad
06-18-2014, 05:34 AM
Hello

Please check this code


Public Sub main()

x = CopyClose(0,1,bars(0),aryLow)
val = ArrayMinimum(aryLow,CINT(1200),100)
msgbox val

End SubWhen run the code ArrayMinimum returns the integer part of the minimum value, I think.

Public Function ArrayMaximum(ary() As Variant, start As Integer, Optional Count As Integer = -1) As Integer

In the function syntax, return value is integer.

Is ArrayMinimum supposed to work like this or there is a method to get double value, when price array is used ?

Hassan-HS
06-18-2014, 06:51 AM
Hello,


You can use this code...




Dim Lowest
Lowest=array(Lbound(array))
for i=1 to Ubound(array)
if array(i) < Lowest then
Lowest=array(i)
end if
Next

Edakad
06-18-2014, 06:55 AM
Thank you Hassan