[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 229

 
OK, I'm looking.
 
And who should form the graphic objects?
 
Start doesn't do that, alas...
 

Can you tell me how to implement a non-modal dialog box in mql4? I would like to use only WinAPI without writing additional dll, if it is at all feasible.

Let me be more specific. М1 timeframe, 8-10 pairs are open at the same time, in every window there is a signal indicator, which I have added a signal to perform some actions automatically outside the МТ4 window (the mouse is used through WinAPI). I visually control it and switch it off for the flat period and switch it on when out of the flat period. I want to collect triggers in GUI for all pairs in one window, and implement trigger at least as a ChheckBox with binding to each "hotkey".

Is it possible to implement it in mql4 without writing a separate dll? Or only with dll? Or in case of dll absence, I will have to use mql5 (because of mql4 and C++ data types mismatch, lack of classes, which is critical when calling some WinAPI functions)?

Added by

Is WinMain() needed or not, and how to call it from mql4? Is WinMain() added to .mq4 by compiler for example when calling MessageBoxA()?

 

Dear colleagues, I have a question. How to prescribe balance change. I've only found the function AccountBalance (), but I haven't found the function that changes the balance. I want to write a custom function to calculate the lot and I got stuck with balance change. I have tried to assign balance to the variable in init() and then change it in start (), but it works incorrectly. Maybe there is another way? Or is it ok?

int init()
  {
   
   Balance  =  AccountBalance();     // присваиваем первоначальное значение депозита
   
   return(0);
  }
//-------------------
int start()
  {
  if (Balance  >= AccountBalance())
     ......................
  if (Balance  < AccountBalance())
     .....................
  Balance  = AccountBalance();
  }
 

Dear Sirs! Could you please suggest something?

Which function returns the current date in the format : 01.12.1999


 
GaNDarM:

Dear colleagues, I have a question. How to write balance change. I've only found the function AccountBalance (), but I haven't found the function that changes the balance. I want to write a custom function to calculate the lot and I got stuck with balance change. I have tried to assign balance to the variable in init() and then change it in start (), but it works incorrectly. Maybe there is another way? Or is it ok?


That would be nice))) No, the account only changes on the server.

solnce600:

Which function returns the current date in the format : 01.12.1999


Either write a handler forDayOfYear(), or concatenateDay()+Month()+Year().

 
string s = TimeToStr(TimeLocal(),TIME_DATE);
string my_s = StringSubstr(s, 6, 0)+"."+StringSubstr(s, 3, 2)+"."+StringSubstr(s, 0, 2);
You could also do something like this.
 
solnce600:

Dear Sirs! Could you please suggest something?

Which function returns the current date in the format : 01.12.1999



The function is
 
r772ra:

The function
TIME_DATE gets the result in the form "yyyyy.mm.dd". If a person does not care about the standard of date representation, there is no argument.