Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can Default Values for "Data Series" & "Time frame" Inputs be Set Programmatically?

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

    Can Default Values for "Data Series" & "Time frame" Inputs be Set Programmatically?

    I'm running NinjaTrader version 8.0.23.2 64-bit with a custom NinjaScript Strategy run from the Strategies tab in the Control Center. I know how to set default values for many Strategy inputs using OnStateChange when State == State.SetDefaults, but there are a few "Data Series" and "Time frame" inputs for which I'd like to programmatically set default values but I don't know how. The inputs in question are listed below.

    1. Price based on (e.g. Last)
    2. Type (e.g. Minute)
    3. Value (e.g. 5, as in 5 Minute)
    4. Trading hours (e.g. US Equities RTH)
    5. Break at EOD (e.g. true)

    Can default values be programmatically set for any/all of these inputs and, if yes, then how?

    Thank you very much in advance for your assistance.

    #2
    Hello NtFan,

    Thank you for your post.

    It would not be possible to set these values for the primary data series, no. However, you could add a secondary data series and hardcode most of those values in the strategy and have the strategy calculate on and submit orders to that secondary series.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X