I’ve got an indicator (of my own devising) that works fine – except for a strange problem I can’t solve.
In Variables, I declare the following:
private int len = 8; private int period = 6; private int zHighCounter = 0; private int zLowCounter = 0;
if(conditions) {ZHighCounter = 0;} else ZHighCounter++;
The problem arises when I reset a parameter, say, in Indicators. Obviously, ZHighCounter and ZLowCounter will show the number of instances counted. But if either of them shows a count greater than either ‘Len’ or ‘Period’ (the two ‘conventional’ variables) then the indicator won’t appear and remains ‘invisible’ until I manually reset the figures against ZHighCounter and ZLowCounter to zero, or at least, figures lower than the variables.
I’d be very grateful to hear about some code that I can insert that could solve this problem.
I hope I’ve explained the situation clearly.
Much obliged in advance.
Comment