Login Page - Create Account

Support Board


Date/Time: Sat, 15 May 2021 12:16:45 +0000



[User Discussion] - Macros

[2021-04-21 17:23:49]
User98657 - Posts: 253 | Ending Date: 2021-07-22
Is there anyone using either AutoHotKey or MacroExpress to trigger trades and who would be willing to spend a few minutes helping me set it up?

I often go to trigger a trade using keyboard short cuts only to find the chart is not in focus and I miss the entry or exit. It appears the best way to avoid this is to use a macro and I'm unfamiliar with either product.

I'd also take a look at any other suggestions.

Thanks
[2021-04-22 15:05:12]
Japhro - Posts: 116 | Ending Date: 2021-11-05
I will be posting a related question shortly, I want to do something similar, but trade certain tickers only via stream deck and not have to select a dom or chart, just enter a trade on that specific ticker
[2021-04-22 15:08:09]
User98657 - Posts: 253 | Ending Date: 2021-07-22
I can say I tried MacroExpress and the results were not good.
[2021-04-22 18:15:32]
JohnR - User831573 - Posts: 85 | Ending Date: 2021-10-23
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 - 17 views
[2021-04-22 21:09:57]
anouar6869 - Posts: 12 | Ending Date: 2021-08-14
suppose you have alt+b shortcut in sierra chart for a market order

SetTitleMatchMode, RegEx
#IfWinNotActive,sierrainstancename
!b::
WinActivate, sierrainstancename
Send, !{b}
return
the example above will send the order at the last active chart in the main frame of sierra chart.
If you use more than one symbol in your chartbook you should use WinGetText to avoid to send the order to the wrong instrument.

To post a message in this thread, you need to login with your Sierra Chart account:

Login

Login Page - Create Account