Hi Mangafreakz,
You don't have to replace 20 with your number. The staement P = Param("Averaging Period", 20, 3, 100) itself has built in values to change. The meaning of the statement is as follows:
P is a parameter, having name "Averaging Period", with a default value of 20, the minimum that can be assigned is 3 and maximum of 100. So, you can change the value of P in the range 3 to 100. For doing this change in the chart you have to right-click on the chart and click on Parameters. You will get a sub-menu with different variables that can be changed and a scale against each for changing their values. Click on the scale against "Averaging Period" and drag the pointer to change the value as per your choice. If you want to go back to default values, click on Reset button at the bottom and all variables will be set to their default values.
If you want to change the value for exploration, click on Parameters in the Exploration window and follow the same procedure.
If you want to have a range other than 3 to 100 then you have to replace the 3 and 100 in the code with your values. To change the default value replace 20 with whatever number you want but it should be within the range specified by the next to numbers.
I assumed that the range of 3 to 100 for averaging period would be sufficient. If there is a need to test other numbers outside this range you can make the changes to the P = Param(....) line in the AFL
Regards
-Anant