[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 259

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Must close on a stop loss. Forex opens at 00:00 GMT.
But will close not at the stopLoss price, but at the first price, which may be much lower than the stopLoss! And TakeProfit will close for sure. Therefore it is better not to leave with StopLoss, and even better not to leave positions for the weekend!
How can I find out the address of my user function? That is, if my listing says
then how do I get the address of myFunc? I need it to find out how to find out address of WndProc (I describe with custom function) for passing further to class parameter.
Must close on a stop loss. Forex opens at 00:00 GMT.
It is far from certain, it may well close at the first quote. You have to read the documents, and the brokerage companies write whatever they want.
How can I find out the address of my user function? That is, if my listing says
then how do I get the address of myFunc? I need it to find out how to find out address of WndProc (I describe with custom function) for passing further to class parameter.
Who says it even has an address? it's an MQL4-function: it's not even compiled in the literal sense of the word, but runs through the interpreter at runtime.
Why doesn't the expert modify orders?
Here's the function:
Called at the start like this:
Who said that it even has an address? It's an MQL4 function: it's not even compiled in the literal sense of the word, but runs through an interpreter at runtime.
That's where the dog is buried. I'm just sorry for 2 or 3 weeks of wasting my time, because I've chosen an independent windowing interface for my robot within just MQL4+WinAPI without any self-written dlls. I'm sorry I didn't realize it earlier, I'm sorry for my own code and developments.
To summarize. You cannot create an overlapped (i.e. not a child) window without copying the code into your dll, because when describing WNDCLASS (or WNDCLASSEX)
lines indicated by the arrow when packing the structure into an int array
array, the address of window procedure, i.e. mouse and keyboard handler for this window, is passed. The window procedure in MQL4 can be implemented as a user-defined function, but it is impossible to get its address within the interpreter, so there is nothing to pass. The maximum that is possible in MQL4 is to use the standard window classes, but they will be used only as the child windows. To put it simply, a window created by the indicator cannot be grasped with a mouse and placed over the terminal border (since it will be a child window), while an overlapped window can be placed over the terminal border. The child window on standard window classes is already implemented in mt4gui.dll, if anyone needs. But the overlapped window with its own mouse and keyboard handler is impossible.
I ask moderators to post this dialog and all related messages to a separate topic like "how to create a window in MQL4", so that others won't make the same mistakes and will be able to find it in a search engine.
Good day!
Does the broker read the ip address of the trader's computer only in online mode or is it technically possible to upload the history from some folder in MT4?
I decided to implement "hotkeys" (without using the control keys like Ctrl, Alt, Shift). But the code doesn't work.
Why would it not work? In theory, the smiley is supposed to change. I set 81 (Q key code), but you can set anything there. Here are the key codes:
Added: can't call PeekMessage - system error 127 "specified procedure not found". RegisterHotKey returns 1 (true). I tried to look calling RtlGetLastWin32Error() with NativeAPI after PeekMessage, it does not even come to it. And to point
- the compilation error will appear.