NexusFi: Find Your Edge


Home Menu

 





ninja & AutoHotKey for order entrys


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one redratsal with 13 posts (21 thanks)
    2. looks_two monpere with 9 posts (8 thanks)
    3. looks_3 max-td with 7 posts (4 thanks)
    4. looks_4 paulg with 5 posts (0 thanks)
      Best Posters
    1. looks_one redratsal with 1.6 thanks per post
    2. looks_two sam028 with 1 thanks per post
    3. looks_3 monpere with 0.9 thanks per post
    4. looks_4 max-td with 0.6 thanks per post
    1. trending_up 31,601 views
    2. thumb_up 38 thanks given
    3. group 20 followers
    1. forum 60 posts
    2. attach_file 1 attachments




 
Search this Thread

ninja & AutoHotKey for order entrys

  #31 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,171
Thanks Received: 6,018

With the free autohotkey i'd like to create five key combinations to select my five opened templates.

Currently, i have one global template named "6E_ES_NQ_TF" to monitor four symbols but i also have in the background a more detailed template for each of them named respectively "6E", "ES", "NQ" and "TF".

What would the script look like if i wanted to select the template named "6E" via a key combination such as alt+1 ? Do i simply need to invoke a hotkey command to open the menu File>Workspaces>6E of the control center window ?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Futures True Range Report
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 thanks
  #32 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090


trendisyourfriend View Post
With the free autohotkey i'd like to create five key combinations to select my five opened templates.

Currently, i have one global template named "6E_ES_NQ_TF" to monitor four symbols but i also have in the background a more detailed template for each of them named respectively "6E", "ES", "NQ" and "TF".

What would the script look like if i wanted to select the template named "6E" via a key combination such as alt+1 ? Do i simply need to invoke a hotkey command to open the menu File>Workspaces>6E of the control center window ?

If the workspaces are already opened you can use the NT short cut shift+f3 to switch them.

Visit my NexusFi Trade Journal Reply With Quote
  #33 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,171
Thanks Received: 6,018



redratsal View Post
If the workspaces are already opened you can use the NT short cut shift+f3 to switch them.

I know but this is not working quickly enough and beside if you do that at some point it stops at the control center. So i'd like to get something more solid. But thanks anyway, that's a good try ;-)

P.S. your avatar makes me think about these charts we often see full of lines. Can't really decide which level to take into consideration.

Reply With Quote
  #34 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371


trendisyourfriend View Post
I know but this is not working quickly enough and beside if you do that at some point it stops at the control center. So i'd like to get something more solid. But thanks anyway, that's a good try ;-)

P.S. your avatar makes me think about these charts we often see full of lines. Can't really decide which level to take into consideration.

Shift-F3 cycles through all the open workspaces. If you see the control center in the cycle, you may have an open workspace with no charts. With AutoHotkey, you could activate the Contol Center window, and send the keys ALT, F, W, and then the first letter of the open workspace you want, then send ENTER. This would navigate to your desired workspace via the file menu.

Reply With Quote
  #35 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,171
Thanks Received: 6,018


monpere View Post
Shift-F3 cycles through all the open workspaces. If you see the control center in the cycle, you may have an open workspace with no charts. With AutoHotkey, you could activate the Contol Center window, and send the keys ALT, F, W, and then the first letter of the open workspace you want, then send ENTER. This would navigate to your desired workspace via the file menu.

That's true i had an untitled workspace with no chart. Thanks for the tip but what is the name of the control center window, is it just that "Control Center" ? i ask this as i also see the name of the current workspace after it.

Reply With Quote
  #36 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090

Don't expect to be so much faster with autohotkey, you will assign a key for each workspace you will need to find the right keys on the keyboard, whereas with shift+f3 you hit sequentially until you find what you're looking for.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #37 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371


trendisyourfriend View Post
That's true i had an untitled workspace with no chart. Thanks for the tip but what is the name of the control center window, is it just that "Control Center" ? i ask this as i also see the name of the current workspace after it.

If you have 3 workspaces '6E' and 'ES', 'TF' then you could the following script to access each one by using Control-1, Control-2, and Control-3, just add more entries for additional workspaces:

;###
;### Start Of Script
;###
^1::
IfWinExist, Control Center
{
WinActivate
Send !{f}{w}{6}{ENTER}
}
return
^2::
IfWinExist, Control Center
{
WinActivate
Send !{f}{w}{e}{ENTER}
}
return
^3::
IfWinExist, Control Center
{
WinActivate
Send !{f}{w}{t}{ENTER}
}
return ;
;###
;### End Of Script
;###

Reply With Quote
  #38 (permalink)
paulg
NY
 
Posts: 90 since Sep 2009
Thanks Given: 54
Thanks Received: 23

In NT, is there any way to click to place a limit order at the same price with 3 clicks, e.g. 1+1+1 , instead of using the context menu to change the lot size (and eventually the queue since you're increasing the order size in a FIFO engine)?

Reply With Quote
  #39 (permalink)
 
l1onel's Avatar
 l1onel 
The Valley ANGUILLA Caribbean
 
Experience: Advanced
Platform: TWS,Ninjatrader
Broker: IB, Ninjatrader
Trading: ES, NQ
Posts: 81 since Apr 2010
Thanks Given: 25
Thanks Received: 33

Could it be possible to write a sample strategy with 2 hotkeys inputs ? like CTRL+SHIFT+B for buy, and S for sale. So we could manage position with the strategy. Would be great for for scalping and news.
Thanks in advance

I believe only in profits, not in prophets.
Follow me on Twitter Reply With Quote
  #40 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090


I have been rethinking the possibility to switch my NT workspaces in a faster way. Since I didn't like to assign a key sequence on my keyboard via autohotkey, as it could interfere with non trading activities, for example while I am writing a post via futures.io (formerly BMT) I could hit an AHK key and launch the function without wanting it. I also didn't like the idea to pause and restart the AHK everytime. I found a fast and easy solution by creating single functions via AHK and installing them on the windows tasks bar. As AHK assigns always the same icon, I created personalized icons with the name of my workspace in order to better visualize wich workspace I want to open. I applied the icons to each function via the icon changer function of AHK (C:\Program Files (x86)\AutoHotkey\Compiler\ahk2.exe).

Instead of using the sequential shift+f3 NT function, which might be long if working with several workspaces, this method is fast and direct; all I have to do is click on the respective icon and the workspace will be opened within the blink of an eye.

In the attached video a brief demonstration how to use the function:



Find below the AHK script code for each function (the function replactes the sequence of keys as with the mouse; in the control center alt+f+w+ the initial letter of the workspace)

WinWait, Control Center ,
IfWinNotActive, Control Center , , WinActivate, Control Center ,
WinWaitActive, Control Center ,
Sleep, 100
Send, {ALTDOWN}f{ALTUP}w5

Note:

The first letter of each workspace name must be different

For the icon builder you can find many free applications on the web, I used IcoFx2.0

The CPU usage with AHK is irrelevant, as the functions are closed once executed.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on December 1, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts