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
1
2
3
4
5
6
7
ifclose<average[10]then
add=add+volume
endif
returnadd
Suggestion for an anwser:
Once the condition is not verified any more, we put the variable to zero
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue