Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter Trade by Contract Quantity

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

    Enter Trade by Contract Quantity

    I've created a strategy that is designed to purchase 5 futures contracts using the EnterLong method. I'm having a problem where, instead of treating the purchase like a futures purchase, Ninja treats the purchase like stock, deducting from my account 5 times the price of the index rather than doing the math of purchasing the contract with margin factored in

    can anyone help

    thanks

    #2
    eugenedw, thanks for your post and welcome to our support forums here at NinjaTrader! Which margin have you setup to use for your contract(s) in the Instrument Manager? (Tools > Instrument Manager) - http://www.ninjatrader-support.com/H...struments.html

    Comment


      #3
      I took a look at the settings for the instrument and everything looks okay. More research through Output logs shows me that the problem wasn't actually with the contract quantity calculation being wrong, but that the account cash value was being calculated incorrectly. After I exit a position I immediately enter a new position - this new position is determined in part by the cash value of the account. According to the logs, this value is not the value after the position was exited - it appears as if the strategy is moving too quickly to the next contract purchase. Do I need to put some sort of sleeper function in place so that the code waits for the account balance to be updated before it enters the new position? thanks.

      Comment


        #4
        Originally posted by eugenedw View Post
        I took a look at the settings for the instrument and everything looks okay. More research through Output logs shows me that the problem wasn't actually with the contract quantity calculation being wrong, but that the account cash value was being calculated incorrectly. After I exit a position I immediately enter a new position - this new position is determined in part by the cash value of the account. According to the logs, this value is not the value after the position was exited - it appears as if the strategy is moving too quickly to the next contract purchase. Do I need to put some sort of sleeper function in place so that the code waits for the account balance to be updated before it enters the new position? thanks.
        Hello eugenedw,

        I am forwarding your reply to NinjaTrader_Bertrand and you will receive a reply prior to the market open on Monday.

        Thank you for your patience and have a great weekend!
        Last edited by NinjaTrader_ChristopherJ; 06-20-2009, 06:01 PM.
        Christopher J.NinjaTrader Customer Service

        Comment


          #5
          eugenedw, thanks for the patience - to clarify: are you expecting to access your live brokerage account value through NinjaScript? Unfortunately this is not supported.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          573 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          575 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X