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'd like to activate the trade entries portion of my Ninascript stategy with a keyboard event such as CapsLock. The general idea is that the strategy would always be running but a condition of any trade entry would be CapsLock being in the down position.
Using the standard NinjaTrader tools to turn the strategy on and off is too cumbersome for the quick decisions I need to make. My primary purpose here is to make more efficient trade entries. I experience too many misses when I do it manually.
The most on topic information I've located so far is a discussion of the c# Keyboard.IsKeyDown(Key) Method at a MS C# site.
I can't post the url here but you can locate it by Googling "Keyboard.IsKeyDown(Key) Method"
I'm confident this is the stuff I need but I can't get it to compile and run. When I declare the bool referenced at the above MS C# site I get a message telling me I must declare a body, and that has left me rather clueless.
Any suggestions anyone? Thanks in advance.
Can you help answer these questions from other members on NexusFi?
It is not necessary to turn the stragey on/off, you just need to track what you need to track to set a variable which would determine if it is OK to open a trade or not.
I've decided to forget about the keyboard input and use chart buttons to interact with my strategy. This morning I found some code at the NinjaTrader Help Forum (posted by NinaTrader_ZacharyG) , and it looks as though I can tweak it to accomplish my objectives of interacting with my trading strategy without disabling the strategy. I've got 8 current trade setups (4 long and 4 short) and I believe I'll be able to arbitrarily turn each of them on and off. So far the testing looks good. In addition to the basic trading strategy stuff I'm working on a Cancel button, a Close button and a Breakeven button which I hope to be able to activate at my discretion -- also without disabling the strategy. I think I'll test them over the weekend with Market Replay, though Market Replay can be a bit quirky.
I should have thought of this approach long ago but I guess I'm never particularly eager to jump into new programming challenges, though for me clickable chart buttons are far easier to use than the keyboard. I can do the code crunching but I'm far from professional level and my mind is just not particularly methodical. If I programmed for a living I probably get fired a lot, though I managed a B grade working with Fortran and punch cards at Purdue in the late 70s.
My idea with this approach is to make the trades I normally choose, but the without the delays and mistakes inherent in reading charts, digesting indicator data, determining an entry price and fumbling around with the order entry interface. If one is serious about day trading (which I am) I've got to believe this is the way to go. If nothing else, it makes the exercise less stressful. I can do all things I want to do with far greater efficiency. Of course that doesn't guarantee I'll make lots and lots of money, but it improves my chances.
For the record I've invested LOTS of time in developing standalone trading programs but quantifying all the technical analysis I've learned and instinctive market judgement I've developed (Sometimes it's good) over the years is an impossible task in an algorithm-dominated futures market driven by top notch programmers, millions of dollars of development investment and access to proprietary information. So my advice to any beginning day trader would be to learn as much technical analysis as you can (while taking it easy on Elliott Wave Theory) and develop the programming skills to streamline the trading process.
I'm sure this is a much longer response that you wanted and I hope you're still reading. I live in a world where hardly anyone understands anything about what I do (with considerable emotional investment) and I'm jumping at the opportunity to express myself to someone (and perhaps others) familiar with the trading life.
In summary, thumbs up for chart buttons that interact with your trading program.