Set up custom actions on assigned keyboard key. Open position, Close position, Break even key, Close 50% running operation.

 

Hi all, im very new to this, and after some research im not pretty ready to code anything yet. But I have something in mind maybe you guys can help.


So I want to assign market orders to keyboard with this parameters:

- BUY. (using current lotage shown in Trading panel)

- SELL.  (using current lotage shown in Trading panel)

- CLOSE 50% RUNNING. (Indefinitely, so if I open 1 lot and press once, it closes 0.5lots. If pressed again it closes 0.25 of that 0.5 lots.

- BREAKEVEN. 

Sounds so easy but I expect that to be harder than I can imagine. So I let a visual example of this idea.

There is programmable keyboard on aliexpress, also can be programmable for it. 


Do anyone know where I can learn that programming skills? where to start? Do somebody else uses something like that?

TY.

Files:
programkeys.jpg  46 kb
KEYS.jpg  271 kb
 
Alex Huetter: Hi all, im very new to this, and after some research im not pretty ready to code anything yet. But I have something in mind maybe you guys can help. So I want to assign market orders to keyboard with this parameters:

- BUY. (using current lotage shown in Trading panel)
- SELL.  (using current lotage shown in Trading panel)
- CLOSE 50% RUNNING. (Indefinitely, so if I open 1 lot and press once, it closes 0.5lots. If pressed again it closes 0.25 of that 0.5 lots.
- BREAKEVEN. 

Sounds so easy but I expect that to be harder than I can imagine. So I let a visual example of this idea. There is programmable keyboard on aliexpress, also can be programmable for it. Do anyone know where I can learn that programming skills? where to start? Do somebody else uses something like that?

Those keypads usually have there own software for programming their actions, as long as the underlying target application can accept certain windows API messages or keystrokes, but usually don't work for dynamic content or context specific mouse operations.

So, with that in mind, some of your goals are no possible.

Some of your goals, are however possible, but only via programming in MQL itself to react to keystroke chart events and carrying out your desired goal.

However, all that is going to be a round-about way to achieve things, when you can simply just learn MQL from the start, and program a trading panel of your own, including keystroke responses from a normal keyboard and save yourself the cost of such a keypad and having to learn two systems.

In other words, keep it simple! Don't complicate things by falling for "gadget" hype.

Reason: