Announcement

Collapse
No announcement yet.

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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    63 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    35 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    54 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    61 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    48 views
    0 likes
    Last Post CarlTrading  
    Working...
    X