I want to make an indicator but there is a big problem;
the idea is that when a situation occur, like a line cross above another, a variable, well let's call it flag, equals 1.
When an another situation occurs, the flag = -1.
The problem is that i've got to declare this variable, typically int flag = 0;
and when a situation on a bar a situation occurs, flag = 1 or -1, but the next bar, it equals 0 (due to the declaration).
I want that the value of flag remains until a new situation or event.
Is that possible? I knew that is possible in Strategy with user variable but in an indicator?
Thank U a lot!!!
(Sorry for my english!! )
Comment