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 12-09-2007, 01:50 AM   #1
gluebunny
Junior Member
 
Join Date: Nov 2007
Posts: 29
Thanks: 0
Thanked 0 times in 0 posts
Default indicator output double available to a strategy

Hi, trying to get a complex indictator to determine the buy/sell signal inside itself, which I have...and I'd like it to set a public double to 1/-1 for a buy/sell respectively that the strategy can key upon for it's buy/sell signals, making the logic in the strategy very simple.

Upon looking at this forum it was said that I should make it a DataSeries and expose it, so I did:

/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries signal
{
get { return Values[4]; }
}

However...when I do this my indicator stops drawing anything at all, and the strategy does nothing.

What's the best way to expose one particular variable and have a strategy be able to use logic on that for decision making?

Thanks for any advice
gluebunny is offline  
Reply With Quote
Old 12-09-2007, 02:49 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You are going to need to check the error logs and debug your code. http://www.ninjatrader-support.com/v...ead.php?t=3418
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
Indicator output is different when invoked by strategy zoltran Strategy Development 14 12-26-2007 07:07 AM
Using output variables within a strategy? Burga1 Strategy Development 15 11-17-2007 10:04 PM
Strategy Array out of Bounds Error or Output CancelAllOrders: BarsInProgress = 0 Learning1 Strategy Development 16 09-25-2007 11:02 PM
found a way to crash strategy trader - leave output window open in optimizer scriabinop23 Strategy Analyzer 2 06-06-2007 12:27 AM
Double moving average ,double time frame Mauro60 Indicator Development 3 01-23-2007 02:11 AM


All times are GMT -6. The time now is 05:02 AM.