Hotkeys for Buy and Sell - page 5

 
SaamyT:
Can you please tell me if there is some MQL functionality available, which make it possible to catch keyboard input while the EA is working???

Simply, this is the Hotkeys.

 

how to set Target Profit at hot key

I already install at my mt4. when executed at char, 2 open post buy opened. with out TP and SL. How to fix that.

Thank.

 
 

Very usefull indeed, the problem is that as far as I see, those shortkeys are not used by all brokers as guidelines when building their system or at least the one I'm testing.

 

Hotkey for switching between currency pairs

Hello,

does anybody know a hotkey with which I can switch between my listed currency pairs?

I've attached what I mean.

Jass

and i don't mean alt + W. Actually, more a hotkey for switching to the chart window of the currency right/left to the current one.

Files:
hotkey1.jpg  430 kb
 
jass: i don't mean alt + W. Actually, more a hotkey for switching to the chart window of the currency right/left to the current one.

Control-tab, control-shift-tab.

 
jass:

Hotkey for switching between currency pairs

Hello,

does anybody know a hotkey with which I can switch between my listed currency pairs?

I've attached what I mean.

Jass

and i don't mean alt + W. Actually, more a hotkey for switching to the chart window of the currency right/left to the current one.

You can just program it.

#define KEY_LEFT           37
#define KEY_RIGHT          39

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   Print("The expert with name ",MQL5InfoString(MQL5_PROGRAM_NAME)," is running");
//--- enable object create events
   ChartSetInteger(ChartID(),CHART_EVENT_OBJECT_CREATE,true);
//--- enable object delete events
   ChartSetInteger(ChartID(),CHART_EVENT_OBJECT_DELETE,true);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,         // Event identifier  
                  const long& lparam,   // Event parameter of long type
                  const double& dparam, // Event parameter of double type
                  const string& sparam  // Event parameter of string type
                  )
  {
//--- the left mouse button has been pressed on the chart
   if(id==CHARTEVENT_CLICK)
     {
      Print("The coordinates of the mouse click on the chart are: x = ",lparam,"  y = ",dparam);
     }
//--- the mouse has been clicked on the graphic object
   if(id==CHARTEVENT_OBJECT_CLICK)
     {
      Print("The mouse has been clicked on the object with name '"+sparam+"'");
     }
//--- the key has been pressed
   if(id==CHARTEVENT_KEYDOWN)
     {
      switch(lparam)
        { 
         case KEY_LEFT:          Print("The KEY_LEFT has been pressed");           break;
         case KEY_RIGHT:         Print("The KEY_RIGHT has been pressed");          break;
         default:                Print("Some not listed key has been pressed");
        }
      ChartRedraw();
     }
//--- the object has been deleted
   if(id==CHARTEVENT_OBJECT_DELETE)
     {
      Print("The object with name ",sparam," has been deleted");
     }
//--- the object has been created
   if(id==CHARTEVENT_OBJECT_CREATE)
     {
      Print("The object with name ",sparam," has been created");
     }
//--- the object has been moved or its anchor point coordinates has been changed
   if(id==CHARTEVENT_OBJECT_DRAG)
     {
      Print("The anchor point coordinates of the object with name ",sparam," has been changed");
     }
//--- the text in the Edit of object has been changed
   if(id==CHARTEVENT_OBJECT_ENDEDIT)
     {
      Print("The text in the Edit field of the object with name ",sparam," has been changed");
     }
  }

If you add the chart id's and use something like

CHART_BRING_TO_TOP

Property to raise the charts.

 
5 years old topic guys.
Reason: