Forum

Write some text on the top or bottom of the candle

I'm trying to write some text on the top or bottom of the candle (closest possible). I'm using the code below without success: void DrawText( string text, const double &high[], const datetime &time[]) { //datetime Time = TimeCurrent(); // Get the current time double price = high[ 0 ]; // Get

Trailing SL always on

Hi Traders, I'm having a problem on the MT5 terminal, in particular on the gold chart. All my market orders start with an automatic trailing stop loss even when 'points' is set to '0' and 'Trailing SL' is set to 'none'. This happen on any new gold chart that I open. At the moment I have two position

Closed position profit

Hi all, why is so hard in MQL5 to get last closed position profit, or at least if this was >=0 or <0 ? I'm not posting any code as I tried all that I could find on mql5.com, but none of it worked. Please, can anybody post some minimal example ? Thank you

Strange error compiling indicator

Hello forum, I'm totally new to MQL, but no to programming. I downloaded an Indicator (divergence.mq5) from the codebase and I get two errors on an input variable initialized with an enum value. The code: //+----------------------------------------------+ //| declaration of enumerations