Forum

Help with MQL4 to MQL5 Conversion (Rectangle Extender)

I found this simple code that extends any box drawn to the right edge of the screen. Can someone kind enough please help me convert it to mql5. Much Appreciated. //+------------------------------------------------------------------+ //| Rectangle Extender.mq4

Inside Bar Paints Wrong Candle

The indicator seems to paint the wrong candles. The calculation seems to work when I choose a different drawing method (DRAW_ARROWS). But I already have another indicator that draws arrows. So i dont want to clutter the chart. Can someone kindly look over the code and assist me in fixing the issue

My EA is firing off multiple trades instead of 1 per candle.

As the title suggests its supposed to only fire of a single trade per candle. Im guessing my loops have an issue or something I disregarded. Can someone with fresh eyes kindly assist. #include <Trade/Trade.mqh> #include <LotSizeCalc.mqh> //enum IndexList{BUY=1,SELL=0,}; //input IndexList PROGRAM =