You can read the above code first before creating this indicator and see if you can see what it is doing.
There are two moving averages used with slow length of 50 and a fast length of 20, the input called factor is adjustable to assign a weighting to each one.
If factor is set to 0.5 it will add 50% of the slow average to 50% of the fast average and create a blended average of the two periods.
To see maximum values of the slow average set factor to 1, to see the plot constructed entirely of the faster average you can set factor to 0.
You can experiment with values like 0.1 and 0.9 to see the affects of adjustments to the weighting.
Code tips
If you use the name value1 or value2 or value 99 as variables, then you do not need to declare the names of these at the top part.
Value2= 1-factor is a very neat way to get 2 variables to automatically assign 1% of one part and 99% of the other part so when added they will always = 100%
Limit the user error by restricting inputs by making the variables read them. ( The code for value1 does this after reading the factor input )
Code tricks to try
If you look at the slow and fast variables you will see they both use averages (average is this code means simple average).
You can try making the slow one into a weighted average or an exponential average and mixing these up to make your own blended average combination.