Forum

Heikin Ashi RSI Oscillator: error plotting candles

Hi, I was trying to convert this indicator from TradingView to MQL5 but it badly prints the candles, as in the attached photo, and i don't understand where is the problem. From the TradingView indicator i want to convert only the Heiken Ashi code, not RSI and Stoch lines. Here there is the code

Multicurrency EA: the order of forex pairs impacts the results

Hi everyone, I'm developing a multicurrency expert advisor that trades multiple pairs simultaneously, specifying the forex pairs in an input string. I've noticed that changing the order of them sometimes changes the results as well. What can be the reason? The EA opens only at the close of the

Wrong prices when trades open MQL5

I have a problem with entry price of trades in my EA. I do it with this code: int ticket = trade.Buy(CalculateLotSize(diff* 10000 ), NULL , 0 ,longSL,longTP, "BUY" ); int ticket = trade.Sell(CalculateLotSize(diff* 10000 ), NULL , 0 ,shortSL,shortTP, "SELL" ); But the trades are open with wrong price

Wrong values of the Heiken Ashi Stochastic indicator mt5

I am trying to access the previous values of the Heiken Ashi stochastic from an indicator in MQL5. But when I do that the values are different from the ones on the indicator's chart. For example when the EA opens a trade on a candle, I print the Stoch Heiken Ashi value of the previous candle but it