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

 
Juer:

https://www.mql5.com/ru/docs/common/cryptencode

Using the ArrayToHex function as in the example.

AES128

source: Hello World

key: yBCi9VMOTwJ6RVeH

результат: 5B27495716A6D1F20B6AFB069D30286F

https://www.devglan.com/online-tools/aes-encryption-decryption

It doesn't decrypt here...

I tried it a long time ago too, and it didn't work: Metatrader -> php

 
Vitaly Muzichenko:

I also tried it a long time ago and it didn't work: Metatrader -> php

What if I need to encrypt in MT4 and decrypt in PHP? Is there an encryption algorithm that works the same way?

 
Juer:

What if I need to encrypt in MT4 and decrypt in PHP? Is there an encryption algorithm that works the same way?

I haven't found it. Works fine MT -> MT, or php -> php. Couldn't link and gave up on the idea. It was about a year ago.

 
Vitaly Muzichenko:

I haven't found it. Works fine MT -> MT, or php -> php. I couldn't link and gave up on the idea. It was about a year ago.

I actually found one service. Here it encrypts-decrypts similarly to http://aes.online-domain-tools.com/

AES Encryption – Easily encrypt or decrypt strings or files
AES Encryption – Easily encrypt or decrypt strings or files
  • Online Domain Tools Team
  • aes.online-domain-tools.com
Symmetric Ciphers Online allows you to encrypt or decrypt arbitrary message using several well known symmetric encryption algorithms such as AES, 3DES, or BLOWFISH. Symmetric ciphers use the same (or very similar from the algorithmic point of view) keys for both encryption and decryption of a message. They are designed to be easily computable...
 
Juer:

Actually, I found one service. It encrypts and decrypts similarly to http://aes.online-domain-tools.com/

If it works, and you don't mind sharing the result, write a solution to the problem

 

Hello !

I would like to implement an EA for placing and closing orders on graphical lines

There is a code sample available which should be based on....
 
Yerkin Sagandykov:

Hello !

I would like to implement an EA for placing and closing orders on graphical lines

There is a code example to take as a basis....

If so, what prevents you from doing so? Implement it.
 
Alexandr Saprykin:

If you wanted to, what's stopping you? Make it happen.

Wanting and being able to do it are different )

question - how do i catch values where the line is set ?

 
Yerkin Sagandykov:

Wanting and being able to are different things )

my question is: how do i catch a value where the line is set ?

Look it up in kodobase. Scriptor, I remember exactly, had such an example on mql5.

 

Glitches in MQL4 ?

for(int h = OrdersTotal()-1; h >= 0; h--)

{

if(OrderSelect(h, SELECT_BY_POS))

{

if((cnt_OO >= 2))

{

if((OrderMagicNumber() == Magic)&&(OrderLots() <= Lots/Prikup - Dplus))

{

Nextstep = NextStep;

BaseNext = OrderOpenPrice();

LotsNext = NormalizeDouble(OrderLots()*K,lotDigit);

if(NewPB > 0)

PBcloseON = true;

Alert ("Pospedny Order NEXT ",OrderTicket());

Alert ("Otkritih orderov ",cnt_OO);

break;

}}

LotsNext = NormalizeDouble(Lots*Prikup,lotDigit);

Alert ("Otkritih ordersov NEXT net ");

Alert ("Otkritih ordersov ",cnt_OO);

break;

}}

The meaning of this operation: if there are more or equal to 2 orders, the last order is handled. Otherwise, the first one will be processed.

RESULT: Otkritih orders NEXT net

Otkritih ordersov 5

Similar glitch in two other situations also with the if() operator