This is a very handy AHK (AutoHotKey) script for creating charts. This is better than Window's default "Tile Windows" functionality because it overlaps those charts to make maximum use of screen real-estate. Hope you all like it.
Just install AHK from http://www.autohotkey.com/ ; and save attachment, rename to .ahk, customize for your need and run it (after establishing the Ninja connection). It assumes that you have a saved template that starts with 'S' for monitoring stocks and other saved template that starts with 'I' for monitoring indexes.
Enjoy,
- SU
Just install AHK from http://www.autohotkey.com/ ; and save attachment, rename to .ahk, customize for your need and run it (after establishing the Ninja connection). It assumes that you have a saved template that starts with 'S' for monitoring stocks and other saved template that starts with 'I' for monitoring indexes.
Enjoy,
- SU
Code:
; Fix following variables for your screen setup
CountX := 4
CountY := 2
; Screen used for chart is 1440x900
ScreenX := 1440
ScreenY := 900
; Show it on primary screen
;OffsetX := 0
;OffsetY := 0
; Show it on secondary screen
; with primary screen 1280x800
OffsetX := 1280
OffsetY := 0
; Open following 8 charts in given sequence
MyCharts()
{
OpenChart("SP500", "5 Min", "Index")
OpenChart("DJIA", "5 Min", "Index")
OpenChart("VIX", "5 Min", "Index")
OpenChart("GS", "5 Min")
OpenChart("SSO", "5 Min")
OpenChart("SDS", "5 Min")
OpenChart("FAZ", "5 Min")
OpenChart("SRS", "5 Min")
}
; No edit required below this line
; Calculate dimentions
WidthX := ScreenX / CountX
HeightY := ScreenY / CountY
WinWait, Control Center
WinActivate, Control Center
WinGetPos,,, Width, Height, Control Center
WinMove, Control Center,, (A_ScreenWidth/2)-(Width/2), (A_ScreenHeight/2)-(Height/2)
MyCharts()
WinMinimize, Control Center
OpenChart(Symb, Period = "5 Min", SType = "Stock")
{
; Define globals
global CountX, CountY, OffsetX, OffsetY, WidthX, HeightY
static ChartCount = 0
WinActivate, Control Center
MouseClick, left, 25, 40
MouseClick, left, 190, 64
MouseClick, left, 220, 110
WinWait, Format Data Series
WinActivate, Format Data Series
if (SType = "Stock")
{
MouseClick, left, 215, 80
MouseClick, left, 105, 188
MouseClick, left, 40, 236
Send S
MouseClick, left, 40, 236
}
if (SType = "Index")
{
MouseClick, left, 215, 80
MouseClick, left, 105, 175
MouseClick, left, 40, 236
Send I
MouseClick, left, 40, 236
}
MouseClick, left, 105, 100, 2
Send %Symb%
Sleep 20
StringSplit, PeriodArray, Period, " "
PeriodNumber = %PeriodArray1%
PeriodTimeframe = %PeriodArray2%
MouseClick, left, 75, 180, 2
Send %PeriodNumber%
Sleep 20
MouseClick, left, 160, 310
SetTitleMatchMode RegEx
WinWait %Symb%.*\(%Period%\)
Sleep 200
ChartX := Mod(ChartCount, CountX) * WidthX
ChartY := (ChartCount // CountX) * HeightY - 25
WinMove, %Symb%.*\(%Period%\),, OffsetX + ChartX, OffsetY + ChartY, (WidthX + 20), (HeightY + 25)
++ChartCount
SetTitleMatchMode 1
Sleep 20
}