Counting the Bars - Help Needed

 

Hi guys,


I just want to write a small indicator to give me an alert when 3 consecutive bars close (bearish or bullish) ... Any clue how to do it?


Thanks in Advance

 
PJSantos100: alert when 3 consecutive bars close (bearish or bullish) ... Any clue how to do it?
  1. You do exactly that. Test the last three bars and issue the alert.
  2. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC ) and the nature of your problem.
 

You'll want to have a read up on Open[] and Close[] to determine if a bar is bullish and bearish. For example, Open[0] is the current bar's open price whereas Close[1] is the close price of the previous bar. Close[2] would be the close of the bar before that, and so on.

You'll want to have a read up on Alert() for generating the alert.

Reason: