Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 14:18:38 +0000



Post From: Macros

[2021-04-22 18:15:32]
JohnR - User831573 - Posts: 300
I am not a pro at this, but I do use AutoHotKey. When I got stuck, I posted on the forums for it and there are some very helpful and knowledgeable folks there who quickly responded. I use AHK to be able to switch back and forth between two chartbooks and have the windows presented in a specific way. Before getting to the AHK part, I did use the capability within SC to set each chart window to a unique name that did not change with the change in contract month. Below is a part of what a 'script' within AHK looks like. It selects main SC window, then opens the desired chartbook. After that, it activates each desired window in a desired sequence to get the overlaying / view of all windows I want. At the end of the script, I go to the desired window, and I want all windows to be at the last / current real time bar, so I use Cntl+End to get to end of chart and I want the cursor/mouse to be in the open space to the right of the last bar, so I move the cursor. PM me if you would like to discuss a little further. i am in North Carolina - east time zone.

JohnR

; Win=# + Alt=! + s = brings 7 SierraChart chart windows to the front for ES or Oil Daily use. All except Daily.

>#!s::

CoordMode, Mouse, Screen

Input, SC_SingleKey, L1

If (SC_SingleKey = "e") {
  SetTitleMatchMode RegEx
  jorTitle = Sierra Chart
  if WinExist(jorTitle)   {
    WinActivate ;
    sleep,200
    Send !b
    sleep,200
    Send {down}
    sleep,200
    Send {Enter}
    sleep,200
    }

; Move 1st chart
if WinExist("ES_FootPrint_6765_Vol")
  WinActivate ;
Sleep, 200
if WinExist("ES_FootPrint_10_Range")
  WinActivate ;
Sleep, 200
if WinExist("ES_FootPrint_17711_Vol")
  WinActivate ;
Sleep, 200
if WinExist("ES_05_Range_Vol_n_Studies")
  WinActivate ;
Sleep, 200
if WinExist("ES_10_Range_Vol_n_Studies")
  WinActivate ;
Sleep, 200
if WinExist("ES_15_Min_Vol_n_Studies")
  WinActivate ;
Sleep, 200
if WinExist("ES_17711_Vol_n_Studies")
  WinActivate ;
Sleep, 200
if WinExist("ES_6765_Vol_n_Studies")
  WinActivate ;
Sleep, 200

; Now move mouse to hover SC chart, click to activate the chart then Cntl End then move mouse 2 spaces to align all charts
x := 810
y := 525
Click %x% %y%
Sleep,200
Send ^{End}
Sleep,200
MouseMove, 3, 0, 7, R
click
return
Date Time Of Last Edit: 2021-04-22 18:17:28
imageAHK-SC title bar setting.jpg / V - Attached On 2021-04-22 18:17:21 UTC - Size: 56.24 KB - 182 views