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

 
Juer:

Thank you, could you please specify which property function to use? I only see OBJPROP_LEVELCOLOR, OBJPROP_LEVELSTYLE, OBJPROP_LEVELWIDTH and the number of levels OBJPROP_LEVELS. For the first three, a modifier is given to indicate the level number.

By the way, I tried to change the colour of one Fibonacci level, it changed the colour of the whole object:

Where name is the name of Fibonacci Retracement object.

Why did the colour of the whole object change?

Forum on trading, automated trading systems and strategy testing

Bugs, bugs, questions

Alexey Viktorov, 2018.07.19 15:12

It works for me.

   ObjectSetInteger(ChartID(), "FiboLevels", OBJPROP_LEVELCOLOR, 0, clrBlack);
   ObjectSetInteger(ChartID(), "FiboLevels", OBJPROP_LEVELCOLOR, 2, clrGreen);
   ObjectSetInteger(ChartID(), "FiboLevels", OBJPROP_LEVELCOLOR, 4, clrYellow);

 
Alexey Viktorov:

Why has the colour of the whole object changed?

this is the mt4 branch ;)

 
Alexey Viktorov:

Why has the colour of the whole object changed?


and does it work in the tester in visual mode too?

 
Downloaded and installed from manufacturer's website MT4, opened properties and unblocked as recommended before installation, but cannot connect to desired brokers
 
Juer:

does it work in the tester in visual mode too?

Works in MT5, not tested in MT4.
 
Vitaly Muzichenko:

It's because of people like you that the SD was shut down. You probably have advanced dementia!

It's a pity servicedesk didn't post application feats on the forum, it would have been fun to read them ))

 
Alexey Viktorov:
Works in MT5, not checked in MT4.

So this is an MT4 thread...

 
orena:
Finally, can you tell me how to connect my real account to mt5? When I contact technical support they reply that for technical reasons mt5 is temporarily unavailable. It can't be the same?
And this mql5 site is a bit confusing... Wanted to correct information in my profile - no changes saved. For an answer here, on the forum...
Is there any normal explanation for all this?
Thank you in advance for any possible information.

Are you sure your real account is open for MT5? The thing is that MT5 and MT4 real accounts are different. You need to open a real account for a certain terminal.
If in the MT5 terminal you can't connect to your broker's server (not detected), then most probably your broker does not support MT5 (it happens).
After changing the information in your mql5 profile, at the very bottom of the page there is a window where you have to enter your password from your account and click the button "save" below. then changes you made will be saved. (Just yesterday did so - everything is OK.)
 
string EncryptData(string txt)
  {
   string k="qgSAub3fN20gds0ULxOasZPRosObOvXA";
   uchar data[];
   uchar key[];
   uchar result[];
   StringToCharArray(txt,data,0,StringLen(txt));
   StringToCharArray(k,key,0,StringLen(k));
   if(CryptEncode(CRYPT_AES128,data,key,result)<=0)
     {
      Print(__FUNCTION__+": encryption failed. Error=",GetLastError());
      return "";
     }
   string resultStr="";
   for(int i=0;i<ArraySize(result);i++)
     {
      resultStr = StringConcatenate(resultStr,StringFormat("%02x",result[i]));
     }
   return resultStr;
  }

Hello. Trying to figure out encryption. Can anyone encrypt with MQL4 and then decrypt with some web service? I get the result in MQL4, but I can't decrypt it with the same key (outside MQL4).

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

My key seems to be too long here. But I can't decrypt it with the right key too...

Online Tool for AES Encryption and Decryption
Online Tool for AES Encryption and Decryption
  • DevGlan
  • www.devglan.com
For encryption, you can either enter the plain text or an image file or a .txt file that you want to encrypt. Now choose the block cipher mode of encryption. ECB(Electronic Code Book) is the simplest encryption mode and does not require IV for encryption. The input plain text will be divided into blocks and each block will be encrypted with...
 

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's not decrypted here...

Документация по MQL5: Общие функции / CryptEncode
Документация по MQL5: Общие функции / CryptEncode
  • www.mql5.com
//| ArrayToHex                                                       | //| Script program start function                                    |
Reason: