Skip to content

Instantly share code, notes, and snippets.

@callmekohei
Last active April 24, 2020 13:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save callmekohei/6bf12147f5e7ee0fe39ab61824fb3315 to your computer and use it in GitHub Desktop.
Save callmekohei/6bf12147f5e7ee0fe39ab61824fb3315 to your computer and use it in GitHub Desktop.
; ===========================================================================
; FILE : foo.ahk
; AUTHOR : callmekohei <callmekohei at gmail.com>
; License : MIT license
; ===========================================================================
; Drawing
#IfWinActive ahk_class MetaQuotes::MetaTrader::4.00
; Delete previous object
D::Send {Backspace}
; Cursor
G::PostMessage, 0x111,33234,0
; Trend Line
T::PostMessage, 0x111,33257,0
^T::PostMessage, 0x111,33244,0
; Vertical line
V::PostMessage, 0x111,33260,0
; Rectangle and Triangle
R::PostMessage, 0x111,33247,0
^R::PostMessage, 0x111,33259,0
; Fib
F::PostMessage, 0x111,33237,0
^F::PostMessage, 0x111,35406,0
; Channels
C::PostMessage, 0x111,33248,0
^C::PostMessage, 0x111,33236,0
; Cross lines
X::PostMessage, 0x111,33233,0
; Text
E::
PostMessage, 0x111,33253,0
MouseClick
return
#IfWinActive
; TimeFrame
#IfWinActive ahk_class MetaQuotes::MetaTrader::4.00
; H1
1::PostMessage, 0x111,33135,0
; H4
2::PostMessage, 0x111,33136,0
; D1
3::PostMessage, 0x111,33134,0
; W1
4::PostMessage, 0x111,33141,0
; M15
5::PostMessage, 0x111,33139,0
#IfWinActive
; Viewing
#IfWinActive ahk_class MetaQuotes::MetaTrader::4.00
; Head, Left and Right
0::PostMessage, 0x111,33023,0
J::Send {Left}
^J::
Loop, 10
{
Send {Left}
}
K::Send {Right}
; Zoom in, Zoom out
W::PostMessage, 0x111,33025,0
S::PostMessage, 0x111,33026,0
; New chart, tile windows
N::
PostMessage, 0x111,57600,0
Send {Down}
return
L::PostMessage, 0x111,38259,0
P::
WinGet, tmp, MinMax, A
If tmp = 1
WinRestore, A
Else
WinMaximize, A
Return
#IfWinActive
; Indicators
#IfWinActive ahk_class MetaQuotes::MetaTrader::4.00
; Bollinge2σ-SMA21
B::
PostMessage, 0x111,34707,0
Send {Enter}
return
; Ichimoku
I::
PostMessage, 0x111,34715,0
Send {Enter}
return
; SMA21
M::
PostMessage, 0x111,34720,0
Send {Enter}
return
; Delete previous Indicator
^D::
PostMessage, 0x111,35419,0
Send {Tab}
Sleep 30
Send {Down 10}
Send {Tab}
Send {Enter}
Send {Tab}
Send {Enter}
Send {ShiftDown}
Send c
Send {Enter}
Send {Enter}
return
#IfWinActive
@episage
Copy link

episage commented Apr 24, 2020

Thanks! These hotkeys are the best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment