JL
Check out https://docs.mql4.com/series/iLowest
The OrderProfit() of the selected trade slows current profit/loss
Good Luck
-BB-
To obtain the low of an open trade:
int x=iBarShift(OrderSymbol(),PERIOD_M1,OrderOpenTime());
double dLow=iLow(OrderSymbol(),PERIOD_M1,iLowest(OrderSymbol(),PERIOD_M1,MODE_LOW,x));
from this partial code i am able to collect number of 1 min candles since trade open
but am unable to find the lowest low achieved or the drawdown of the open trade
guide
---------------------
int tm, z;
double lw[];
for (int i=0;i<OrdersTotal();i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
tm = (TimeCurrent()-OrderOpenTime())/60;
if (OrderType()==OP_BUY)
{
for (z=tm;z>=0;z--)
{
lw[z] = iLow(Symbol(),1,z);
}
Alert(lw[2]);
}
barrowboy gave the simplest solution
works

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
from this partial code i am able to collect number of 1 min candles since trade open
but am unable to find the lowest low achieved or the drawdown of the open trade
guide
---------------------
int tm, z;
double lw[];
for (int i=0;i<OrdersTotal();i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
tm = (TimeCurrent()-OrderOpenTime())/60;
if (OrderType()==OP_BUY)
{
for (z=tm;z>=0;z--)
{
lw[z] = iLow(Symbol(),1,z);
}
Alert(lw[2]);
}