Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1597

 
wasol:
Good afternoon! Please help me get my terminal up and running - the market is not working. I want to download a free indicator from the market and I can't.

I changed the password, rebooted, but nothing works.

The program logs the following

2021.08.23 11:54:18.236 MQL5 Market failed downloading product 'MACD Intraday Trend'(www.mql5.com:443 send failed [426: ])


Regards, Olga

Is your terminal not MT4?

 
wasol:
Good afternoon! Please help me get my terminal up and running - the market is not working. I want to download a free indicator from the market and I can't.

I changed the password, rebooted, but nothing works.

The program logs the following

2021.08.23 11:54:18.236 MQL5 Market failed downloading product 'MACD Intraday Trend'(www.mql5.com:443 send failed [426: ])


Regards, Olga

What kind of Windows are you running?
 
законопослушный гражданин:

Isn't the terminal MT4 by any chance?

MT5
 
MakarFX:
What is the operating system?
10
 
wasol:
10

32 or 64?

check your message

 

Hello.

Trying to change the original fractal indicator in MT4. I want it to be based on 3 bars and not 5 as it is now.

I haven't found anything in the code... There are just redirections... Where to change it?

Thank you.

 
Zalevsky1234:

Hello.

Trying to change the original fractal indicator in MT4. I want it to be based on 3 bars and not 5 as it is now.

I haven't found anything in the code... There are just redirections... Where to change it?

Thank you.

Write your own. On a 5-7-(or whatever you need)

a regular indicator, two buffers.

In the loop look at the last N and based on the position of the extremum (and on the Williams extra conditions, but this was also nullified in the original Mt4/5) you put a tick in the buffer, i.e. a non-empty value.

 

Please advise, can we be sure that market orders are stored in the terminal in an orderly fashion?

In other words, if the broker does not change the order tickets during rollovers and the trader does not touch them at all, can we rely on the fact that each time we go through the orders in the terminal and save their tickets and opening times in the arrays, we will get identical arrays ordered in ascending order?

Here is the code like this, for instance:

int Ticket[];
datetime OpenTime[];
int k = 0, total = OrdersTotal();
for (int i = 0; i < total; i++) {
   OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
   if (OrderType() > 1) continue;
   ArrayResize(Ticket, k+1);
   ArrayResize(OpenTime, k+1);
   Ticket[k] = OrderTicket();
   OpenTime[k] = OrderOpenTime();
   k++;
}

After this fragment, can we be sure that the order of elements in the arrays Ticket and OpenTime will always be the same (at every tick), and the elements of these arrays (or at least one of them) will be arranged in ascending order?

 
Janis Ozols:

Please advise, can we be sure that market orders are stored in the terminal in an orderly fashion?

In other words, if the broker does not change the order tickets during rollovers and the trader does not touch them at all, can we rely on the fact that each time we go through the orders in the terminal and save their tickets and opening times in the arrays, we will get identical arrays ordered in ascending order?

Here is the code like this, for instance:

After this fragment, can we be sure that the order of elements in the arrays Ticket and OpenTime will always be the same (on every tick), and the elements of these arrays (or at least one of them) will be arranged in ascending order?

not guaranteed, there's nothing in the documentation, the developers also wrote that don't rely on undocumented features

Although there is an opinion that your code will work correctly, I think@fxsaber wrote it once

ZZY: sort by yourself, imho, it's not critical, MQL is very productive now.

ZZZY: here's an example of sorting written byhttps://www.mql5.com/ru/forum/357565#comment_19656851

 
Igor Makanu:

not guaranteed, there's nothing in the documentation, the developers also wrote that don't rely on undocumented features

Although there is an opinion that your code will work correctly, I think@fxsaber wrote some time ago.

ZZY: sort by yourself, imho, it's not critical, MQL is very productive now.

SIZE: here's an example of sorting written byhttps://www.mql5.com/ru/forum/357565#comment_19656851

Just to add, it is NOT GUARANTEED that the terminal has and will give a sufficient history.

If an EA uses "historical" orders for some calculations (e.g. volume), then it is better to save them independently and always have them at hand.

Reason: