NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 01-11-2012, 09:46 AM   #1
acmarius83
Junior Member
 
Join Date: Sep 2011
Posts: 18
Thanks: 6
Thanked 1 time in 1 post
Default NinjaScript Documentation

Is there a documentation available online for the libraries that are offered so it is possible to write NinjaScripts ??

In the stochastic indicator the last value is displayed for the closed bar, and I want to change so that it will compute/display the value for the current bar, the real time value
Last edited by acmarius83; 01-11-2012 at 09:52 AM.
acmarius83 is offline  
Reply With Quote
Old 01-11-2012, 09:59 AM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

acmarius,

I am happy to assist you.

Here is a link to our help guide with NinjaScript resources : http://www.ninjatrader.com/support/h...nt7/index.html

Here is a link to reference samples on coding various things : http://www.ninjatrader.com/support/f...splay.php?f=30

You would want to set CalculateOnBarClose = false to get the "real-time" value of indicators.

Please let me know if I may assist further.
NinjaTrader_AdamP is offline  
Reply With Quote
The following user says thank you to NinjaTrader_AdamP for this post:
Old 01-11-2012, 10:44 AM   #3
acmarius83
Junior Member
 
Join Date: Sep 2011
Posts: 18
Thanks: 6
Thanked 1 time in 1 post
Default

this means that I have to modify this :
Stochastics indicator = new Stochastics();
indicator.BarsRequired = BarsRequired;
>> indicator.CalculateOnBarClose = CalculateOnBarClose;

into this:
Stochastics indicator = new Stochastics();
indicator.BarsRequired = BarsRequired;
>> indicator.CalculateOnBarClose = false;

am I write?
acmarius83 is offline  
Reply With Quote
Old 01-11-2012, 10:49 AM   #4
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

acmarius,

Yes, but you don't need the barsrequired part. You could create your own stochastics with it having its CalculateOnBarClose = false; by default.

Please let me know if I may assist further.
NinjaTrader_AdamP is offline  
Reply With Quote
Old 01-11-2012, 11:28 AM   #5
acmarius83
Junior Member
 
Join Date: Sep 2011
Posts: 18
Thanks: 6
Thanked 1 time in 1 post
Default

i modified in the original stochastic indicator that comes whit nt7 like this...
Stochastics indicator = new Stochastics();
// indicator.BarsRequired = BarsRequired;
indicator.CalculateOnBarClose = false;

it is not working .......
acmarius83 is offline  
Reply With Quote
Old 01-11-2012, 11:38 AM   #6
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

acmarius,

I would recommend just creating a Stochastics indicator with CalculateOnBarClose = false in its Initialize() method. You will also want CalculateOnBarClose to be false in your indicator/strategy calling it.

You can then access it as follows : Stochastics_My(periodk,periodd,smooth)[X]

Please let me know if I may assist further.
NinjaTrader_AdamP is offline  
Reply With Quote
The following user says thank you to NinjaTrader_AdamP for this post:
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
NinjaScript LowestBar & HighestBar Documentation KBJ General Programming 3 06-11-2012 03:02 PM
Documentation Help diff24rac Miscellaneous Support 1 07-12-2011 07:00 AM
ChartControl Documentation Zeos6 General Programming 3 03-17-2011 02:20 PM
NinjaScript Documentation higler General Programming 10 11-09-2009 01:16 AM
Documentation Error r2kTrader Version 7 Beta General Questions & Bug Reports 1 11-02-2009 07:48 AM


All times are GMT -6. The time now is 07:12 AM.