Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Parameter Driven Line Object Values Do Not Update on Reload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Parameter Driven Line Object Values Do Not Update on Reload

    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.

    Add( new Line(Color.DarkGray, myParamLineValue, "Level1"));
    When I add the indicator to a chart (manually or via strategy) it will display a Line object with the value I desiginated in the parameter. However, when I change the parameter and reload the NinjaScript (F5) the Line object will not change and will keep its original value.

    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
    whitmark
    NinjaTrader Ecosystem Vendor - Whitmark Development

    #2
    >> 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.
    DierkNinjaTrader Customer Service

    Comment


      #3
      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, 11:06 AM.
      whitmark
      NinjaTrader Ecosystem Vendor - Whitmark Development

      Comment


        #4
        Thanks for your suggestion. We'll add them to the list of future considerations.
        DierkNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Ray12345, Today, 04:10 AM
        0 responses
        1 view
        0 likes
        Last Post Ray12345  
        Started by Behungr101, Today, 02:16 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by omermirza, Yesterday, 08:37 PM
        2 responses
        12 views
        0 likes
        Last Post NT-Roland  
        Started by aelagha, Today, 01:28 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by Lowerlevel1, Today, 12:26 AM
        0 responses
        6 views
        0 likes
        Last Post Lowerlevel1  
        Working...
        X