Forum

Return array in function

HI, I am trying return a MQLRates array in my function, but I get a error: class TradeLibrary { private : MqlRates rates[]; public : MqlRates getRates(); }; MqlRates TradeLibrary::getRates() { return rates; // this don't works }

Stop Loss with price value

I'm learning MQL5 and I'm me with a question. In most EA examples, the stop loss and take profit are realized by points. However, I would like to use the stop loss and take profit by the price. How can I do that? mrequest.action=TRADE_ACTION_DEAL; mrequest.price =