Forum

Moving Average of custom indicator

So, i've coded many EAs, but i'm a bit new on indicators. I made a Donchian Channels indicator for MT5, but i want to make an EMA of the BASE line and i can't find how, i already checked the Custom Moving Average indicator source without luck. So any help would be great, thanks :) In short: how to

Getting the bar opening time (SERIES_LASTBAR_DATE) having the position opening time

So what i need to know is the BAR opening time ( SERIES_LASTBAR_DATE ) by having only the position opening time: if ( PositionsTotal () > 0 && _LAST_INCPOS_BAR_TIME == 0 ) { if ( PositionSelectByTicket ( PositionGetTicket ( PositionsTotal ()- 1 ))) { datetime

Get reserved margin PER position for MT5 (MQL5)

I've been google and searching in the forum but still not able to find the solution, what i need to know is how to get the reserved margin PER position, like: Position 1: 50$ Position 2: 75$ Position3: 33$ ... You get the idea, important, i'll have DIFFERENT symbols too. Thanks

MODE_LOTSTEP returns 0 if in other chart

Hi there guys, fast issue, if i try "MarketInfo(Symbol(), MODE_LOTSTEP);" it returns the lotstep correctly, BUT, if i send ANY other symbol (which is not the one in the chart with the EA or strategy tester ) it returns 0, por example: In US500 chart both "MarketInfo(Symbol(), MODE_LOTSTEP);" AND

24/7 Expert Advisor

HI there, i'd like to know if the... VPS? or wany MQL5 product can run 24/7 Metatrader 5 to keep my expert advisors running, and HOW would i connect/trade to them if they're not running on my PC/phone. Thanks