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)
Competence is relative. You can probably author enough in Ninja with becoming a .NET jock. That said, the thought processes you will learn by studying programing outside of Ninja will help you with Ninja or any other platform you end up with. I'm new to coding after a 20 year break and far from expert, but you might want to set your self up with a learning plan that addresses both your desire to be better at Ninja/Trading Code and at learning C#/.NET/OOP in general.
A learning plan might look like this for Step One:
Somewhere in that process you might consider an upgrade from the free Visual Studio Express version to Visual Studio Professional so you can take advantage of the power of VS to code in Ninja. Some complete hack started a thread on that here:
I'm now the proud owner of the full version of Visual Studio 2010, having played with VS Express versions for C# and C++, as well as Eclipse for C++ over the past few months.
I'm starting this thread as I learn from scratch what works and doesn't …
This website is home to (nearly) two years of collective wisdom, discovery, trial, and error. There is some amazing code here, and some absolute crap (I have some absolute crap posted here still. Sorry guys!). But there are also a lot of people here willing to share and willing to help IF you yourself are willing to put in the time.
Give youself learning targets. If you can get through the excercises in that first book while also playing around with Ninja and learning the basics here by, say, 30 June 2011... you are making good progress.
Anyway, some random thoughts from a complete hack who believes in continuous education .
And now I can cut,paste and amend code to do most of what I want to do.
Download all the indicators you like and then play with the code to understand what does what and how.
I did read a book on C# but really I don't get inheritance and polymorphism, etc. So occasionally it will take me a month to work out why my indicator works but the log gives me an error of an object reference not set to an instance of an object, blah blah.
You have to be analytical and a little anal - A is not the same as a.
The very BEST thing I did - was get a Consultant to code up something that I had always wanted right at the very start which involved all of the core things that I knew I would want eg mouse capture, toolbar buttons, drawing on the chart, etc.
It was expensive but I have never stopped since then and I have been able to amend my prime indicator until it's unrecognisable from it's beginnings. Now I sell the odd indicator myself and provide a no to this forum for free.
So in summary
1. You just have to be reasonably intelligent to learn C#/NS.
2. Use other people's/NT code to learn from.
3. Use msdn reference site for C#.
4. Understand it will take many many hours to get proficient.
5. Enjoy the frustrations - they are part of the learning curve.
6. Ask communities such as this for help when you are bleeding from banging your head against the wall.
Dah ... I enjoy the '''aaahhh''' when the frustration ends .,.. NOT the frustration itself
Bleeding is good ... increases circulation to the brain
Jon
Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
To expand upon what MXASJ said about NT scripting, for traders who have never programmed (and programmers like me who have never been able to get through a book on programming or sit through a programming course) I found NT's indicator & strategy wizards great for learning trade scripting (Tools > New NinjaScript > [Indicator | Strategy]).
The script editor is a relatively uncomplicated environment for learning C# basics compared, say, to MS Visual Studio, but still implements useful features of a development environment (e.g., Intellisense, auto-error checking, outlining, some auto-formatting) (Tools > Edit NinjaScript > [Indicator | Strategy]). Even the Help function is pretty good.
Once you have some idea how wizards work you can create simple programs that do something useful, allowing you to study indicators and strategies and test your own ideas without worrying too much about the details. Viewing the code generated by the wizard (either from the wizard or the editor) helps you learn about the C# language by example, which as others have pointed out is how some of us learn quickest.
Best of all the application to trading is obvious & immediate, as opposed to wasting time IMO puzzling over esoterica; e.g., learning how to write binary sorts and prime number calculators or similar, worst case in some pseudo programming language.
Once you have some idea about how trading scripts work, and how C# works, you can unlock non-system scripts (make them editable) and have your way with them.
One caveat is that if you create a script in the NT environment, by default it is placed in the [NTPath]/Custom/bin directory along with all active indicators / strategies. When you invoke Compile in the editor all existing scripts are (re)compiled at the same time and you can't move on (i.e., create a new script) until all scripts created to date compile without errors. On the other hand, as others have said, recovering from a snafu is an effective way to learn something about system internals even if dealing with internals can make you prematurely grey
The bottom line is, while NT wizards have their own learning curve it's extremely short compared to becoming a full-blown programmer, and you start writing trade-appropriate programs from the get-go.
Or habitually have a bloody head from smacking on the wall ... lol
Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
I need help with some coding.. It's done for the most part, but I'm trying to do something I don't know how to code.
When the signal is given for a long, I want to enter at the HIGH of the bar prior to the signal bar.
Or (option #2) Enter at the High + 1 tick of the bar prior to the signal bar.
When the signal is given for a short, I want to enter at the LOW of the bar prior to the signal bar.
Or (option #2) Enter at the Low -1 tick of the bar prior to the signal bar.
I don't know how to code that and the Strategy creation wizard isn't much help. Can anyone help? Something like this:
ex: If long condition met:
EnterLong High[1]; (enter long at the high of the previous bar)
or EnterLong High[1]+1 tick; (or enter long at the high + 1 tick, of the previous bar)
ex: If short condition met:
EnterShort Low[1]; (enter short at the low of the previous bar)
EnterShort Low[1] -1 tick: (or enter short at the low -1 tick, of the previous bar)
Thank you for your consideration and time.
I'll be happy to share the strategy, once I get it working!
After all, it's what you learn AFTER you know it all, that counts!
I do not know how those HybridRenko bars work but assuming the high and low are correct representation of the bar the following code should work for long signal:
EnterLongStop(High[1], "Long Entry")
Code for short signal:
EnterShortStop(Low[1], "Short Entry")
The code above will submit orders for the quantity value setup in your strategy property window.
The first argument in the code above is the price to enter at.
The second argument in the code above is the signal name (change it to whatever you like) to identify the order.