Forum

Bar[0] and current open bar confusion

Hi, can someone please clarify the name convention for bars in an array of type Open, Close, High, Low. If bar[0] is the current open bar on the chart, then how can it have a close price , since it's not closed yet? Or is bar[0] the last closed bar before the current open bar

EA that recognizes round numbers and support/resistance levels from indicators

Can an EA incorporate or read price values from indicators that are active on a chart? Eg, an indicator that looks for daily S/R levels, pivots, or round numbers ? Apologies if this has been asked before. Also, how would one go about programming an EA to enter a trade when price reaches a round

Placing stoploss above or below a reversal candle, eg doji or shooting star

Hi, I'm new to this and just wondering what functions in MQL4 I could use to make an EA place a stop loss above/below a reversal candle before the entry order is placed? Does anyone have some example code maybe? All help much appreciated, thank you