Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Instrument Margin

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

    Get Instrument Margin

    Hi,

    I've read



    and understood that in NT8 generally there is no instrument margin that can be accessed programmatically. Is that correct?

    Is that the case even if I'm trading with NinjaTrader Brokerage?

    If so, could you file a development request to make your own margins accessible in NinjaScript strategies?

    Many thanks

    Yannick

    #2
    Hello yannickwe,

    The margin for instruments has been removed in NT8, it would now be suggested to just make a user input in your script which you can type in a margin amount and use that in your code.

    Comment


      #3
      Hi Jesse,

      thanks for your response!

      Unfortunately, a user input doesn't help for my use case. For I want to programmatically prevent taking further trades while you 4x the margins 15 minutes before major news events (see https://ninjatrader.com/pricing/marg...on-management/).

      Any advice on how to solve this programmatically?

      Regards
      Yannick

      Comment


        #4
        Hello yannickwe,

        For that case you could use math to multiply the margin you input times 4 to get the 4X amount. To do that at a certain time you can create a time condition for that purpose. https://ninjatrader.com/support/help...nt8/totime.htm

        Comment


          #5
          Okay, but the times that the economic news come out change/aren't rule-based. So I'd somehow have to get their publishing time programmatically.

          And I haven't found a way to do so.

          Hence my request to put instrument margin back into NT8 (I understand it was available, albeit undocumented, in NT7).

          Regards
          Last edited by yannickwe; 10-25-2024, 12:00 PM.

          Comment


            #6
            Hello yannickwe,

            In NT7 the margin value was a static value that you could manually enter into the instrument definition, that did not have any server updates or multiply automatically. It served essentially the same purpose as using a user input for the value. There are currently no ways in the platform to get individual instrument margin updates from the server which would represent the changing values when news happens. That would fall onto the investor to track economic events which are relevant to your trading style and plan around that.

            You can access the overall account margin dynamically but that is not the same as posted margin requirements for individual instruments.

            Comment


              #7
              Understood.

              Would you still take programmatic access to instrument margins with you as request for your roadmap?

              The argument being that automating a trading system makes little sense if you have to manually keep track of economic events and fumble with the system each time those events happen.

              Many thanks!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              113 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              60 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              40 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              43 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              81 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X