Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I place orders with an indicator (not in a strategy).To cancel the last order I use a shortcut from the hotkey manager.
I would like to do this with a button in the toolbar that I use to clear pending stuff from the last order. Is there a way to program this command (not the button), or to simulate the shortcut (Ctrl+Alt+Escape) without pushing the keys?
Can you help answer these questions from other members on NexusFi?
I just found this on futures.io (formerly BMT) and its exactly what I've been looking for.
Its a strategy that adds a custom button to the NinjaTrader toolbar.
I want to use one button to pause a strategy before a news event and then unpause it …
using ninja, and i amlooking to create a hot key to entry
what i would like to do is, right click on the price, and instead of moving the mouse to left click a buy or sell stop, i would like to hit a button..crude is just too fast
Yes, it is possible to create a toolbar button to clear a pending order. But only if it is a strategy.
Yes, it is possible to use third party programs like AutoHotKey to issue 'commands' to NinjaTrader through keyboard shortcuts.
If I have misunderstood, please restate the question and hopefully someone else can also help you.
You can send hotkey short cuts using Sendkeys command in a NT indicator. For instance, if your hotkey to cancel the last order is assigned to F8, then use SendKeys.Send("{F8}");
Here's a post where max-td uses the ChartButtons indicator to change the Ninjatader drawing tools with one button click.
Sorry for being not so clear. English is my third language…
I plan the trade with entry, stop, targets, MM etc. and some programmed limiting choices by the entry part of my trading plan with this tool. And if OK, push the button. I call it discretionary trading with training wheels. And its an indicator.
As you see on the picture, I have an entry order at the exchange that was sent by clicking the button and two oco orders (generated by that clicking) that are in my computer (and will go to the exchange when entry price is touched).
To cancel this stuff I have to cancel the order and the pending orders in my system. And I want to do this with one click at the clear button, to keep things KIS(S).
NinjaTrader by default disables the Chart Trader when one uses any strategy. This is a limitation which often bogs traders. Chart Trader indicator demonstrates how to send orders via an indicator.
Here in the sample indicator you can send Limit orders, …
My indicator is based on your code. Entry, stop, targets, oco. Everything is possible that way. To plan and enter a trade much more flexible (and visible on the chart, while planing) than ATM. After entry you can even use the breakeven position by using the hotkey code to automate this.
One little problem with your indicator (and mine too): When loading (or reload with F5) or changing time frame with charttrader enabled but closed, I have an error:
Error on calling 'OnStartUp' method for indicator 'ChartTraderIndicator': Object reference not set to an instance of an object.
When changing timeframe etc. with charttrader open, then there are no errors. It's a problem I can live with, but if you see a solution...
hi terratec,
may be its the ChartTraderControl which is not initialized (it has a private constructor) etc. maybe you should bug fix it with try catch. alternative would be placing the buttons on the toolstrip or the chart panel itself.
with the code i just provided an example (for submitting orders via indicators) which can be taken as a reference point.