I've struggled all day and still haven't succeeded. Wrong experience for me and more. :)
Can anyone write this function?
int n = 0; // индекс дня, в данном случае 0 - текущий деньdatetime DayTime = iTime(NULL, PERIOD_D1, n); // Начало дня "n" в секундахint cb = iBarShift(NULL,0,DayTime); // Получим на текущем ТФ индекс бара
It's a little bit wrong. I need to get the start of the day "n" in seconds specifically from this TimeDay(Time[80]) function, but it doesn't work for me.
It's a little bit wrong. I need to get the start of the day "n" in seconds specifically from this TimeDay(Time[80]) function, but it doesn't work for me.
Specifically from this function TimeDay(Time[80]), I have to do some more intermediate calculations. You still have the Time[80] bar time. The simpler way would be this:
int n = iBarShift(NULL,PERIOD_D1,Time[80]); // индекс дня, которому принадлежит время бара - Time[80]datetime DayTime = iTime(NULL, PERIOD_D1, n); // Начало дня "n" в секундахint cb = iBarShift(NULL,0,DayTime); // Получим на текущем ТФ индекс первого бара дня "n"
I've been thinking about assessing the history for holes.
Here's a very useful script, I've been using it for years. If the quote archive is uploaded, you need to change two parameters to avoid poking around in the settings. They are highlighted in the screenshot with red frame.
To throw it on any chart and wait a couple of seconds, until the message where the file with the report is.
Specifically from this TimeDay(Time[80]) function, you have to do some more intermediate calculations. You still have the time of barTime[80]. It would be easier to do it this way:
I'm looking for a script that closes all orders by lot size, all means all (and not with the right to choose a wizard. lowes and so on) to close all orders at all pairs and only the lot size can filter them .
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
iBarShift should help
I've struggled all day and still haven't succeeded. Wrong experience for me and more. :)
Can anyone write this function?
I've struggled all day and still haven't succeeded. Wrong experience for me and more. :)
Can anyone write this function?
Good afternoon.
I don't understand how this works
03:00:24 '9473965': order sell 0.01 GBPUSD opening at 0.00000 sl: 1.65314 tp: 0.00000 failed [Invalid S/L or T/P]
with this code
why the opening price is zeroIt's a little bit wrong. I need to get the start of the day "n" in seconds specifically from this TimeDay(Time[80]) function, but it doesn't work for me.
I wanted to evaluate the history for holes.
Did this:
I understand correctly that iTime counts in seconds and 200,000 = 2.31 days ?
Is it possible to do this? (Seems to be working, only 6 pieces detected)
It's a little bit wrong. I need to get the start of the day "n" in seconds specifically from this TimeDay(Time[80]) function, but it doesn't work for me.
Specifically from this function TimeDay(Time[80]), I have to do some more intermediate calculations. You still have the Time[80] bar time. The simpler way would be this:
I've been thinking about assessing the history for holes.
Here's a very useful script, I've been using it for years. If the quote archive is uploaded, you need to change two parameters to avoid poking around in the settings. They are highlighted in the screenshot with red frame.
To throw it on any chart and wait a couple of seconds, until the message where the file with the report is.
the buy order is opened once, but the number of sell orders is infinite again
Write a function like this
int start()
if( OrdersTotal()==0 && CountTrades()==0)
{
OrderSend ("EURUSD",OP_BUYLIMIT,l,1.36000,5,0,1.36000+tp*Point,"my order",1);
OrderSend ("EURUSD",OP_BUYSTOP,l,1.36000,5,0,1.36000+tp*Point,"my order",1);
else
}
return(0);
}
//+------------------------------------------------------------------+
int CountTrades()
{
int count = 0;
for(int trade = OrdersTotal()-1; trade >=0; trade--)
{
OrderSelect(trade,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
count++;
}
}
return(count);
Specifically from this TimeDay(Time[80]) function, you have to do some more intermediate calculations. You still have the time of barTime[80]. It would be easier to do it this way:
Thank you! :)