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 > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 01-06-2011, 03:47 PM   #1
saltminer
Senior Member
 
Join Date: Apr 2008
Posts: 164
Thanks: 2
Thanked 3 times in 3 posts
Default Bug report, Strategy IDataSeries changed by Indicator

Hi Ninja,
re the NT7 beta thread here http://www.ninjatrader.com/support/f...ight=saltminer
I can confirm the cause.

To summarise, Closes[0][0] in a strategy is returning Typicals[0][0].
After much testing, I traced it to an indicator the strategy was calling, in the form
value = MyIndicator(Closes[0], ....)[0];

The indicator had the following lines in the Initialise()
PriceTypeSupported = true;
PriceType = PriceType.Typical;

This corrupted the strategy somehow, changing the strategy's Closes forever after into Typicals.
This would not be intended NinjaTrader behaviour. It did not occur in Ninja 6.5 with identical code.

Cheers,
saltminer
saltminer is offline  
Reply With Quote
Old 01-06-2011, 04:54 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

saltminer,

This was never a supported usage model. If you want to sync the indicator to a different Bars object you need to use BarsArray[].

For example:
someValue = MyIndicator(BarsArray[1], 20)[0];

Please see attached reference if you wanted to be working with price type. The indicator itself is one of Typical. The print outs demonstrate how to get it on the High prices instead.
Attached Files
File Type: zip SMAPriceType.zip (2.8 KB, 6 views)
NinjaTrader_Josh is offline  
Reply With Quote
Old 01-06-2011, 08:10 PM   #3
saltminer
Senior Member
 
Join Date: Apr 2008
Posts: 164
Thanks: 2
Thanked 3 times in 3 posts
Default Thanks

Thanks Josh.
saltminer is offline  
Reply With Quote
Reply

Tags
bug, pricetype, pricetypesupported

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
Bug Report - Strategy compiler leaves old errors. cnecorp Suggestions And Feedback 4 12-14-2010 01:20 PM
BUG report: Closes[x][y] delivers Typicals[x][y] in MultiInstrument strategy saltminer Version 7 Beta General Questions & Bug Reports 4 09-14-2010 10:27 AM
Bug Report: Multiple Security Indicator bug pmorissette Version 7 Beta General Questions & Bug Reports 21 08-30-2010 10:51 AM
Bug report - Strategy Analyzer "Periods -Grid" whotookmynickname Version 7 Beta General Questions & Bug Reports 1 01-22-2010 09:40 AM
Bug Report: error message upon multiple clicks on report generation button NinjaCustomer Historical NinjaTrader 6.5 Beta Threads 2 02-06-2008 10:59 AM


All times are GMT -6. The time now is 10:22 AM.