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

Strategy Not Making Orders

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

    Strategy Not Making Orders

    My script appears to be working correctly, but it's not making any orders.
    Log says: "Enabling NinjaScript strategy "strategy": On starting a real-time strategy - StartBehavio=WaitUntilFlat EntryHandling=All entries EntreisPerDirection=1 StopTargetHandling=By strategy position ErrorH.
    Last edited by heavy; 04-22-2020, 10:20 PM.

    #2
    Here is the script
    Attached Files

    Comment


      #3
      Hi heavy, thanks for your question.

      I tested the script and I get historical trades on June ES data. If this is a modification of the SampleMACrossover script that would be the prime example to compare the changes to. See here for the help guide page on debugging NinjaScript code as well:



      Please let me know if I can assist any further.
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        Strategy just received the following order errors:

        a. 'order rejected' Strategy has sent cancel requests, attempted to close the position and terminated itself

        b. insufficient margin. Available margin: usd 500. Used margin: usd0 total portfolio margin including this order: usd1000 this order increases margin by usd1000 affected Order sellshort 1 market

        I have attached the updated script.
        Attached Files
        Last edited by heavy; 04-26-2020, 04:05 PM.

        Comment


          #5
          Hi heavy, thanks for your reply.

          If you are running into a margin error in the Sim101 account you will need to reset it. Please take these steps to reset your sim101 account and it should work fine:
          • From the NinjaTrader Control Center window select the Accounts tab
          • Right click on your simulation account and select 'Edit Account'
          • Press the "Reset" button
          Please let me know if I can assist any further.
          Chris L.NinjaTrader Customer Service

          Comment


            #6
            The margin error was on my live ninjatrader brokerage account, not the sim101 acct.

            Comment


              #7
              Hello Heavy,

              Thank you for your note.

              For more information on your account, margin errors, and required funds, You'll need to contact your broker directly.

              If your account is with NinjaTrader you can reach them directly with the information below:
              • brokeragesupport(at)ninjatrader(dot)com
              • Toll Free: 1.800.496.1683


              Thank you for your patience.
              Heath R.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by judysamnt7, 03-13-2023, 09:11 AM
              4 responses
              57 views
              0 likes
              Last Post DynamicTest  
              Started by ScottWalsh, Today, 06:52 PM
              4 responses
              36 views
              0 likes
              Last Post ScottWalsh  
              Started by olisav57, Today, 07:39 PM
              0 responses
              7 views
              0 likes
              Last Post olisav57  
              Started by trilliantrader, Today, 03:01 PM
              2 responses
              19 views
              0 likes
              Last Post helpwanted  
              Started by cre8able, Today, 07:24 PM
              0 responses
              9 views
              0 likes
              Last Post cre8able  
              Working...
              X