Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Set default value for "Entries per direction"?

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

    Set default value for "Entries per direction"?

    Hi guys,

    all new here, and haven't found anything using the search engine...

    My question is: How do I set a default value for the "Entries per direction" value I need to set up when starting a strategy on a chart? So far, I always have to change the standard "1" manually...

    Thanks for helping!

    #2
    Hi noincomenojobnoassets,

    Welcome to the NinjaTrader Support Forums. Please see this post: http://www.ninjatrader-support2.com/...06&postcount=5
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      Thanks for the answer.

      I have added the line
      EntriesPerDirection = 15;
      to the "protected override void Initialize()" section in the code - however, when I right-click on a chart and select my strategy, it still only suggests 1 Entry per direction.....

      Sorry, I am completely new to this - sure thing the error is in front of the screen ;-)

      Comment


        #4
        After such a change you need to press F5 to compile your code. Then you need to remove the strategy from the chart and load a new instance.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Great! Worked!

          Thanks, Josh!

          Does this work in the same way for e.g. the Account to be traded on, say an InteractiveBrokers papertrading account instead of the NT Sim101 one?

          I would then add a line like

          Account = <IBpapertradingaccount>;

          ...?

          Regards,

          ninjna

          Comment


            #6
            Unfortunately you cannot set the account.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Oh. OK. Thanks anyway!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by popecapllc, 08-09-2023, 07:42 PM
              8 responses
              1,344 views
              0 likes
              Last Post Johng22
              by Johng22
               
              Started by ETFVoyageur, 04-30-2024, 02:04 PM
              11 responses
              100 views
              0 likes
              Last Post ETFVoyageur  
              Started by bubblegum, 03-18-2024, 10:41 AM
              3 responses
              44 views
              0 likes
              Last Post vjsworld  
              Started by JamesK1, Today, 02:48 PM
              1 response
              13 views
              0 likes
              Last Post JamesK1
              by JamesK1
               
              Started by llanqui, Today, 03:51 PM
              0 responses
              11 views
              0 likes
              Last Post llanqui
              by llanqui
               
              Working...
              X