![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Suggestions And Feedback New feature suggestions and feedback. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Besides the PDF and the Reference Samples at the forum,
there are no other examples, correct? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
No, there are lots of examples on this forum. I would start with the reference samples.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Ok, is it reasonable to search for an example that
will draw and up arrow when a TRIX(50,5) crosses? I will give it a shot if you think I can find something within 20 minutes. Else it seems like searching for a needle in a haystack. I'm not looking for a program that will do 100 things including the above. It's hard enough already. |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Apr 2006
Location: , ,
Posts: 192
Thanks: 3
Thanked 0 times in 0 posts
|
Ok, finally I seem to be getting there. But I still think
that a hundred or so very basic ninjascript examples for indicators would be a good idea. Telling people to have a programmer do it means, essentially, that the cost of NT software has a number of hidden fees. Each indicator being that $XXX fee. |
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
Yes, to use any programming language you will need to have some programming knowledge. Due to resource limitations the more complex or common confusion areas have examples in the reference samples area. I will pass your suggestion on to our development department for consideration though. Thank you!
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Feb 2009
Posts: 153
Thanks: 0
Thanked 0 times in 0 posts
|
i too am looking for a basic indicator.
when CCI crosses over -100(user input) draw an up arrow on the low of the previous bar and play a sound. am able to do it in strategy but that takes my trades off the chart and they have to be reloaded each time i connect. any suggestions on where to start or to give the code. i can use the swing indicator as a starting point. just dont see how to do a crossover like in the strategy |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Feb 2009
Posts: 153
Thanks: 0
Thanked 0 times in 0 posts
|
figured out i can view the code from the strategy. now the question is can i copy pieces of that code or convert a strategy into an indicator
|
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Oct 2008
Location: Dallas, TX
Posts: 682
Thanks: 0
Thanked 2 times in 2 posts
|
The best way to learn in the beginning is to view NinjaScript that you understand.
For instance, Tools -> Edit -> Indicator, and pick one you grasp the end result of, like SMA. Open it, don't change anything, and read it one line at a time. C# is not some alien language. It is pretty straight forward english, to read and understand. The harder part is when you want to do something and you don't know the command and haven't found an example. Then you can google it and find it usually pretty instantly. As for NT-specific functions, you'll find a hundred examples in the File Sharing section, plus the ones already included with the shipping version of NT. If you want to know how to paint an arrow on the screen when a Cross happens, then you could for instance browse through the list of indicators in File Sharing section, look at the pictures, and find one that paints arrows on the screen. Then look at the code. If all of this is too overwhelming, hire a programmer in the beginning and tell him up front to comment all the code so you can read it and learn from it later. You tell him in plain english what you want, you pay him for his expertise, and then you learn from the result. Mike |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Oct 2008
Location: Dallas, TX
Posts: 682
Thanks: 0
Thanked 2 times in 2 posts
|
trader1512,
If you already have the working code in a Strategy, that code will most likely be very easy to put into an indicator instead. I would suggest opening up the CCI indicator, then Save As and name the new one "CCI Mod" or "My CCI" or whatever so you only mess with a copy, leaving the original alone. In this case, CCI is built-in to Ninja, so you have to save a new copy to make changes regardless. Then you'll see at the bottom of the page where it is setting the value (Value.Set). Underneath that is probably a good spot to put your code, which presumably is a if (CrossAbove()) and DrawUpArrow and PlaySound. It should all work fine. If you still have problems, paste all relevant code to the forum and the errors, if any, so others can easily help you. Mike |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Feb 2009
Posts: 153
Thanks: 0
Thanked 0 times in 0 posts
|
thanks. can someone point me to the file sharing and pdf sections that is referenced on the forum. i have had no luck finding them.
|
|
|
|
|
|
#11 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
You can check the reference samples here - http://www.ninjatrader-support2.com/...splay.php?f=30
Our indicator coding tutorials can be found here - http://www.ninjatrader-support.com/H...verview18.html The indicator file sharing section is located here - http://www.ninjatrader-support2.com/...splay.php?f=38 Our strategy wizard can also be a great and effective learning tool, as you can later choose to view and unlock the generated source code - http://www.ninjatrader-support.com/H...rdScreens.html
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Feb 2009
Posts: 153
Thanks: 0
Thanked 0 times in 0 posts
|
that is what i have been doing with the strategy wizard, the question is whether i can convert the strategy code into an indicator.
|
|
|
|
|
|
#13 | |
|
NinjaTrader Customer Service
Join Date: Jul 2008
Location: Denver, CO, USA
Posts: 1,828
Thanks: 4
Thanked 19 times in 18 posts
|
Quote:
If you have limited time or programming capabilities, you can discuss your requirements with any of our NinjaScript consultants. Click here for a list of certified NinjaScript Consultants
Ray S
NinjaTrader Customer Service |
|
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Feb 2009
Posts: 153
Thanks: 0
Thanked 0 times in 0 posts
|
can you direct me on how to remove something from the namespace. when i compile i am getting an already exists message.
thansk |
|
|
|
|
|
#15 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
trader1512,
Unfortunately we do not know which scripts may be conflicting with what in your install. It may be easiest if you cleared your NinjaScripts out to remove any potential conflicts.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming connections | Gumphrie | Connecting | 6 | 12-11-2009 03:09 AM |
| Programming a Pullback | 123r34 | Strategy Development | 3 | 02-19-2009 03:10 PM |
| Programming help | kipper | General Programming | 3 | 12-14-2008 12:12 AM |
| Programming question | sauer11155 | General Programming | 3 | 09-02-2008 11:34 AM |
| Basic programming question | winJR | General Programming | 4 | 02-15-2008 04:12 PM |