![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Oct 2008
Location: US&A
Posts: 115
Thanks: 0
Thanked 1 time in 1 post
|
I am writing in reference to;
http://www.ninjatrader-support.com/v...ead.php?t=3228 I created the following Strategy as a Test for viewing Text in a Strategy based-on an indicator's color (somewhat common in MetaTrader EA's). PHP Code:
Thanks.
Last edited by Faspomy; 10-03-2008 at 03:02 AM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
Please remove Color BarColor in you intialization and test it.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Oct 2008
Location: US&A
Posts: 115
Thanks: 0
Thanked 1 time in 1 post
|
Thanks Ben.
I did that and it still does not track at all properly. I also changed 'Red' and 'Lime' to BarUp and BarDown from the Indicator (shown below). This Strategy shows that it simply alternates-- every other bar indicates green or red. The Strategy does not seem to be correctly importing the data from the indicator. What else can I do to accurately track the color changes ? Or, is my NT simply not configured properly ? PHP Code:
Last edited by Faspomy; 10-03-2008 at 10:50 AM.
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
Probably the easiest way to do what you want is would be to build a bool series or string series within the HA indicator then access that series from your strategy. The HA is for visualization only in its current state. So add code to the HA that will set string values like "green" and "red" then access these via your strategy to build your logic. This link will help: http://www.ninjatrader-support.com/H...riesClass.html Give it a try and post your code if you get stuck.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Oct 2008
Location: US&A
Posts: 115
Thanks: 0
Thanked 1 time in 1 post
|
Thanks Ben.
are any example files readily available to accompany the information in the link above ? |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
This is the closest we have. Replace the BoolSeries with the StringSeries.
http://www.ninjatrader-support.com/v...ead.php?t=4991 Hope that help.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Oct 2008
Location: US&A
Posts: 115
Thanks: 0
Thanked 1 time in 1 post
|
Thank you Ben and Josh.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| custom indicator question | kuroro13 | General Programming | 1 | 07-29-2008 08:38 AM |
| Custom indicator question | phineas | General Programming | 4 | 05-12-2008 10:29 AM |
| Indicator Question For ninja t Ray | prostyle | NinjaScript File Sharing Discussion | 1 | 09-19-2007 02:03 PM |
| Indicator value set and get question (n00b) | Wataizo | General Programming | 3 | 09-02-2007 05:22 PM |
| Indicator Titling Question | Greg1 | Charting | 1 | 04-05-2007 11:57 PM |