Getting a error saying positive integer expected with lowest.
		
			
			
			
			
				
					
				
					1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
						//P1 = 10 
//P2 = 100 
 
Dindex  =   ((exponentialaverage [ P1] (close )- exponentialaverage [ P2] (close ))/ exponentialaverage [ P2] (close ))* 100 
 
IF   DINDEX  CROSSES OVER   0   THEN 
FLAG1  =   BARINDEX 
ENDIF 
IF   DINDEX  CROSSES UNDER   0   THEN 
FLAG1  =   0 
ENDIF 
IF   DINDEX  = >   0   THEN 
A1  =   HIGHEST [ BARINDEX - FLAG1] (DINDEX)
ELSE 
A1  =   0 
ENDIF 
 
a20  =   barindex - flag1
flag2  =   0 
for   a  =   0   to   a20- 1 
if   dindex[ a]   =   a1  then 
flag2  =   barindex [ a] 
break 
endif 
next 
 
IF   DINDEX  = >   0   THEN 
//A1AA = MAX(0,DINDEX) 
A1A  =   LOWEST [ BARINDEX - FLAG2] (DINDEX)
ELSE 
A1A  =   0 
ENDIF 
 
stochlow  =   LOWEST [ BARINDEX - FLAG2] (DINDEX)
stochhigh  =   HIGHEST [ BARINDEX - FLAG1] (DINDEX)
 
stochbuy=   max (0 ,((dindex- stochlow)/ (stochhigh+ stochlow))* 100 )
 
RETURN   stochbuy
 
				
			 
		 
I dont understand the problem can someone help me please
Thankyou