there are no other examples, correct?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
programming of very basic indicators
Collapse
X
-
programming of very basic indicators
Besides the PDF and the Reference Samples at the forum,
there are no other examples, correct?Tags: None
-
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.
Comment
-
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.
Comment
-
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!DenNinjaTrader Customer Service
Comment
-
programming indicators
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
Comment
-
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
Comment
-
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
Comment
-
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
Comment
-
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.
Comment
-
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.htmlBertrandNinjaTrader Customer Service
Comment
-
that is what i have been doing with the strategy wizard, the question is whether i can convert the strategy code into an indicator.
Comment
-
Originally posted by trader1512 View Postthat is what i have been doing with the strategy wizard, the question is whether i can convert the strategy code into an indicator.
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 ConsultantsRay S.NinjaTrader Customer Service
Comment
-
can you direct me on how to remove something from the namespace. when i compile i am getting an already exists message.
thansk
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bmartz, Today, 09:30 AM
|
2 responses
11 views
0 likes
|
Last Post
by bltdavid
Today, 11:24 AM
|
||
Started by f.saeidi, Today, 11:02 AM
|
1 response
3 views
0 likes
|
Last Post Today, 11:08 AM | ||
Started by geotrades1, Today, 10:02 AM
|
4 responses
12 views
0 likes
|
Last Post
by geotrades1
Today, 11:08 AM
|
||
Started by rajendrasubedi2023, Today, 09:50 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 10:57 AM | ||
Started by lorem, Today, 09:18 AM
|
2 responses
11 views
0 likes
|
Last Post Today, 10:55 AM |
Comment