Global Variables versus FileWrite - page 5

 

i would like to use

void OnChartEvent(const int id,         // Event ID
                  const long& lparam,   // Parameter of type long event
                  const double& dparam, // Parameter of type double event
                  const string& sparam  // Parameter of type string events
                  )
   {

   if (id == CHARTEVENT_KEYDOWN)
   if (lparam == 114) // F3 has been pressed
      {
      Alert ("you are gonna mess around With thing that might stop the EA working properly");
      }
   }

unfortunately it doesn't work maybe MetaQuotes will fix it some time

 
qjol:

i would like to use

unfortunately it doesn't work maybe MetaQuotes will fix it some time


I thought we can just put any keydown masking and it would work OOTB. Guess not, huh?
 
no there is a few keys that doesn't work one of them is "F3"
 
Perhaps F3 is reserved for future terminal use ...
 
SDC:
Perhaps F3 is reserved for future terminal use ...

it's been used to day to open the GV window

so what ?

 
qjol:
no there is a few keys that doesn't work one of them is "F3"

I believe that it doesn't work with any of the F keys
 
GumRai:

I believe that it doesn't work with any of the F keys

actually "F5" is working you can test by yourself you don't need me for that ;-)
 
qjol:

it's been used to day to open the GV window

so what ?

so that is probably why you cant use it in mql4. Most times you wouldnt want to trigger a terminal function every time you use the f key for an EA function.
 
SDC:
so that is probably why you cant use it in mql4. Most times you wouldnt want to trigger a terminal function every time you use the f key for an EA function.

Like when you click F8 ... F9 ... F12 ... and so on.
 
SDC:
so that is probably why you cant use it in mql4. Most times you wouldnt want to trigger a terminal function every time you use the f key for an EA function.

i dont wanna use it, just want Alert the user if he presses "F3"

Alert ("you are about to mess around With thing that might stop the EA working properly");
Reason: