i am still learning nt programming basics.
i would like to use a transformation of williamsr indicator in an automated strategy. i don't want the number of periods that the williamsr indicator will be calculated on to be hard coded into the strategy, but would like to keep it among the inputs that can be set externally and / or optimized.
i would like to define some kind of function (?) or variable (?) that performed the following transformation of the williamsr and it is this transformation i would like to use for the automated strategy algorithms.
we would call the number of periods for the williamsr - wrp -, and then the transformation would be the following:
revwillr = ( williamsr(wrp) * (-1) )
i understand i need to define wrp among the variables like this:
private int wrp = 9;
but how could i then define the revwillr function / variable (how can i use or call an existing indicator like williamsr?) and where in the strategy should i place it?
thanks.
Comment