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

AccoutSize amount

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

    AccoutSize amount

    Good afternoon, as I can use from script code AccoutSize amount?.

    Example ---- EnterLong (accountsize, 10000, "CantidadDolares);

    I made ​​a purchase of 10,000 shares not want that, I want to buy 10,000 dollars worth.


    As I have to type in the code.


    Thank you.

    #2
    Hello,

    If you want to trade based off an account size value, you will need to set the properties when running the strategy.

    This is in the order properties section: http://www.ninjatrader.com/support/h...analyzer_4.png

    Sets how the order size is determined, options are:
    "by default quantity" - User defined order size
    "by strategy" - Takes the order size specified programmatically within the strategy
    "by account" - Allows you to set a virtual account value that is used to determine maximum order size based on margin settings per instrument set in the Instrument Manager



    Let me know if I can further assist
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hello, I want to throw accountsize 10000 order from system, automatic, not backtest.

      protected override void Initialize ()
      {
      AccountSize = 10000;
      }


      Enterlong () ;/ / does not work

      It does not work, order 10000 shares system releases.

      Help please.

      As I can do system buy 10000 dollars worth please?

      thanks

      Comment


        #4
        The settings are the same (in this regard) between real time and a backtest.

        What instrument are you running this on?

        Please provide me with an image of your strategy settings.
        To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
        For detailed instructions please visit the following link

        * http://take-a-screenshot.org/

        Let me know how I can further assist
        LanceNinjaTrader Customer Service

        Comment


          #5
          Hello I am sending the paint.

          As you see, the system buys 100 shares appl.

          Must buy 10,000 dollars worth of the corresponding actions.

          Thank you.
          Attached Files

          Comment


            #6
            Setting the Account Size is feature is done through the user interface. After setting the value here let me know if I can be of further assistance.

            See attached screenshot.
            Attached Files
            LanceNinjaTrader Customer Service

            Comment


              #7
              Ok, already cleared.

              Good weekend


              Lance.

              Thank you,

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by mjairg, 07-20-2023, 11:57 PM
              3 responses
              213 views
              1 like
              Last Post PaulMohn  
              Started by TheWhiteDragon, 01-21-2019, 12:44 PM
              4 responses
              544 views
              0 likes
              Last Post PaulMohn  
              Started by GLFX005, Today, 03:23 AM
              0 responses
              3 views
              0 likes
              Last Post GLFX005
              by GLFX005
               
              Started by XXtrader, Yesterday, 11:30 PM
              2 responses
              12 views
              0 likes
              Last Post XXtrader  
              Started by Waxavi, Today, 02:10 AM
              0 responses
              7 views
              0 likes
              Last Post Waxavi
              by Waxavi
               
              Working...
              X