Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why there are too many variables to set in strategy settings? Can it be simplified?

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

    Why there are too many variables to set in strategy settings? Can it be simplified?

    Why do we need to set a ton of settings for each strategy? Can this be set in like a general settings/template separate from a single strategy settings? Why do I have to do this for each strategy?

    And why strategies can just disappeared from strategies tab? and saving in template doesn't really save all the settings?

    What's the use of entry per direction in strategy settings? If I didn't set in the code it will not really open the right amount of contracts, right? If I just have enterLong() in the code and that entry per direction variable will not open the right amount of contracts regardless of what number I put in it? Why do I have to set this twice? Once in the code and another in the strategy settings?
    Last edited by Brevo; 04-26-2024, 03:25 AM.

    #2
    Hello Brevo,

    This would depend on the developer that created the strategy.

    There are only a few properties available to all strategies. Many of the properties can be left with the default value:

    Input Series - If there are multiple data series added to a chart, which data series is this strategy being added to.
    Account - Which account do you want this strategy to place orders to.
    Calculate - How often do you want the logic to be evaluated.
    Label - What text do you want to appear on the chart to identify this script.
    Maximum bars look back - How far back do you need previous bar values for in the script code.
    Bars required to trade - How many bars need to be loaded before the strategy starts placing orders.
    Start behavior - How do you want the strategy to synchronize with the account
    Enabled - Turn the strategy on
    Order fill resolution - For historical data, how accurate would you like order fills.
    Fill limit orders on touch - For historical data, should limit orders fill when the price is met or exceeded.
    Slippage - For historical data, should market orders fill a number of ticks from the submission price.
    Entries per direction - How many

    Any other properties are added by the developer of that script.

    "Can this be set in like a general settings/template separate from a single strategy settings?"

    Properties can be saved in and loaded from a template for a specific strategy. The template must match the properties so template are specific to strategies.

    Below is a link to the help guide.


    "And why strategies can just disappeared from strategies tab?"

    This can occur if a chart the strategy was added to was closed, or if the Sim101 account is reset, or if the database is reset.

    "and saving in template doesn't really save all the settings?"

    The template saves everything except for the data series information and account information. (The instrument, bar type, input series, account)
    This is because you will want to change either the instrument or the account as to not run the same strategy with multiple instances on the same instrument and account.

    "What's the use of entry per direction in strategy settings?"

    This is a preventative measure for new developers that have not written logic to prevent new orders each time a submission condition is true.
    By defaulting this to 1, the strategy will ignore any new order requests after a position has been taken. If the user desires to place multiple entries into the same position, the user is able to increase this value. The developer is also able to set the default amount of entries they would like into a position.

    " If I didn't set in the code it will not really open the right amount of contracts, right?"

    This would depend on the logic. This is preventing multiple entry orders. The total number of contracts in the position quantity would depend on the contract quantity of each order and how many entry orders are being allowed into the position. Also, what is the right amount of contracts?

    "If I just have enterLong() in the code and that entry per direction variable will not open the right amount of contracts regardless of what number I put in it? "

    With EntriesPerDirection set to 1, one entry order will be allowed with whatever the contract quantity has been set with that entry order. If the contract size is 15 contracts, then the entry order will fill with 15 contracts, setting the position to long 15 and all further entry orders will be ignored until the position is exited.

    "Why do I have to set this twice? Once in the code and another in the strategy settings?"

    You don't have set this twice.
    You can choose to set the default value of this property.
    If you choose to leave this out of State.SetDefaults it will default to 1.
    The user can also leave this at the default of 1 or choose to set this to a higher value.


    It also sounds like you may be confusing the number of entry orders with the number of contracts (order quantity of each order).


    The 'Automate Your Trading with NinjaTrader's Strategy Builder​' training video discusses most of the questions from your inquiry.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    69 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    42 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    24 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    27 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    54 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X