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 looking to learn ninjascript to write some basic strategies. I'm a discretionary trader but prefer to automate my entries.
I've been using MQL4 and EasyLanguage for years for this, and now would like to tackle NinjaScript.
What is the best way to get ahold of some sample code for a strategy I'm going to begin testing? Is there a place where people will do this in the elite section (I rarely visit this site so am totally ignorant), or is it preferred that I post a job description somewhere?
It's remarkably simple as my exits (my edge) are discretionary.
Entry would be a break (I use pending stop market orders) X ticks across the extreme of the "swing" indicator.
Three filters:
1. Long above/short below - current session open price.
2. Long above/short below - current VWAP.
3. Long above zero/short below zero - cumulative volume delta (bid/ask).
I would enter with multiple contracts (let's say three for this example) with one stop, and exit with three targets.
Is this something I should go somewhere else and post a job for coders to bid on? I would really prefer to have the code rather than just the compiled program, so that I can learn and build upon the code as a learning exercise. I've found quite a few coders who do not like to share their code, so I'm not sure if this request will wrong people the wrong way.
Thanks for taking the time to read this, and please point me in the right direction if you're able.
Your strategy would be easy to 'code' in NT; even with the strategy builder, it seems.
You could, first, try to code it using NT's strategy builder. SB uses English, not code.
You can then 'look' at the code NT generated from your 'English.' This becomes the 'sample code' you asked about.
Also, sample code is on the internet. There are statements/keywords that are found in nearly all Ninjascripts (NS), and nearly no where else. After looking at a few scripts, you'll see what I mean. You can google these statements/keywords/phrases to find additional scripts.
When I started this video by Big Mike helped me. With that, plus some googling and finding examples in the NT forums, I was able to create my first live trading algo. This is based on NT7... I haven't made the move to NT8 yet.
My first inclination was to use the strategy builder to generate the sample code to learn from, however they removed VWAP and CVD due to some sort of technical issues according to their support team, this is what prompted me to come here.
And yes, I am very aware I can just google it. The purpose of this post was to save time, I am open to posting a job description in order to save that time but as you said I can just google it myself and spend that time.
I think you would confuse yourself trying to learn NT8, by learning NT7 first.
Also, I wasn't just telling you to "google it." You can google ninjascript and not find much sample code.
I told you to google the unique statements/keywords etc. that are in each ninjascript, to help you find sample scripts.
There is a big difference in the two search approaches; and doing the one I recommended is not intuitive for beginners, imo.
I'm sure we can help with such a simple strategy. As you proceed, if you choose to try to code it yourself, post whatever code you've written between CODE tags here ... and we'll see how it goes.
I haven't created anything substantial with Ninjascript 8 yet. If you search for ninjascript on the futures.io youtube channel you can probably find a couple of videos that cover v8.
One idea is that you can post your request in the free NT strategy thread. If you specify clearly what you are looking for, it may attract some attention and someone may be willing to give it a shot.
I get a lot of requests for help building strategies. Many of which are repeats of other requests. I am starting this thread to handle many of these requests as the public building and revising of strategies would certainly help the community. Please …
You can also often get help in NinjaScript coding by posting in the free NT indicator thread. I know you are not looking for an indicator, but if you have some particular coding question, you may find help there as well:
Hey guys, I thought many of you would enjoy and benefit from this thread. My intention is to have each poster reply and describe in as much detail as possible an indicator they want created for NinjaTrader.
The programmers on the forum (there are many), …
Since participation is by volunteers, you can't be guaranteed that someone will pitch in, but they often do. See if these work out for you.
Bob.
When one door closes, another opens.
-- Cervantes, Don Quixote