You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Get the total profits of last xx trades
how to get the performance results on current day ?
server time from 0000 until current time
acc growth %, total pips, and also total profit amount.
I just mean the profit of last closed order.Not the sum of all closed orders.,
Yes. You can get the last profit of just one trade with my function. Just specify 1.
how to get the performance results on current day ?
server time from 0000 until current time
acc growth %, total pips, and also total profit amount.
I don't have this kind of function done in any of my ea therefore I have no code
analyze all historic orders and filter orderclosetime then pull OrderProfit() from the order(s) that was most recently closed.
Thanks it works.
Get the total profits of last xx trades
This will get the profits of xx trades, not the LAST xx trades since history not in order!!!, how could we do this pls somebody help!.
How to get profits of the LAST X trades.
Hi, I have written a function to check that if there is a loss in the last xx (let's say five) previous order and then if it is true when I call it in the EA, it increases the lot accordingly but it seems that it doesn't work properly so need your help. Here is the function:
bool CheckLoss(int Count)
{
//----
int Cnt = 0;
static bool isLoss = false;
for(int i = OrdersHistoryTotal() - 1; i >= 0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) == false)
{
Print("Error in history!");
break;
}
if(OrderSymbol() == _Symbol && OrderMagicNumber() == order_magic)
{
Cnt++;
if (OrderProfit() < 0)
isLoss = true;
else
isLoss = false;
}
if(Cnt == Count) break;
}
and here what I want to call it for my Moneymanagement
case MM_MARTINGALE:
if (CheckLoss(5) == true)
volume = lots * 2;
break;
Hi, I have written a function to check that if there is a loss in the last xx (let's say five) previous order and then if it is true when I call it in the EA, it increases the lot accordingly but it seems that it doesn't work properly so need your help. Here is the function:
bool CheckLoss(int Count)
{
//----
int Cnt = 0;
static bool isLoss = false;
for(int i = OrdersHistoryTotal() - 1; i >= 0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY) == false)
{
Print("Error in history!");
break;
}
if(OrderSymbol() == _Symbol && OrderMagicNumber() == order_magic)
{
Cnt++;
if (OrderProfit() < 0)
isLoss = true;
else
isLoss = false;
}
if(Cnt == Count) break;
}
and here what I want to call it for my Moneymanagement
case MM_MARTINGALE:
if (CheckLoss(5) == true)
volume = lots * 2;
break;
as first the script to gains return as referring finest of closed order as that gives with results of positive or negative.
the script to distinct list as those might be of also one with cumulative or single returns from last order.
as follows with
reference of next order to put on request with the indicator signal as preparing option.
the list might be of one as finest to gives with returns of string or integer value.
that those might be of one as fine to work as from switches with the script as collecting list from the running order as still opened or one or some as closed with the returns of positive, negative and more as scripts to put with the plus symbol on cummulating different returns from the list.
and one to put with the limitation as script to collects of spare with distance range as the order (open or closed as by request) to gives of results from different timeframe to collect list of population of order
the number on returns with the calculation of point on request might be distinct as one to differ with rest as per directive for the intensive of command as preparing the finest return of value.
This will get the profits of xx trades, not the LAST xx trades since history not in order!!!, how could we do this pls somebody help!.
How to get profits of the LAST X trades.
the script must have with initiation as populating list on future use to work on reference as qualifying of one or different returns from the initial request on expecting list of results.
the return might be of one as the range on distance with the list on ranks to gives as order with the details on ext enumeration draws of some results of value.
and to compound as cumulating numbers of value as
the script might returning value on dollar unit on base or one as point following reference with request on scripts order.
...
as working with the martian gale theory
trader might gives on decision as defining of one or some with different initial as the value on referring returns on contanct value that those have with the different qualification as disputing indication as expecting preset to put with the following shift of level with the higher stage on martian ale sterategy on running trade
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor
OrderType() == 6, 7 in the history pool? - MQL4 programming forum
Could EA Really Live By Order_History Alone? (ubzen) - MQL4 programming forum
"balance" orders in account history - Day Trading Techniques - MQL4 programming forum
Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum 2015.02.11
Why it won't work: Calculate Loss from Lot Pips - MQL5 programming forum 2017.07.11