Questions from a "dummy" - page 116

 
220Volt:
Help!!! I know that the dll "hangs" in memory as long as there are processes that loaded it. Question: is there any "stuff" and directives which can be used to leave dll in memory even without any processes using this dll? And unloading dll would be on the shoulders of OS.
http://support.microsoft.com/kb/164787

You need to loop in the entry point.
I recommend to organize a shared section and put a flag in it which you will use to exit the loop.
Use an exported function to set this flag.
When the library is no longer needed (or you need to update it), call this function to exit rundll32.exe correctly (unload the library from memory).
INFO: Windows Rundll and Rundll32 Interface
  • support.microsoft.com
Microsoft Windows 95, Windows 98, and Windows Millennium Edition (Me) contains two command-line utility programs named Rundll.exe and Rundll32.exe that allow you to invoke a function exported from a DLL, either 16-bit or 32-bit. However, Rundll and Rundll32 programs do not allow you to call any exported function from any DLL. For example, you...
 
mql5:
http://support.microsoft.com/kb/164787

You need to loop in an entry point.
I recommend organising a shared section and placing a flag in it for when you want to exit the loop.
Use an export function to set this flag.
When the library is no longer needed (or you need to update it), call this function to exit rundll32.exe correctly (unload the library from memory).
This is very "bad" advice. Use it only at your own risk.
 
Renat:
This is very 'bad' advice. You can only use it at your own risk.

It's easy to criticise! Especially developers...

What should we do? Make everyone feel good?

 
MetaDriver:

It's easy to criticise! Especially developers...

What should we do to make everyone feel good?

Cycling the DLL is blatantly self-harming, so it's bad advice.

Someone may do so, and then we will be blamed for the problems and direct deception.

 
Thank you for your answers.
 

Gentlemen, could you please tell me how to determine which candle was clicked on theCHARTEVENT_CLICK event?

The x and y coordinates on the chart are transmitted, can they somehow be associated with the time series?

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Типы событий графика
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Типы событий графика
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы графиков / Типы событий графика - Документация по MQL5
 
meneo:

Gentlemen, could you please tell me how to determine which candle was clicked on theCHARTEVENT_CLICK event?

I received x and y coordinates on the chart, can they somehow correlate with time series?

There is a ChartGetIntegert that can return the number of bars in the window / size in pixels by X/Y

This data is used to translate screen coordinates into bars.

 
sergeev:

There is a ChartGetIntegert that can return the number of bars in the window / size in X/Y pixels

this data is used to convert screen coordinates into bars.

how can we account for the gaps between adjacent bars on the chart? they can vary greatly

 

How can this be? (see calculation of variable k and values of all variables in debug mode)

 
meneo:

How can this be? (see calculation of variable k and values of all variables in debug mode)

with integer division 468/869 == 0, so ....

// Please ask the developers to carve on some suitable rock at the entrance to the forum :

3 / 5 = 0

//or something like this :

5 / 3 = 1 5 % 3 = 2

3 / 5 = 0 3 % 5 = 3