This should be quite simple for a programmer.
I need a help with a piece of code which would count the up-bars (close>open) and down-bars (close<open) from the current bar backwards and alert me when there was n bars of the same type in a row recently.
example: ...downbar1, downbar2, upbar1, downbar1, downbar2, downbar3, downbar4, upbar1, upbar2....
On close of last upbar1 it would give me an alert: "4 down bars in row"
Also ignore alert when 3 or less of the same bars in a row.
Thanks.
I need a help with a piece of code which would count the up-bars (close>open) and down-bars (close<open) from the current bar backwards and alert me when there was n bars of the same type in a row recently.
example: ...downbar1, downbar2, upbar1, downbar1, downbar2, downbar3, downbar4, upbar1, upbar2....
On close of last upbar1 it would give me an alert: "4 down bars in row"
Also ignore alert when 3 or less of the same bars in a row.
Thanks.