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 Brevo, Today, 01:45 AM
              0 responses
              2 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              3 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              238 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              384 views
              1 like
              Last Post Gavini
              by Gavini
               
              Started by oviejo, Today, 12:28 AM
              0 responses
              4 views
              0 likes
              Last Post oviejo
              by oviejo
               
              Working...
              X