Hi
Appreciate your input on this. I am trying to apply an optimised value to the indicator for a specific period.
For example in the code below, if the date range is between 01/01/2015 and 01/01/2016 then assign the value of 14 else assign the value of 10 for the directional indicator.
But I am getting an Error 5 - that the argument has an incorrect type and function expected a number, not an array. In this case, I am not assigning an array but a value on the basis of a condition.
I tried Writeif and strtonum function but nothing seems to cut it. Appreciate if you could guide me here.
If I may have missed any basic coding principle then I apologise for wasting your time.