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 32,016 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

  #11 (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


max-td View Post
what does the "sleep 100" do in the script ?


it's a break period1/10 of sec to prevent beeing too fast and type mismatch

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Increase in trading performance by 75%
The Elite Circle
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
11 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #12 (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


redratsal View Post
it's a break period1/10 of sec to prevent beeing too fast and type mismatch


You can use this function during important news event see "Fishing for Bargains" episode 2 from Don Miller Episode #2: “Fishing For Bargains” :: Trading After Dark

Visit my NexusFi Trade Journal Reply With Quote
  #13 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927


ah very good !
i had issues some times yet with too fast + messed up action .

the one-klick (1-key) solution is the best i think, but one must take care what a solo-key-press triggers if you are not in a chart-window.
i have not much experience wtih this till now, i will see how its the best.

maybe an addition windows-recognition will be good, so the script only runs if it detects that you are in a chartwindow.

or so .....

do you have a "portable version" of AHK ? cause you say : ATH without installing.
BTW : autohotkey is a free tool.

max-td
Reply With Quote
  #14 (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


max-td View Post
ah very good !
i had issues some times yet with too fast + messed up action .

the one-klick (1-key) solution is the best i think, but one must take care what a solo-key-press triggers if you are not in a chart-window.
i have not much experience wtih this till now, i will see how its the best.

maybe an addition windows-recognition will be good, so the script only runs if it detects that you are in a chartwindow.

or so .....

do you have a "portable version" of AHK ? cause you say : ATH without installing.
BTW : autohotkey is a free tool.


The problem with window recognition is matching
You can compile (exe) any ahk file and make it run without the free software

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #15 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

here what i did + what works for checking if the active window is
a CL window in this example :

!b:: ; >> means type >> Alt + B
IfWinActive, CL,
{
Click up right,
Sleep, 50
Send b
Sleep, 50
send,{Enter}
}
return


^<:: ; >> means type >> ctrl+ <
IfWinActive, CL,
{
Click up right,
Sleep, 50
Send s
Sleep, 50
send, { Enter }
}
return

max-td
Reply With Quote
  #16 (permalink)
 
bobarian's Avatar
 bobarian 
whitestone, new york
 
Experience: Intermediate
Platform: ninja trader
Posts: 1,995 since Oct 2010
Thanks Given: 5,258
Thanks Received: 3,120

thanks to everyone for the great ideas about quick order execution on the cl.i was missing more entries , because it is so fast..in my quest to keep it simple, i thought, when a buy is setting up, place a buy stop way above the market , then left click on the buy stop line on the chart.i use chart trader.now , the order is inactive, as the entry gets close , i drag it down to where i want my entry, and just left click..this order is now pending.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #17 (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


max-td View Post
here what i did + what works for checking if the active window is
a CL window in this example :

!b:: ; >> means type >> Alt + B
IfWinActive, CL,
{
Click up right,
Sleep, 50
Send b
Sleep, 50
send,{Enter}
}
return


^<:: ; >> means type >> ctrl+ <
IfWinActive, CL,
{
Click up right,
Sleep, 50
Send s
Sleep, 50
send, { Enter }
}
return

The function Winactive check if the window exists and it is currently active. You need to instruct the script how you want to make the check, this is the function and the parameters possibile:

SetTitleMatchMode, MatchMode (can be 1/2/3)

1: A window's title must start with the specified WinTitle to be a match.
2: A window's title can contain WinTitle anywhere inside it to be a match.
3: A window's title must exactly match WinTitle to be a match.

the default setting is 1


I would not suggest to use winactive because:
1)the name of the windows might change (CL,ES,YM,etc)
2)You might have more than one window on your workspace

Better if you activate=run the script (will work in any zone of your window) or deactivate=exit the script (when you're done with the script) . When the script is active you will notice an H icon on the right tray of the screen. What you can do to close the script is build, within your script, a one key function like this:

c::
exitapp

pushing the c key will exit the script and your keyboard will act normally. You can replace the key c with any other key.

A lot of words to explain, I hope I was clear

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #18 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927


Quoting 
A lot of words to explain, I hope I was clear


thanks, got it now

max-td
Reply With Quote
  #19 (permalink)
 steve2222 
Auckland, New Zealand
 
Experience: Beginner
Platform: Sierra Chart
Broker: AMP/CQG
Trading: Whatever moves in my timezone
Posts: 1,896 since Sep 2009
Thanks Given: 3,379
Thanks Received: 1,540


redratsal View Post
Better if you activate=run the script (will work in any zone of your window) or deactivate=exit the script (when you're done with the script) . When the script is active you will notice an H icon on the right tray of the screen. What you can do to close the script is build, within your script, a one key function like this:

c::
exitapp

pushing the c key will exit the script and your keyboard will act normally. You can replace the key c with any other key.

A lot of words to explain, I hope I was clear

Hi @ redratsal

Is there a function in AutoHotKey where you can pause the script rather than close it?

I noticed if you right click on the 'H' icon in the Sys tray it has option to pause script, so I wondered if something like:

p::
pauseapp

Would pause script rather than exit it?

Thanks

Reply With Quote
  #20 (permalink)
 steve2222 
Auckland, New Zealand
 
Experience: Beginner
Platform: Sierra Chart
Broker: AMP/CQG
Trading: Whatever moves in my timezone
Posts: 1,896 since Sep 2009
Thanks Given: 3,379
Thanks Received: 1,540



redratsal View Post
Those functions are not customizable with the Hot Key Manager, what you can do is use your keyboard:

Sell Limit= right click s + enter
Buy Stop= right click b + enter
Buy Stop Limit= right click ss + enter

It's not one button it's 2 but once you get confident it's faster

Hello @ redratsal

Where did you find the shortcut abbreviations for NT that told you 's' and 'b' when used with right mouse click would place sell and buy orders.

I mean the use of 's' and 'b' for sell and buy is logical, but how did you know this shortcut even existed - and are there other similar shortcuts ie is there some listing within the NT help files (I am not referring to the Hot Key Manager)?

Thanks

Reply With Quote




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