Efficient order execution - Assign Hot Key... - NinjaTrader Programming | futures io social day trading
futures io futures trading


Efficient order execution - Assign Hot Key...
Updated: Views / Replies:1,904 / 10
Created: by frontrunner007 Attachments:8

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 8  
 
Thread Tools Search this Thread
 

Efficient order execution - Assign Hot Key...

  #1 (permalink)
Elite Member
Los Angeles/USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 5 since Jul 2014
Thanks: 8 given, 1 received

Efficient order execution - Assign Hot Key...

Hey guys,

I'm curious if this is even possible, but the idea is to create an automated order entry hotkey to be able to quickly enter an ATM using NinjaTrader. For example, for a long entry assign F9 to buy stop 1 tick above the previous candles high and place a stop below the previous candle's low? For shorting the market it would be the opposite - assign F10 to sell stop 1 tick below the previous candles low and place a stop above the previous candle's high?

Any help would be greatly appreciated.

Cheers

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
North America
 
Futures Experience: None
Platform: NT
Favorite Futures: Futures
 
Fritzk's Avatar
 
Posts: 1,384 since Jan 2013
Thanks: 3,457 given, 5,063 received



frontrunner007 View Post
Hey guys,

I'm curious if this is even possible, but the idea is to create an automated order entry hotkey to be able to quickly enter an ATM using NinjaTrader. For example, for a long entry assign F9 to buy stop 1 tick above the previous candles high and place a stop below the previous candle's low? For shorting the market it would be the opposite - assign F10 to sell stop 1 tick below the previous candles low and place a stop above the previous candle's high?

Any help would be greatly appreciated.

Cheers

NinjaTrader Version 7

Head up and keep your stick on the ice!
Reply With Quote
The following user says Thank You to Fritzk for this post:
 
  #4 (permalink)
Elite Member
Los Angeles/USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 5 since Jul 2014
Thanks: 8 given, 1 received

Thanks Fritzk.

But yeah, know about those hot keys.. however, they do not detect previous candle's high/low. I was wondering if this is programmable? And having the order execution utilize this information to submit an ATM.

Reply With Quote
 
  #5 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,340 since Dec 2012
Thanks: 11,282 given, 7,092 received


frontrunner007 View Post
Thanks Fritzk.

But yeah, know about those hot keys.. however, they do not detect previous candle's high/low. I was wondering if this is programmable? And having the order execution utilize this information to submit an ATM.

Yes, it is certainly programmable, built one tonight as a Saturday fun project, mine uses +/- keys, i'll productionise and ship it here next week. Nice idea.

Travel Well
Reply With Quote
The following 3 users say Thank You to ratfink for this post:
 
  #6 (permalink)
Elite Member
Los Angeles/USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 5 since Jul 2014
Thanks: 8 given, 1 received

can we do a mind-meld?

ratfink, you're awesome. thank you. feature request, is it possible to queue the order ahead of time on the local system (not the exchange) before the candle prints and then automagically execute the order immediately following the print? This will eliminate a lot of human error, especially getting in too late or even too early.

P.S. If there's anything I can do to contribute please don't hesitate. I am very appreciative of your time and talents.

Cheers

Reply With Quote
 
  #7 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,340 since Dec 2012
Thanks: 11,282 given, 7,092 received


frontrunner007 View Post
ratfink, you're awesome. thank you. feature request, is it possible to queue the order ahead of time on the local system (not the exchange) before the candle prints and then automagically execute the order immediately following the print? This will eliminate a lot of human error, especially getting in too late or even too early.

P.S. If there's anything I can do to contribute please don't hesitate. I am very appreciative of your time and talents.

Cheers

Well, for a start the number of stupid things I've done in my life rules out any possibility of awesome, so we can kill that one.

I'm still exploring this whole area so we'll see how I get on and I'm more than happy to work together on it, I'll ship in some code in the next day or two and then you can tell me how I've completely missed the point, lol.

What works so far (in my +/-/Return key test version, should be configurable to any keys/Alts/whatever eventually) is:

Minus key - cancels any pending orders, closes any open positions and, if the current market price is inside the previous bar, immediately sets a sell order at the Low of the previous bar when pressed and, if the order is executed, automatically sets a buy stop order at the saved High of the previous bar when the key was pressed.

Plus key - cancels any pending orders, closes any open positions and, if the current market price is inside the previous bar, immediately sets a buy order at the High of the previous bar when pressed and, if the order is executed, automatically sets a sell stop order at the saved Low of the previous bar when the key was pressed.

Return key - cancels any open orders and exits any open market positions.

Orders are Gtc so can trigger any number of bars after user requested, e.g works well for congestion breakdown/breakout and I think it already works in the way you describe, but I could easily be dumb enough to miss the elephant...

We can discuss options for using Closes rather than Highs/Lows and for using previous bar when executed rather than previous bar when key pressed (but that version resulted in a lot of stops getting hit, so I dropped it for now.)

I will look into targets and see if I can link it more directly into Ninja user built ATM's, I didn't have enough time yesterday to explore.

At the moment it runs in one chart and I visibly monitor the orders and positions in a separate ChartTrader chart (as you can't have a strategy running in a ChartTrader chart)

I will also explore having it as an indicator that hooks into ChartTrader (same as MiniTradePanel does), and optionally drawing the positions in the strategy window if we keep it as a strategy as well, obviously there are pros and cons to each approach.

At the end of the day if/once we have something sensible working anybody can do whatever works best (and safely) for them or we can just evolve it, I'm liking it so far. Obviously all use of such tools is entirely at the users risk.

There may be other tools on the forum that already do this but I wanted to understand the area for my own work anyway so I'm glad you dropped the idea in. Cheers.

Travel Well

Last edited by ratfink; August 17th, 2014 at 09:45 AM.
Reply With Quote
The following 2 users say Thank You to ratfink for this post:
 
  #8 (permalink)
Elite Member
Los Angeles/USA
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 5 since Jul 2014
Thanks: 8 given, 1 received

The very fact that you responded with exploratory evidence makes you an awesome individual.

The minus/plus/return key functions are spot on. The return key function is especially helpful for resetting the entry on the fly.

Defining manual targets will more than suffice, although attaching the hotkey to the selected ATM in the NT DOM allows the solution to leverage the rich features already built into the ATM framework. This is certainly not a core requirement, but rather a "nice to have". Pre-defined targets works just fine, too.

I find that the previous candles High/Low (+/- 1 or 2 ticks depending on the time frame) for entries and stops works well for my trading system and rules, but to each is own. Different strokes for different folks. If this is something we could configure it would be incredibly flexible and helpful for many trading styles. I could see where the solution you describe works better for very fast scalping, 1-2 ticks. Tell me if I'm wrong (highly likely).

I too use NT/Jigsaw for order execution, order flow and data, and use TD's TOS (Newbie) for charting - but that's just my preference. I haven't fully migrated from TOS yet.. I'm still doing the "keep repeating until insanity ensues" approach to trading.

I haven't found any tools that do this yet. I've seen some posts on the NT forums but I'll scour around some more because I would hate for you to recreate the wheel.

Best regards.

Reply With Quote
The following 2 users say Thank You to frontrunner007 for this post:
 
  #9 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,340 since Dec 2012
Thanks: 11,282 given, 7,092 received

Hi @frontrunner007, I appreciate the kind words, thank you.

Have done some more building and exploring and as of today I am ruling out closer integration with the NT Atm strategies, way above my pay grade for now, I sort of glazed over when I got in there ... It looks like a lot of work to get something that I would be comfortable with and I've already got too much on the go for this year.

However, it doesn't seem to be a big deal, a simple lean mean solution may be enough. I have done extensive testing of the core approach today (only on 20X-30X Fdax replay data of course) and it seems to stand up for itself. The SetStopLoss/SetTargetPrice OCO now goes in with the order as per Ninja and in the current version I've also added a chase mode which uses the current developing bar's H/L rather than the previous, this seems surprisingly effective. Alt-key separates the two modes, chase uses fixed 8/16 tick stop/targets, not the 1-2 you suspected

I'll do some more testing tomorrow and make it a bit more configurable, then you can have a play. I was assuming that anybody wanting sophisticated stuff would be using one of the high-faluting Jigsaw/9G/etc DOMs anyway.

Cheers for now and thanks again for kicking this off, I've had fun and the cricket was awesome, the cats are happy and the missus is painting. Only bad news is we've run out of vodka, bugger.

Travel Well
Reply With Quote
The following 3 users say Thank You to ratfink for this post:
 
  #10 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,340 since Dec 2012
Thanks: 11,282 given, 7,092 received

update so far



frontrunner007 View Post
The minus/plus/return key functions are spot on. The return key function is especially helpful for resetting the entry on the fly.

I find that the previous candles High/Low (+/- 1 or 2 ticks depending on the time frame) for entries and stops works well for my trading system and rules, but to each is own. Different strokes for different folks. If this is something we could configure it would be incredibly flexible and helpful for many trading styles.

A lot is working now and I have decided to polish it more than I originally intended for the selfish reason (often the best reason ) that it seems to be beneficial to my own trading, encouraging me to participate a lot more in breakout and with-trend momentum trades than I normally would. This was an outcome I did not expect so thank you, it has reminded me of a time a friend and I got hold of some old 80's synthesisers and each time you pressed a key on a new one it instantly created a mental shot of the song or group that was created by it's existence.

The Alt key switch for previous bar or current bar is now replaced by the Ctrl key - for the simple reason that there is a horrible Ninja<->Windows bug in mouse/key handling where a (fake) mouse leave event can get generated up to 200ms after an Alt-key up event, this is a stateful strict no-no and can't be countered as genuine mouse leave events can also occur in the same time frame. I use mouse enter/leave events and gotfocus tests to enable or disable the key trader and it's visible display.

I have attached some example shots of where it's at now, that will be extended today and, as the markets seem to have gone into a jumpy summer mode, I'm happy tidying it up for my own use and anybody else who wants to try it and will create a new support thread when done and link to it in here.

I may re-investigate more complex Atm integration at some future time but it doesn't seem necessary for now.

Cheers.

Travel Well
Attached Thumbnails
Efficient order execution - Assign Hot Key...-0-fdax-09-14-3-min-6h23m4s.png   Efficient order execution - Assign Hot Key...-0-fdax-09-14-3-min-6h23m7s.png   Efficient order execution - Assign Hot Key...-0-fdax-09-14-3-min-6h23m22s.png   Efficient order execution - Assign Hot Key...-0-fdax-09-14-3-min-6h25m6s.png   Efficient order execution - Assign Hot Key...-0-fdax-09-14-3-min-6h25m17s.png   Efficient order execution - Assign Hot Key...-0-fdax-09-14-3-min-6h25m21s.png   Efficient order execution - Assign Hot Key...-0-fdax-09-14-3-min-6h25m34s.png   Efficient order execution - Assign Hot Key...-0-fdax-09-14-3-min-6h25m52s.png  
Reply With Quote
The following 5 users say Thank You to ratfink for this post:

Reply



futures io > > > > > Efficient order execution - Assign Hot Key...

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Order Execution Inquiry newbietoons Traders Hideout 3 June 19th, 2013 08:05 PM
Order Execution Process GSREDDY NinjaTrader 1 September 19th, 2012 01:59 AM
Which data for the order execution? Ironman9973 Elite Automated Trading 4 July 29th, 2012 07:05 AM
Hot key programming PandaWarrior NinjaTrader 3 April 19th, 2012 12:36 AM
Virtual Desktop Tool -if short on screen space scroll groups of windows -with hot key ejtrader The Elite Circle 7 February 26th, 2011 09:16 PM


All times are GMT -4. The time now is 04:22 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-17 in 0.17 seconds with 20 queries on phoenix via your IP 54.227.51.103