Show last status of one specific indicator

 

Hi my friends,

I'm working on one indicator that can show last status of one specific indicator. and I'm really struggling with it. is there any body to help me with that?
Ok lets me explain more about it. this indicator scan market watch symbols and if last signal of our predefined indicator(for example hanafy indicator) resulted in loss then go back and check the signal before the last one. and if this signal is also a failed signal then go for third signal backward. and if this signal is a profitable signal then prints 2 failed signal for "EURUSD".

Actually, I can't find an appropriate function that can show me the last signal, and the signal before the last signal and ..... .
I really appreciate it if some one helps me.
Tnx alot

 
tasoomas: Actually, I can't find an appropriate function that can show me the last signal, and the signal before the last signal and ..... .
Because there isn't one. When you read your indicator (MT4: iMA/iCustom or MT5: CopyBuffer) you specify which bar to read.
 
William Roeder:
Because there isn't one. When you read your indicator (MT4: iMA/iCustom or MT5: CopyBuffer) you specify which bar to read.

Tnx bro for your response.

so there is not a function like what I said. I wonder that can we define a loop with some if and then in the iCustom function we use a counter like i instead of the shift? I actually tried it a lot. but it doesn't work and I'm very sad :(

Reason: