Download MetaTrader 5

Counting the Bars - Help Needed

To add comments, please log in or register
Paulo
15
Paulo  

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

whroeder1
16105
whroeder1  
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.
honest_knave
Moderator
2318
honest_knave  

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.

To add comments, please log in or register