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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    32 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    195 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    356 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    277 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X