Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ScottWalsh, Today, 04:29 PM
        0 responses
        5 views
        0 likes
        Last Post ScottWalsh  
        Started by rtwave, 04-12-2024, 09:30 AM
        2 responses
        22 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by tsantospinto, 04-12-2024, 07:04 PM
        5 responses
        70 views
        0 likes
        Last Post tsantospinto  
        Started by cre8able, Today, 03:20 PM
        0 responses
        7 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        49 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Working...
        X