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'm trying to finish a NinjaTrader "ClickTrader" indicator, for scalpers, that lets me enter an order at the click point, with just one mouse click, and also exit any position and/or pending order when the Space key is pressed.
I have the skeleton complete and working (see attachment)
BUT I'm having trouble with the trade interface. I have used OIF files in the past but would prefer not.
I would like to use NTDirect.dll or NinjaTrader.Client.
But I am not sure how to get them linked into the indicator. I'm unable to reference NinjaTrader.Client. It appears to have conflicts with other Ninja DLLs. (So far no resolution on the NT forum)
I've looked at indicator code in futures.io (formerly BMT) that submits orders but I don't understand how either NTDirect or NinjaTrader.Client are bound to the indicator, and how to call them.
If someone can help me with this part I will put the finished indicator on futures.io (formerly BMT).
Here is what it should do:
Left Mouse + Shift = Submit a Long ATM order at the clicked price
Left Mouse + Control = Submit a Short ATM order at the clicked price
Space Bar = CLOSE ALL POSITIONS FOR THIS INSTRUMENT AND CANCEL ANY PENDING ORDERS
Well, I would like to finish this if possible.
The debugging code is all there (print statements) to verify the execution.
you can't access the ATM strategy feature (and Methods) without being in the strategy namespace - which isn't usable alongside the charttrader.
To enter orders from an indicator, you have to use the order method from the account object which is a complete unmanaged order.
You can find an example here: https://nexusfi.com/download/vip_elite_circle/900-download.html?view
It's possible to track the order and send SL and TP orders after fills - but everthing must be done by yourself.
the other possibility is to exchange your entry information between your indicator and a background strategy running on a different chart window, by a gobal static object or some other kind of exchange function (some use files).
I use AutoHotkey ( extensively in my trading to automate much of the routine tasks that I have to do during the trading day. I want to include here some of the AutoHotkey scripts I use. AutoHotkey is a free, open-source macro-creation and automation …
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
I use this for my order entry and exits. I adapted a couple of the scripts from the linked threads and they work fine.
You can basically write script to do anything you can do on the keyboard or mouse, including accessing ChartTrader functionality.
Actually, I have a third party paid software called ClickTrader that does exactly what I'm trying to do, so there must be some way to accomplish it.
And I have used OIF files from an indicator to close positions and that works well.
My preference is to only have software I write running inside NinjaTrader, so that if a vender disappears my trading is not impacted. Also, if there is a bug I can fix it, or if I want a new feature I can do it myself without a petition to the developer.
I have read the indicator you mention, ChartTraderIndicator, but do not see how it is linking to an order engine...I only see this
Order o = a.CreateOrder(Instrument,OrderAction.Buy,OrderType.Limit,TimeInForce.Day,quantity, (double)nudBuyLmtPr.Value,0,"","Buy");
o.Submit();
but have no idea where the methods CreateOrder and Submit are hosted. They are not Ninja commands, and there is no entry in the declaratives, it seems.
I have an external hot key manager I use a lot and is great. HotKeyBoard. Very useful. I use it for all sorts of things like clearing drawn objects with one key combo, changing chart preferences, et cetera.
But it has no ability to know what the price is at a mouse click then submit an order.
I use the Ninja Hotkeys also, but I don't see that it can either know the price at a mouse click.
Can the Ninja Hotkeys know the price at a click on Charttrader?