NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM 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 09-30-2009, 09:27 PM   #1
crmcwi
Senior Member
 
Join Date: Jul 2009
Posts: 132
Thanks: 0
Thanked 0 times in 0 posts
Unhappy Is it possible to use HeikenAshi in a Strategy?

Guys,

I made a copy of the HeikenAshi indicator so I could set the colors on my chart.

I can Add() it, but when I try to call crmHeikenAshi.HAOpen[0] or crmHeikenAshi.Values[0][0] and run a strategy, I get a very curious error message I had not seen before and I've Added() lots of other indicators:

Error on calling 'OnBarUpdate' method for strategy 'MamaHeikenAshi2': The indicator 'crmHeikenAshi' is intended for visualization and can only be used on a chart.

Can someone explain what causes this and how to enable this indicator to be used in a strategy please?
crmcwi is offline  
Reply With Quote
Old 09-30-2009, 09:39 PM   #2
crmcwi
Senior Member
 
Join Date: Jul 2009
Posts: 132
Thanks: 0
Thanked 0 times in 0 posts
Wink ChartOnly = false;

Guys,

sorry. I'm leaving this here for any others who have this problem.

In OnInitialize() the original code had this internal variable set to true.

do this and you can use the indicator in a strategy:

ChartOnly = false;
crmcwi 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
bar and HeikenAshi kian1 General Programming 3 06-06-2011 11:04 PM
Roonius HeikenAshi 123r34 Automated Trading 4 06-09-2009 09:59 AM
HeikenAshi roonius Miscellaneous Support 4 11-21-2008 08:42 AM
HeikenAshi Indicator in Strategy omares Strategy Development 3 06-21-2008 07:18 AM
Heikenashi nelson Charting 6 08-03-2007 12:59 PM


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