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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    71 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    143 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    76 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    47 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    51 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X