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 01-24-2011, 09:40 PM   #1
Dreamer88zzz
Junior Member
 
Join Date: Jan 2011
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Question Accessing Previous Bar Data Question

Hello everyone,

I ran into a problem with an indicator im making. When i plot for example an EMA(10)[0] it works fine but when i switch it to EMA(10)[1] it doesnt plot anything. So what im trying to do is plot the Exponential moving average of one bar ago. Any clarification will be helpful as I am fairly new to this. Thank you in advance
Dreamer88zzz is offline  
Reply With Quote
Old 01-25-2011, 06:57 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,499
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thanks for your note.

Most likely if you check the log tab you are running into an error that is stopping the strategy from running.

Please add this to your code as most likely this is what is causing the issue.

http://www.ninjatrader.com/support/f...ead.php?t=3170

Let me know if I can be of further assistance.
NinjaTrader_Brett is offline  
Reply With Quote
Reply

Tags
bars, dataseries, plot, plotting, previous bar

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
Accessing previous days bars jeddah62 Indicator Development 4 09-28-2009 11:04 AM
Accessing previous bars, Eagle Indicator Development 3 09-13-2009 12:29 PM
if Target Profit reached on previous bar, dont trade current bar paschall Strategy Development 4 09-02-2009 10:34 PM
Problems working with previous bar data tulanch Indicator Development 2 08-20-2009 11:40 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:32 AM.