NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 07-31-2008, 09:27 AM   #1
Jaap8242
Junior Member
 
Join Date: Dec 2007
Posts: 13
Default B line

Hello,
In Tradestation I use an indicator, the B-line, which is a kind of LT stochastic indicator. Originally developed by Judy McKeigan ( Buffy) at dacharts.com.
I'm not familiar with the Ninja program code. Therefore I have copied the TS code of the B-line.


Input: Price(Close), Length1(35), Length2(10), Length3(1), OverBought(80), OverSold(20),
MidColor(White),OBOSColor(Red);
Variables: KFast(0), KFull(0), DFull(0), LL(O), HH(0);
LL = Lowest((High+Low)/2, Length1);
HH = Highest((High+Low)/2, Length1);
KFast = 100 * IFF(HH-LL=0,0,(((High+Low)/2) - LL)/(HH- LL));
KFull = Average(KFast, Length2);
DFull = Average(KFull, Length3);
If KFull <= 80 and KFull >= 20 then
Plot1(KFull,"Stoc",MidColor,Default,2) else
Plot1(KFull,"Stoc",OBOSColor,Default,2);
Plot3(OverBought, "OverBought");
Plot4(OverSold, "OverSold");

I hope that someone can translate this into Ninja code.

Jaap
Jaap8242 is offline  
Reply With Quote
Old 07-31-2008, 10:27 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 10,708
Default

Hi Jaap,

We have some new staff members that are ramping in supporting NinjaScript. I will assign this request as a training task for one of them. Give us a week or so to get this done.
__________________
Ray, NinjaTrader Customer Service
NinjaTrader is a FREE application for advanced charting, market analytics, system development and trade simulation.

View schedule of upcoming online product training events


NinjaTrader_Ray is offline  
Reply With Quote
Old 08-01-2008, 02:14 AM   #3
twtrader
Junior Member
 
Join Date: Jun 2008
Location: Chicago
Posts: 27
Default

What is DFull used for? Is it also plotted ?

I put your code in an indicator, but it does not seem complete.

TW

Quote:
Originally Posted by Jaap8242 View Post
Hello,
In Tradestation I use an indicator, the B-line, which is a kind of LT stochastic indicator. Originally developed by Judy McKeigan ( Buffy) at dacharts.com.
I'm not familiar with the Ninja program code. Therefore I have copied the TS code of the B-line.


Input: Price(Close), Length1(35), Length2(10), Length3(1), OverBought(80), OverSold(20),
MidColor(White),OBOSColor(Red);
Variables: KFast(0), KFull(0), DFull(0), LL(O), HH(0);
LL = Lowest((High+Low)/2, Length1);
HH = Highest((High+Low)/2, Length1);
KFast = 100 * IFF(HH-LL=0,0,(((High+Low)/2) - LL)/(HH- LL));
KFull = Average(KFast, Length2);
DFull = Average(KFull, Length3);
If KFull <= 80 and KFull >= 20 then
Plot1(KFull,"Stoc",MidColor,Default,2) else
Plot1(KFull,"Stoc",OBOSColor,Default,2);
Plot3(OverBought, "OverBought");
Plot4(OverSold, "OverSold");

I hope that someone can translate this into Ninja code.

Jaap

Last edited by twtrader; 08-01-2008 at 04:09 PM. Reason: Deleted attachment
twtrader is offline  
Reply With Quote
Old 08-03-2008, 02:30 PM   #4
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Default

Hello Jaap,


Thank you for your EasyLanguage to NinjaScript translation request.

Your translated indicator is attached.

Import instructions:
  1. Download the file contained in this thread to your PC desktop
  2. From the Control Center window, select the menu File > Utilities > Import NinjaScript
  3. Select the downloaded file
twtrader,

No, DFull is not plotted or used within the calculation, but I did translate it. DFull is probably a leftover from a variation of the indicator calculation. It can be eliminated from the code.
Attached Files
File Type: zip BLine.zip (7.1 KB, 133 views)
__________________
Ben, NinjaTrader Customer Service
NinjaTrader is a FREE application for advanced charting, market analytics, system development and trade simulation.


View schedule of upcoming online product training events.


Last edited by NinjaTrader_Ben; 10-14-2008 at 02:19 PM.
NinjaTrader_Ben is offline  
Reply With Quote
Old 08-04-2008, 04:56 PM   #5
Jaap8242
Junior Member
 
Join Date: Dec 2007
Posts: 13
Default

Hello Ben, Thank you very much for your quick and nice translation of the TS code.
The Bline works great in Ninja Trader.

Jaap
Jaap8242 is offline  
Reply With Quote
Old 08-05-2008, 11:28 PM   #6
Elliott Wave
Senior Member
 
Join Date: Mar 2008
Posts: 731
Default

Quote:
Originally Posted by NinjaTrader_Ray View Post
Hi Jaap,

We have some new staff members that are ramping in supporting NinjaScript. I will assign this request as a training task for one of them. Give us a week or so to get this done.
WOW, I'm really happy to hear this!
Elliott Wave is offline  
Reply With Quote
Old 12-28-2008, 05:35 AM   #7
jake28787
Junior Member
 
Join Date: Oct 2007
Posts: 16
Default B-LINE indicator

is it possible to modify this indicator to plot a one color when oversold and another color when overbought
jake28787 is offline  
Reply With Quote
Old 01-06-2009, 01:16 PM   #8
Jaap8242
Junior Member
 
Join Date: Dec 2007
Posts: 13
Default

I don't know. You should ask Ninja Trader Ben who has written this code.
But you could differentiate the overbought line from the oversold line by giving them different colors.

Jaap
Jaap8242 is offline  
Reply With Quote
Old 01-06-2009, 10:55 PM   #9
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Default

Hello,

Over bought and over sold can be defined different ways so I put in 4 different colors splitting on 80, 50, and 20 to cover two different schools of thought.
Attached Files
File Type: zip BLine_MultiColor.zip (7.3 KB, 170 views)
__________________
Ben, NinjaTrader Customer Service
NinjaTrader is a FREE application for advanced charting, market analytics, system development and trade simulation.


View schedule of upcoming online product training events.


Last edited by NinjaTrader_Ben; 01-07-2009 at 07:16 AM.
NinjaTrader_Ben is offline  
Reply With Quote
Old 01-07-2009, 06:57 AM   #10
jake28787
Junior Member
 
Join Date: Oct 2007
Posts: 16
Default bline

thanks Ben...the attached BLine indicator appears to be the same as the the original you had done..does the earlier one have to be removed before importing this one..
I am looking for a color change when over 80 and a different color when under 20 .the midline will be one color....
over 80... cyan
under20...red
21-79 ...yellow
jake28787 is offline  
Reply With Quote
Old 01-07-2009, 07:19 AM   #11
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Default

Hello,

I changed the attachment in my most recent post below. It is the BLine_MultiColor I intended to attach. It has more color changes and different colors than you requested but I suspect it will be sufficient.
__________________
Ben, NinjaTrader Customer Service
NinjaTrader is a FREE application for advanced charting, market analytics, system development and trade simulation.


View schedule of upcoming online product training events.

NinjaTrader_Ben is offline  
Reply With Quote
Old 01-07-2009, 02:33 PM   #12
jake28787
Junior Member
 
Join Date: Oct 2007
Posts: 16
Default bline multi

hi ben..the multi works great thanks again
jake28787 is offline  
Reply With Quote
Old 02-04-2009, 10:20 AM   #13
Newshues
Member
 
Join Date: Jan 2009
Posts: 40
Default entire template

Buffy's entire template is available for Ninja. the indicators are attached, the chart template is sitting in dacharts where Buffy hangs out.
Attached Images
File Type: png Newshues295.png (58.3 KB, 510 views)
Attached Files
File Type: zip BLineScripts.zip (29.9 KB, 255 views)
Newshues is offline  
Reply With Quote
Old 02-10-2009, 01:55 PM   #14
Jaap8242
Junior Member
 
Join Date: Dec 2007
Posts: 13
Default

Hi Newshues, your indicators look very nice. Great thanks to you and Ben.
There is only one drawback. The setup absorbs a great deal of computer power.
My normal setup with Ninja is 2 charts( CCI). That works great, but this morning I tried to install a third chart with Bline indicators. Ninja crashed and the third chart was not possible.

Jaap
Jaap8242 is offline  
Reply With Quote
Old 02-10-2009, 02:09 PM   #15
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 16,357
Default

Jaap,

Please try loading less data per chart. Also, please see these other performance tips: http://www.ninjatrader-support.com/H...anceTips1.html
__________________
Josh, NinjaTrader Customer Service
NinjaTrader is a FREE application for advanced charting, market analytics, system development and trade simulation.

View schedule of upcoming online product training events.
NinjaTrader_Josh is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Line Width sub5mango Indicator Development 1 07-10-2008 02:09 PM
how to draw a parallel line to a trend line? tradewiz Charting 4 12-19-2007 04:42 AM
Line properties mrlucky1x Charting 1 08-27-2007 11:44 AM
% Grid Line AO76 Indicator Development 5 07-07-2007 03:56 PM
Line "names" in Indicator Box change to "Line" after modification higler Charting 3 05-02-2007 06:05 AM


All times are GMT -6. The time now is 12:15 PM.