PDA

View Full Version : Custom Indicator


ashish
12-25-2007, 06:59 AM
Can the wizard be used to create indicators? If so, how....video? explanation?
Maybe what i'm looking for already...I wanted to have a bollanger type indicator but using xma as the basis with the bands adjustable by ticks.

thanks
Ashish

NinjaTrader_Ray
12-25-2007, 11:02 AM
The wizard can be used to create the initial template for a custom indicator. The actual indicator calculations must be manually programmed.

There are 6 excellent indicator development tutorials located in our Help Guide. Its a great place to start. They are under the NinjaScript section.

einstein
12-29-2007, 04:36 PM
I need help in coding for a 3 bar reversal pattern. I have gone thru the videos but I guess I am not getting it. Here is what I am looking for. Picture 3 bars numbered 1,2,3, from left to right. A bullish reversal would have H3>H2 and L3=or >L2. H2<H1 and L2<L1. What I want is when the 4th bar opens and breaks above H3 by 1 tick, a circle or symbol to appear to indicate completion of the pattern. Reverse logic for a bearish 3 bar reversal. If anyone knows how to do this with ninja script I would be grateful for their assistance. Thanks.

NinjaTrader_Josh
12-29-2007, 04:52 PM
Hi einstein,

This is all doable. To access values of the highs you can use High[0]. The way you determine the index number that goes inside the bracket is from right to left starting at 0 representing the most recent bar. 1 being the previous bar. etc.

if (High[1] > High[2] && Low[1] >= Low[2] && High[2] < High[3] && Low[2] < Low[3] && Open[0] > High[1] + TickSize)
DrawDot("Bullish Reversal" + CurrentBar, 0, High[0], Color.Red);
This is what I interpreted your code to mean. You may need to tweak it a bit, but its a starting point for you.

einstein
12-29-2007, 05:03 PM
Thanks, I will review what you have sent and give it a try.:)

einstein
12-29-2007, 05:46 PM
Josh, I will try to code for a bearish reversal and post it. In the meantime, how do I import the bullish code into NINJA? Do I have to convert it to a zip file and use the Ninja import function? If so how does one convert it to a zip file? Thanks and sorry for all the questions.

NinjaTrader_Josh
12-29-2007, 06:54 PM
Please review this whole section of the help file. http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?Overview18