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

Simulated data feed and attaching a strategy to an instrument

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

    Simulated data feed and attaching a strategy to an instrument

    Hello

    When I start NT7, then connect to "Simulated Data Feed",

    Then I try to attach my custom strategy to the displayed instrument chart,

    Then the strategy is not attached.

    I have to try 5 to 10 times in order to have the strategy well attached to the instrument.

    I think that the strategy is not attached because NT7 is waiting for the market to be "flat".

    How to force the strategy to be attached immediately to the instrument ?

    Thanks

    #2
    Hello investdatasystems,

    Thanks for opening the thread.

    When you look at the strategy you had just enabled on your chart in the Strategies tab of the Control Center, is it green or yellow? Yellow would indicate that the strategy is enabled with the Wait Until Flat Start Behavior and the strategy is in a position based on the historical data it processed upon enablement. The strategy will then take trades virtually until the strategy has reached a flat position. At that point the strategy will turn green and can begin submitting orders to the live account.

    You may wish to investigate using Immediately Submit with your strategy so when you enable the strategy, you are not waiting for the strategy to reach a flat position before submitting orders to the live account.

    I've included some resources that explain these start behaviors and how they can be modified, the difference between the strategy position and the account position, and a resource for referencing the Strategies tab of the Control Center. This information is publicly available.


    Please let us know if this information does not resolve your inquiry.
    JimNinjaTrader Customer Service

    Comment


      #3
      The strategy is neither green nor yellow, after attaching it to a chart, and the checkbox at the right of the strategy is unchecked by NT7 immediately.

      My strategy opens a custom WinForm, so if the form is not shown then my strategy is not started...

      I have tried with StrategySync=SubmitImmediately but that changes nothing...

      I'll have a look at the links you mention in order to find a solution (<=> have the custom form showing immediately after attaching my strategy to a chart).

      Thanks !
      Last edited by investdatasystems; 03-27-2018, 08:53 AM.

      Comment


        #4
        Hello investdatasystems,

        Do you see any errors in the log tab of your Control Center?

        Are you able to enable the SampleMACrossover strategy with the same data and settings?

        I may also suggest to comment out sections of your code to reduce the strategy to a state where it can be enabled, and then to check the commented code for any potential run time errors. Adding prints could also be helpful to find out which lines of code are reached before a run time error occurs and disables the strategy.

        I look forward to being of any further assistance.
        JimNinjaTrader Customer Service

        Comment


          #5
          Hello

          Thank you for your reply.

          I am going to make new tests and will keep you informed.

          There are no error in the log tab.

          Comment


            #6
            Originally posted by investdatasystems View Post
            Hello

            Thank you for your reply.

            I am going to make new tests and will keep you informed.

            There are no error in the log tab.
            Just some thoughts,

            1. Check the most recent files in 'log' and 'trace' folders.
            Sometimes more information is in these files. Since they are just text files, and written to in chronological order, open the most recent files and goto the end of each file and search backwards for any errors or messages that pertain to your strategy.

            2. Try using 'Default 24/7' session template.
            When connecting to the Simulated Data Feed, you might need to set your chart's Session template to 'Default 24/7' -- otherwise NinjaTrader will not generate any simulated data on Friday nights and weekends (when markets are normally closed).

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by The_Sec, Today, 02:29 PM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by jeronymite, 04-12-2024, 04:26 PM
            2 responses
            30 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by Mindset, 05-06-2023, 09:03 PM
            10 responses
            265 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by michi08, 10-05-2018, 09:31 AM
            5 responses
            743 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by tsantospinto, 04-12-2024, 07:04 PM
            4 responses
            63 views
            0 likes
            Last Post aligator  
            Working...
            X