Forum

Taking the last profit and storing it in a variable | MQL4

Hey guys, I've been trying to do a function for a while but I can't find the error ... I'm doing a function that returns the Profit / Loss from the previous order. I already posted this help here, some colleagues responded with some ideas but without success. I'll detail the function step by step

Store previous profit in a variable | MQL4

Hey guys ! see if anyone can help me: I'm trying to take the profit from the previous order and store it in a variable. I'm doing this way: double lastProfit = 0 ; for ( int i= 0 ; i<OrdersHistoryTotal(); i++) { if ( OrderSelect (i, SELECT_BY_TICKET, MODE_HISTORY) == true )

Help with Code | Informations about Last Order on MQL4

Hi Guys ! Can you help me with a doubts ? I need informations about Lots of the Last order. I'm making this: double bigTicket = 0 ; double lastLotsOrder = 0 ; int counter = 0 ; double getLastLotOrder( int MAGICMA_n){ for ( int i= 0 ; i < OrdersTotal () ; i++){ if ( OrderSelect