NinjaTrader Support Forum  
X

Attention!

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


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-05-2012, 06:24 AM   #1
Drummer
Junior Member
 
Join Date: Jan 2011
Posts: 19
Thanks: 0
Thanked 1 time in 1 post
Default Null a previous plot 'Set'

I am setting a plot series to a value. ex:
Value.Set(1.52);


100 plots later I want that plot not to show as part of the indicator plot. ex:

Value[100] I want to be null, empty, blank - to be as I never assigned a value to it.

Value[100] = null; gives a compile error.


What syntax can I use to make a value I assigned to a indicator plot 100 plots ago not show on my indicator plot anymore?



Thanks
Drummer is offline  
Reply With Quote
Old 07-05-2012, 06:34 AM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello Drummer,
You can simply reset the plot value.

Code:
if (CurrentBar > 100)
<Name of Plot>.Reset(100);
http://www.ninjatrader.com/support/h...ries_class.htm
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 07-05-2012, 07:33 AM   #3
Drummer
Junior Member
 
Join Date: Jan 2011
Posts: 19
Thanks: 0
Thanked 1 time in 1 post
Default

works... thank you
Drummer is offline  
Reply With Quote
The following user says thank you to Drummer 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
set previous value of indicator sergeysamsonov Indicator Development 2 12-27-2011 06:49 AM
How to set stoploss to previous bar john_robertson00 Strategy Analyzer 5 10-05-2011 05:45 AM
Set back an Array to Null Value baba123 General Programming 4 08-11-2011 04:52 PM
how to set indicator value to null junkone Indicator Development 1 02-06-2010 10:36 AM
accessing plot value of previous bars shooter General Programming 2 04-20-2009 11:17 PM


All times are GMT -6. The time now is 10:27 PM.