Jump to content
Macro Express Forums

Fidelity Active Trader Pro chart opening macro

Recommended Posts



I am using a program called Fidelity Active Trader Pro (including the screenshot of it).


As you can see, a row is selected and you can go up and down with the arrow keys. However, if you want to open a chart for the selected row, you need to double-click on the row with the mouse. No keystroke opens the chart but the left mouse double-click.


What I am trying to create is a keyboard shortcut that can double-click on the selected row and open the chart (skipping the mouse altogether). Keep in mind that the selected row can change. I have tried different things but nothing does what I need it to do.


Would you have any suggestions?





Active Trader.png

Link to comment
Share on other sites

Confirm that there is no keyboard shortcut for what you want to do. I googled "Fidelity Active Trader Pro keyboard shortcuts" and noticed many built-in hotkeys. 


If there is no hotkey, here are two ideas:


1. What happens if you right-click the row? Does a context menu appear with the option you need? Let's assume this is the context menu:






Can you navigate to the second item via down or up arrow keys? Note underlined accelerator keys. For the second item, Conversation, the accelerator key is V. What happens if you press "V?"


If any of these work, try this...


Text Type (Simulate Keystrokes): <SHIFT><F10> // Keyboard shortcut to Right Click
Text Type (Simulate Keystrokes): <ARROW DOWN><ARROW DOWN><ENTER>
// or...
Text Type (Simulate Keystrokes): <SHIFT><F10> // Keyboard shortcut to Right Click
Text Type (Simulate Keystrokes): v


2. Try routing the mouse pointer to the cursor position. This doesn't work in all programs. But if it works in this application, this script fragment might do the trick:


Mouse Move: To the Text Cursor Position
Mouse Left Double Click


Link to comment
Share on other sites

Hi Acantor,


I appreciate your help. At this time Active Trader Pro does not have a hotkey to open the charts directly so that you get the same effect as if you had double clicked the row. I've called them and they didn't know of a way to do it. This becomes more useful if you have to scan 20-30 stocks to see their charts, doing it from the keyboard would be much faster.


Your right-click suggestion was a great idea, they do have a way to trigger the chart but it pop-out a new window with the chart in it. This defeats the purpose because you would now have 20 open chart windows. When you double-click the row,  the chart opens in the chart window inside the app and this refreshes when you click on other row, So great idea but the app is a bit odd in the execution.


Your option 2 is the one I think could work. I followed your suggestion: Mouse Move: To the Text Cursor Position. I can "select" the row as the screenshot shows, but in the row, there is no blinking cursor, only the frame around the row so you know it's selected. So I've been trying to find a way to tell the macro program to "move the mouse pointer to the selected row and double-click it". I have not been able to figure out how to move the cursor to the selected row with the macro.


Hope this makes sense 😉


Thanks a bunch.

Link to comment
Share on other sites

It sounds like moving the mouse cursor to the row gives focus to the row, but does not select it. Try pressing spacebar to select the row. Or Ctrl+spacebar.


Or press down arrow, then up arrow. (Although this probably won't work right for the last row. Up, then down may not work for the first row.)

Link to comment
Share on other sites

I’m obviously missing something! How exactly do you do this at present? you select a row manually with the arrow keys, yes? And a double left mouse click will then do what you want, namely open a chart? So surely you just create a macro that performs the mouse double click, and activate it with your chosen hotkey?

Link to comment
Share on other sites

6 hours ago, terrypin said:

 So surely you just create a macro that performs the mouse double click, and activate it with your chosen hotkey?


I think this solution might only work when the mouse pointer happens to be hovering over the row. I don't know this application, but few programs I've seen move the mouse pointer when navigating via arrow keys. 

Link to comment
Share on other sites

OK, thanks Alan, I’d misunderstood.


Trauton: I’m very surprised that, having selected an entry manually with the arrow keys, there is then no single key or hotkey to open its chart. But I see that the developer confirmed that.


Is mouse usage really slower overall? After all, wouldn’t it mean you could then click or d-click directly after visual selection of your target?



Link to comment
Share on other sites

If moving the mouse to the text cursor position doesn't work (followed by space or Ctrl + space... or by Up arrow then Down arrow... or Down arrow then Up arrow....


Then the best option is probably what Cory suggested right off the bat: checking pixel colours.


Pixel checking under Windows 7 and earlier worked beautifully. They are slow under Windows 10, and therefore, I've been forced to change the way I hunt for colours. I used to check each pixel along a path; now I check every 20th, or 50th, or 100th. Looking at your screen shot, I'm guessing you could get away with checking every 50 pixels, which will likely be fast enough. Maybe something like this untested code:


// Calculate half horizontal size of window
Variable Set Integer %WinWidth%: Set to the Current Window's Width
Variable Modify Integer: %WinWidthHalf% = %WinWidth% / 2
// Maximum times to check for a pixel colour
Variable Set Integer %MaxChecks% to 25
// Y-coordinate fudge factor -- where to start checking pixel colours from top of window
Variable Set Integer %y% to 200
Repeat Start (Repeat %MaxChecks% times)
  Mouse Move: %WinWidthHalf%, %y% Relative to Current Window
  Get Pixel Color from Beneath the Mouse into %PixelColour%
  If Variable %PixelColour% Equals "123456" // Colour of a selected row
    Mouse Left Double Click
    Macro Stop
    Variable Modify Integer: %y% = %y% + 50 // Next time, check 50 pixels "south"
  End If
End Repeat
Text Box Display: Pixel colour not found!

<COMMENT Value="Calculate half horizontal size of window"/>
<VARIABLE SET INTEGER Option="\x0A" Destination="%WinWidth%"/>
<VARIABLE MODIFY INTEGER Option="\x03" Destination="%WinWidthHalf%" Value1="%WinWidth%" Value2="2"/>
<COMMENT Value="Maximum times to check for a pixel colour"/>
<VARIABLE SET INTEGER Option="\x00" Destination="%MaxChecks%" Value="25"/>
<COMMENT Value="Y-coordinate fudge factor -- where to start checking pixel colours from top of window"/>
<VARIABLE SET INTEGER Option="\x00" Destination="%y%" Value="200"/>
<REPEAT START Start="1" Step="1" Count="%MaxChecks%" Save="FALSE"/>
<MOUSE MOVE Option="\x02" X="%WinWidthHalf%" Y="%y%" _PROMPT="0x000A"/>
<GET PIXEL COLOR Option="\x00" Rel_To_Screen="TRUE" Destination="%PixelColour%"/>
<IF VARIABLE Variable="%PixelColour%" Condition="\x00" Value="123456" IgnoreCase="FALSE" _COMMENT="Colour of a selected row"/>
<VARIABLE MODIFY INTEGER Option="\x00" Destination="%y%" Value1="%y%" Value2="50" _COMMENT="Next time, check 50 pixels \"south\""/>
<TEXT BOX DISPLAY Title="Pixel colour not found!" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs14 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/>



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...