![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Certified NinjaScript Consultant
|
I am trying to create an indicator that will be called from a strategy and wanted to submit a parameter to define a Line object value.
Quote:
Many indicators use Line objects to display critical thresholds from which to evaluate potential setups (i.e., CCI, Stochastics, ADX). When developing a strategy it is useful to Add() an indicator for display purposes as well as call the same indicator for setup logic to ensure "what-you-see-is-what-you-get" within the operations of the strategy. Using this approach you can use the strategy parameters to drive what you see as well as how the strategy works. At the moment it seems like this approach works well for Plot objects but not so well for Line objects as they do not recalculate with each reload. Perhaps there is a setting I am overlooking. Please confirm. Is the only way to get these values to recalculate properly is to convert the Line objects to Plot objects? Thanks. Regards, Whitmark |
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
>> However, when I change the parameter and reload the NinjaScript (F5) the Line object will not change and will keep its original value.
Correct. This is expected behavior.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Certified NinjaScript Consultant
|
Thanks for the clarification. Given the current implementation, I can see why Line object values don't change for the same reason other settings in the parameter dialog don't change on a reload. However, for the use case I described in my orginial post, I would contend that many a standard indicator that use Line objects would benefit from being dynamically driven from an indicator parameter vs hardcoded such that NinjaScript strategies (including optimizations) can change these values on the fly as well and modify the resulting chart display on a reload. Sure, these indicators can be customized easily enough using Plots but as you know, Plots objects don't extend out to the right margin like Line objects, Plots display price markers that can't be turned off by individual plot, and Plot objects are much more memory intensive than a single value Line object. Perhaps its time to consider a separate Dynamic vs Static Line objects? Just a thought
![]() Regards, Whitmark
Last edited by whitmark; 07-10-2007 at 11:06 AM.
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Thanks for your suggestion. We'll add them to the list of future considerations.
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting draw object information | SuzyG | Strategy Development | 3 | 05-22-2008 01:37 PM |
| Error: Object reference not set to an instance of an object. | Januson | Market Analyzer | 1 | 05-18-2007 12:12 AM |
| PlotStyle.Line Across UnSet Values | whitmark | Indicator Development | 4 | 03-30-2007 01:14 AM |
| Broker Driven Charts | whitmark | Connecting | 1 | 03-29-2007 04:30 AM |
| Super Dome did not reload after a reboot | Shiva Swinger | Miscellaneous Support | 1 | 12-06-2005 02:58 AM |