Skip to content

Instantly share code, notes, and snippets.

View mamirjamali's full-sized avatar

Amir Jamali mamirjamali

View GitHub Profile
@mamirjamali
mamirjamali / Last-Order-Open-Price-MQL.cpp
Last active January 4, 2023 09:31
MQL - Get the last order open price of the history and print it
double MylastOrderOpenPrice()
{
// retrieving info from trade history
double LastOrderOpenPrice = 0;
int i, hstTotal = OrdersHistoryTotal();
for (i = 0; i < hstTotal; i++)
{
//---- check selection result
OrderSelect(i, SELECT_BY_POS, MODE_HISTORY);