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, 03-31-2026, 09:41 PM
    1 response
    80 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    64 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X