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

Real Time strategy bug

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

    Real Time strategy bug

    Has anyone has issue with strategy working (ie showing historical trades on chart) but NOT actually entering a real time trade from same strategy

    I have a strategy that will trade Stocks in Real Time or Historical testing, but when applied to a futures contract ie NQ 03-20, ES 03-20 the chart will show historical trades

    but when running real time will not sent any order to make a trade (you can press F5 to reload all historical and the chart will refresh with trades that should have been made)

    again this issue does not exist when trading equities

    thanks

    #2
    Hello DTSSTS,

    I've tested and I am not able to reproduce this behavior.

    Scripts are able to place orders to live accounts.

    As a heads up, if the strategy is run in real-time on the Sim101, you will need to add a new instance of the strategy and select the live account. Do not try and change the Account selection of a strategy that has been run once.

    Should you want to know why your strategy is behaving the way it is behaving, it will be necessary to use TraceOrders and Prints to understand the behavior.

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


    Let me know if you choose to further understand the behavior and if you would like any assistance analyzing the output from prints.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      i ran this on if the strategy is run in real-time on the SimAccount, then i changed the sim account to the default sim101

      I simple do not get Prints, i have used them before and I understand what they can do, But i do not understand the exact words ie script to get what is needed to be printed (i have tried many times over the last few years)

      I am just trying to test this in a Sim Account, but it will not place an order BUT shows trades on the chart when using historical as explained in the post

      Comment


        #4
        Hello DTSSTS,

        Start by adding a print of the time outside of any conditions.

        Then enable a new instance of the script on the live account (without any logic to place orders).

        Do you see the strategy is remaining enabled or is it becoming disabled?

        Is the strategy on a chart? Are there new bars appearing on the chart?

        If so, the print of the time is going to appear for every update of OnBarUpdate().

        As bars close do you see the time appearing in the output window?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Solved IT was a spread Check setting on stocks
          thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by funk10101, Today, 12:02 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by GLFX005, Today, 03:23 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by nandhumca, Yesterday, 03:41 PM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by The_Sec, Yesterday, 03:37 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by vecnopus, Today, 06:15 AM
          0 responses
          1 view
          0 likes
          Last Post vecnopus  
          Working...
          X