First a very quick comment: indices are referenced to 1 rather than 0 in Mathematica.
That said, here is an approach to finding the indices (positions in the list of data) where the peaks or valleys are located
In[1]:= testList = {10, 5, 3, 6, 9, 15, 13, 12, 9, 15, 18, 20, 19, 18};
In[2]:= peakTrippleQ[{x_, y_, z_}] := TrueQ[x < y > z]
In[3]:= peakPositions[list_List] :=
Flatten[Position[peakTrippleQ /@ Partition[list, 3, 1], True] + 1]
In[4]:= valleyTrippleQ[{x_, y_, z_}] := TrueQ[x > y < z]
In[5]:= valleyPositions[list_List] :=
Flatten[Position[valleyTrippleQ /@ Partition[list, 3, 1], True] + 1]
In[6]:= peakPositions[testList]
Out[6]= {6, 12}
In[7]:= valleyPositions[testList]
Out[7]= {3, 9}