Download MetaTrader 5

Toolbar custom button to run a script

To add comments, please log in or register
rod178
272
rod178  
Is it possible to run a script from a user created button placed on a toolbar, as distinct from the screen?
qjol
3243
qjol  
AFAIK WinAPI only
rod178
272
rod178  
qjol:
AFAIK WinAPI only

Seems so. Too bad.

It would be useful that MT4 at least provided a few extra toolbar buttons that the user could code to run scripts . Maybe an alternative to to using Hotkeys.

Alain Verleyen
Moderator
32394
Alain Verleyen  
rod178:
Is it possible to run a script from a user created button placed on a toolbar, as distinct from the screen?
Why not use the Favorites ?
qjol
3243
qjol  
rod178:

Seems so. Too bad.

It would be useful that MT4 at least provided a few extra toolbar buttons that the user could code to run scripts . Maybe an alternative to to using Hotkeys.

is it so bad to use winapi ?
rod178
272
rod178  
qjol:
is it so bad to use winapi ?

WinAPI is overkill and favirites too limiting

Decided to develop a pseudo toolbar in a new pane using MT4's 'now availanle OBJ_BUTTON, OnChartEvent(), CHARTEVENT_OBJECT_CLICK.

onewithzachy
2271
onewithzachy  

Right click your script > set hotkey.



1221


rod178
272
rod178  

already have numerous Hotkeys attached to scripts, too many actually. Prefer a GUI alternative.

The nice aspect of using the Buttons is that they provide feedback as to 'state'

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
Yes, you can use object and create it in subwindow. Works like a charm.
To add comments, please log in or register