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

create a tick simulated on the chart

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

    create a tick simulated on the chart

    Good morning,
    you can create a connection that simulates the appearance of a candle on the graph. Just one tick is enough. This would allow you to see in advance, without waiting for the stock market opening, if there will be Long or Short signals that will trigger.
    For example, load historical charts of 10 US stocks, load the algorithm on each stock, then disconnect and reconnect with the connection that generates a single simulated click. In this way I could see if there are signals in the algorithm that will slip.
    Thank you.
    Roberto

    #2
    Hello Roberto,

    Thanks for your inquiry.

    There is the Simulated Data Feed which can offer fluctuating trends, but this wouldn't offer a representation of instruments that could be used in a sort of prediction. You could create your own External Data Feed that would provide a representative feed, however, the only direction and support we could offer for that approach would be the through DLL interface reference.

    The DLL interface is openly available in our help guide here: https://ninjatrader.com/support/help.../functions.htm

    Instead of creating your own data feed, I would advise to use an indicator instead for any prediction algorithms that you wish to program.

    As far as slippage goes, this would be very subject to volume at that time, which may or may not be consistent day to day, and would probably involve an intuitive way to predict it.

    I''l leave this thread open ended if any other members of the forum have additional insight they can share.
    JimNinjaTrader Customer Service

    Comment


      #3
      I know there's a simulated connection, but I mean something else. Attached is the AAPL graph with an Algorithm running with the Kinetick And of Day connection. I wonder if it was possible in this case to disconnect Kinetick and connect a simulated connection to generate only 1 tick, any, of the new candle. In this way I could see, in advance, if the algorithm will generate an order (Long / Short) or not.
      Thank you.
      Roberto
      Attached Files

      Comment


        #4
        Hello Roberto,

        Thanks for the additional detail.

        The Simulated Data Feed could be connected to resume from a set of historical data. You may then disconnect from the Simulated Data Feed and return to your provider in which the historical data will be reloaded. We do this in a few of our webinar presentations to resume market data from a certain point outside of trading hours. (This would not be limited to one tick however.) Also note that you will want to use a Default 24/7 trading hours template to allow the simulated ticks outside of hours.

        I think disconnecting from your provider and switching to the Simulated Data feed would help you accomplish what you are trying to do. If it is not, could you let me know some specific drawbacks you are having with this approach or further detail the necessity for only one tick?
        Last edited by NinjaTrader_Jim; 12-01-2017, 12:07 PM.
        JimNinjaTrader Customer Service

        Comment


          #5
          It looks like it works.
          Thank you Jim.
          Roberto

          Comment


            #6
            Hi Jim.
            attached the image "Chart" where with the simulated connection there is no Tick, because they are outside the trading hours.
            Always attached the image "Chart OK" where there is the tick simulated because I set as default 24/7.
            Now, to run the simulation on my workspace where the settings are made according to the markets Europe and USA (all predefined), how can I activate the simulated connection 24/7?
            Thank you.
            Roberto
            Attached Files

            Comment


              #7
              Hello Roberto,

              I was going to prepare a demonstration video for setting this up, but I think I misread your reply. It sounds like you understood my suggestion.

              You could run separate strategies using the different Trading Hour templates and have one run on the Sim101 account and have the other strategy run on another account. Have the Sim101 strategy use a custom trading hours template, or modify the logic to only allow actions to happen within certain times. You can use your own custom programming to disable this logic via a button press, or you can switch over to the Simulated Data feed to give you data.

              The result would be one strategy that is used for simulating order fills, and a second for real time use.

              I'll include some examples of including buttons in a NinjaScript.

              NT8 Buttons - http://ninjatrader.com/support/forum...327#post499327

              You can also reference creating custom Trading Hours templates in our public help guide here - https://ninjatrader.com/support/help...ngHourTemplate

              Please let me know if this approach would not be valid for your needs.
              JimNinjaTrader Customer Service

              Comment


                #8
                Hi Jim,
                I created a New Trading Hours Template, copying US Equities RTH but changing schedules, anticipating the opening of 8 hours: from 01.30 to 16.00.
                In this way I should be able to generate the Tick 8 before (07:30 Italy) of the opening of the NY Stock Exchange (15:30 Italy - 09:30 NY). Tomorrow morning I'll try to see if it works.
                If this works, then, I will have to create a BIS Workspaces with the same stocks, loading the charts with the New Trading Hours.
                I did not understand your explanation about using the buttons or the simulated account.
                Attached Files
                Last edited by Italy; 12-05-2017, 10:08 AM.

                Comment


                  #9
                  Hello Roberto,

                  My idea was to have the strategy running twice at the same time. One instance on the Sim101 account, and another instance on another account.

                  The Strategy applied to the Sim101 account should use a modified trading hours template so it can see incoming ticks outside of normal trading hours. If you want it to behave like the original strategy, it should use its own custom logic to take actions between certain times that would match the original trading hours template. This time filtering logic would need to be disabled when you would want to test with the Simulated Data feed to see if a future tick will affect the strategy. Disabling this logic can be most easily done from a button press that you can program in.

                  Essentially, the Simulated Data feed can be used to provide fake data so long as the data series being used uses a Trading Hours template that allows that data to come through. Taking advantage of this to suit your needs can be done through custom programming and following the approach I described.

                  If you are interested in services that can write this logic for you, I can have a member of our Business Development team reach out with information on NinjaScript Consultants.
                  JimNinjaTrader Customer Service

                  Comment


                    #10
                    Hi JIM,
                    tomorrow morning I see if it works as much as I did. The goal is to be able to anticipate the signals of the algorithms I use a few hours ago, in fact generating a false Tick. This is because I can not always be on the computer when I open NY.
                    I'll let you know tomorrow.
                    Thank you.
                    Roberto

                    Comment


                      #11
                      Hi JIM,
                      IT WORKS!!!
                      Thank you so much.
                      Roberto

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by algospoke, Yesterday, 06:40 PM
                      2 responses
                      19 views
                      0 likes
                      Last Post algospoke  
                      Started by ghoul, Today, 06:02 PM
                      3 responses
                      14 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by jeronymite, 04-12-2024, 04:26 PM
                      3 responses
                      45 views
                      0 likes
                      Last Post jeronymite  
                      Started by Barry Milan, Yesterday, 10:35 PM
                      7 responses
                      20 views
                      0 likes
                      Last Post NinjaTrader_Manfred  
                      Started by AttiM, 02-14-2024, 05:20 PM
                      10 responses
                      181 views
                      0 likes
                      Last Post jeronymite  
                      Working...
                      X