A request that was addressed to ProRealTime:
Hi,
I want this code to start counting from 0 instead of it being summed. And if the code is not true it just goes “_________”, it’s flat.
How do i make the code start from 0? (when criteria stops being true it turns flat,i want to to turn to zero and when criteria becomes true again i want it to start from 0.
Thanks in advance
if close < average[10]then
add=add+volume
endif
return add
Suggestion for an anwser:
Once the condition is not verified any more, we put the variable to zero
if close < average[10] then
add=add+volume
else
add=0
endif
return add