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

Enabled automated strategy did not start

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

    Enabled automated strategy did not start

    Hi,

    I leave my automated strategy running overnight on live account and it happened twice this week that, despite the strategy was enabled, margins met and conditions met, the trade is registered in the log but nothing happened to my account. I was sleeping so I am not sure exactly what happened but the money in the account is the same as before i went to sleep and in this case should have been a win worth ca 70$.
    It is so annoying!

    What might be the problem?

    Thanks
    Last edited by Giudiver; 07-10-2020, 04:42 PM.

    #2
    Hello Giudiver,

    Do you have a live account selected in the Account drop-down?

    Do you see any orders on the Orders tab of the Control Center?

    Are the orders on the Sim101 or are they on the live account?

    Are the orders accepted/working, or filled, cancelled, rejected?

    If you need to debug the script to know if the orders are being submitted use prints and TraceOrders.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      the account is live and it has been selected and the order showed the execution.
      What i mean is that out of 4 trades that should have happened within the day, 3 got triggered and one did not (the trade is registered in the log but nothing happened to my account) but I did not change anything, I just left it on and running.

      It was during market hours (9 am CST) and the margins were met.

      Comment


        #4
        Hello Giudiver,

        In the Log you are seeing the order submitted to the live account? Does the order show as filled?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,

          I could not retrieve the info on what happened that day but it happened again yesterday. I attached log and chart screenshot. This time nothing appears in the log (as you can see strategies were enabled at 6:26 AM and disabled at 3:00 PM) but the chart clearly shows a trade that happened at 1:25 PM that is not logged anywhere and not shown within the account.

          I do not know what is happening but at least once per week my trades do not get triggered.
          Attached Files

          Comment


            #6
            Hello Giudiver,

            Just looking at the time on the chart and the time the strategy is enabled on the log, my guess is that this is a historical order, from the historical data that is loading on the chart before the strategy begins placing real-time orders.

            Historical orders do not get submitted to the broker like orders placed in real-time.



            To confirm, print the time and the State one line before the order submission method call, and print the order object in OnOrderUpdate.

            Below is a link to a forum post that demonstrates how to use prints to understand behavior.


            I'm happy to assist with analyzing the output if you would like to save this to a text file and include this with your next post.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by gentlebenthebear, Today, 01:30 AM
            0 responses
            2 views
            0 likes
            Last Post gentlebenthebear  
            Started by samish18, Yesterday, 08:31 AM
            2 responses
            9 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by Mestor, 03-10-2023, 01:50 AM
            16 responses
            389 views
            0 likes
            Last Post z.franck  
            Started by rtwave, 04-12-2024, 09:30 AM
            4 responses
            31 views
            0 likes
            Last Post rtwave
            by rtwave
             
            Started by yertle, Yesterday, 08:38 AM
            7 responses
            29 views
            0 likes
            Last Post yertle
            by yertle
             
            Working...
            X