![]() |
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
|
|||||||
| Suggestions And Feedback New feature suggestions and feedback. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2007
Location: Arlington Heights, IL
Posts: 100
Thanks: 0
Thanked 4 times in 4 posts
|
I have an indicator which has a parameter that is a Color type.
Everything works as expected when that indicator is added to the chart through the Indicators selection dialog. However, if that indicator is saved as part of a template and then that template is used as the default Chart Template when opening a new chart, then the variable which is supposed to be initialized to a Color is NOT initalized. I have attached a simple indicator to demonstrate. Note that the variables are given inital values just like the wizard does. The indicator simply prints to the output window the value of the variables. To reproduce the bug: -Save the indicator as part of a template. -Open the output window. -Open a chart with the template as the default. -You will see in the output that the value of the color variable is empty. -There are other variables, (an int and a double) that clearly have their values initialized correctly. I believe this is some kind of bug that the color field is not being initialized like other variables are. -Gary |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Nov 2007
Location: Arlington Heights, IL
Posts: 100
Thanks: 0
Thanked 4 times in 4 posts
|
Ray, thanks for the solution.
Can I take a moment to point out that this is one of several issues I have run across in my learning curve to pick up NinjaScript where the documentation is not adequate. I could not find anything describing why serialization for parms was required. Keep in mind, I would not know what to search the forums for. (BTW, I don't think forums are the best way to organize your knoweldge base and make it easy for developers to learn.) Other examples of issues I needed doc for: - In the OnOrderUpdate method, what are the rules for knowing what bar is being referred by Close[0]? - More info is needed to describe the timing of all the various callbacks NT can make. - I have seen code that overrides some lower level paint method (I forget exact name) but I did not see any doc on why you might care to do this and rules to follow if you did (code that needs to be done for the method to work right, etc). It is hard to learn these 'NT software architecture' concepts from a help system meant for people using the trading platform. I like the platform and think you guys have done a great job, but trying to learn what it takes to use the NinjaScript well should not be so hard. Keep up the good work. Regards, Gary |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Thanks for your comments.
- Close[0] always refers to the current bar (Close[1] would refer to 1 bar ago) - Not sure what you mean about timing of call backs but if you are referring to the sequence of how they are called --> I would never rely on any consistent order in which they may be triggered. Code your stratey in a away that accounts for randomness - You don't see help since this is not overriding plot method is not officially supported
Ray
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| externally accessible custom indicator variable? | Lost Trader | General Programming | 5 | 01-12-2008 02:27 AM |
| Commissions not included in PnL calculation | Rollins | Historical NinjaTrader 6.5 Beta Threads | 10 | 12-13-2007 08:16 AM |
| Using a formula or variable as an input to an Indicator | nolantx | Indicator Development | 5 | 05-24-2007 03:58 PM |
| Color Price Bar example or template | rmactaggart | Indicator Development | 1 | 11-19-2006 03:22 PM |
| Will the new indicators be included in future NT revisions? | Lupus | Indicator Development | 1 | 04-06-2006 09:17 AM |