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

Adjust Data Series Settings From Strategy

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

    Adjust Data Series Settings From Strategy

    Is it possible to have the strategy change inputs to the primary data series?

    For example, a user input that's a double and this value is used as input for a variety of things including: stop, trail stop amount, secondary series settings, primary series settings.

    An example of what might be changed in the data series would be:
    If range type, change number of ticks to construct range.
    If renko type, change brick size.
    If volume based change number of contracts to create bar.
    If tick chart change number of ticks to create bar.

    For the secondary data series, I can see how you would change that when you add the series when we're in the configure state. But how would this be done on primary (if it's possible)?

    #2
    Hello butt_toast,

    There is no supported way to dynamically set the dataseries from a script. While you could invoke keyboard commands to change the chart using the keyboard shortcuts that would disable and restart the strategy. The same would apply to secondary series, it is actually documented with AddDataSeries that variable secondary series should not be used as that will not work in all use cases. When using variables with AddDataSeries you run the risk that the data will not load as expected.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    53 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    33 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    5 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    19 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    6 views
    0 likes
    Last Post cre8able  
    Working...
    X