Download MetaTrader 5
To add comments, please log in or register
Sell products right in MetaTrader. Millions of traders are waiting for this!
webks
9
webks 2016.03.18 06:41 

hello everyone...

I'm newbie and need help on probably very simple logic...

how do you describe bullish and bearish candle in mql4 language?

UpBarr = bullish candle;

DwBarr = bearish candle;

Thank you..

Stuart Browne
5720
Stuart Browne 2016.03.18 08:19  

Bullish

 

Open[x]<Close[x]

Bearish 

Open[x]>Close[x]
webks
9
webks 2016.03.18 10:58  
Thank you stuart
Stuart Browne
5720
Stuart Browne 2016.03.18 11:31  
webks:
Thank you stuart
Welcome :)
BUDLogic v1.0
37
BUDLogic v1.0 2016.03.19 19:19  

You could try this:

Low[0]>Low[1]  &&  High[0]>High[1] && Close[0]>Close[1]   // bullish

High[0]<High[1] && Low[0]<Low[1] && Close[0]<Close[1]  // bearish

0 is the current bar and 1 is the previous bar, a 2 will be the .... bar. Go back from 0.  This is how I decide what is bullish or bearish. I want to see lower lows and lower highs(bearish). Some authors use the close only (lower or higher than the previous close). You will need to decide which is best for your program. I'm not a coder, but I hope this helps you. Chris

/
To add comments, please log in or register