Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Kinetick Trading Bot Connection & Other Strategy Implementation Issues

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

    Kinetick Trading Bot Connection & Other Strategy Implementation Issues

    1. I subscribed to the Kinetick data feed with the NASDAQ and New York exchanges. I would like to connect both exchanges to my trading bot, but when I go to Configure the strategies, it only has the NinjaTrader data feed for what the chart is set on. The chart can only choose from the normal NinjaTrader feeds. For stocks, this is an individual stock from the NASDAQ 100 and the SP 500. Instead, I want all the stocks from the two exchanges which Kinetick should be providing.

    2. Also, the only account I can set my strategies to is SIM101 instead of my real account with money. How do I get it switched to the real account so it will trade?

    3. Finally, checking the strategy enabled box is inconsistent. it usually gives me a pop up says, "Although you have order confirmation enabled, orders generated by a strategy will be submitted without confirmation." After I click "OK," the enabled box is unchecked. So, how can I consistently enable the strategies?

    Thanks for any help you can provide for these issues.

    #2
    Hello WolfTrader9,

    1. Charts or automated strategies don't have setting to select the data feed. You can configure preferred connections at Control Center-->Tools-->Options-->Market data. If you select Kinetick for 'Stock', you will receive stock data from Kinetick. More information can be found at the link below.


    2. Could it be 'Global Simulation Mode' is enabled at Control Center-->Tools? If so, please disable it and you should be able to select your live account.

    3. Do you notice any consistency when this issue occurs? When I test it on my end, it does not uncheck the Enabled box after I click OK in this pop up message.

    If you disable 'Confirm order placement', does the issue persist for you? Please go to Control Center-->Tools-->Options-->Trading and disable 'Confirm order placement'. Click OK. Check if you now can enable strategies successful each time.

    Comment


      #3
      Jason,

      Thanks for getting back to me. I need to look more into obtaining the Kinetick data for my bot.

      2. It doesn't matter if the Global Simulation Mode is checked or unchecked. I found this Q&A on changing accounts https://forum.ninjatrader.com/forum/ninjatrader-8/platform-technical-support-aa/1106443-changing-accounts-help. I am wondering if I lost my access to my alive key after I connected to the Kinetick data as I was able to connect the bot to the account before. Are you able to check or know anything about it?

      3. After more experimentation, I seem to lose the ability to enable a strategy if I remove and reinstall it. To be able to enable a strategy again, I need to change workspaces.

      Thanks,
      Benjamin​

      Comment


        #4
        Hello Benjamin,

        Can you please send me your log and trace files from within NinjaTrader, so I can investigate these issues.
        • Go to Control Center-->Help-->Email Support
        • Set the To field to Platform Technical Support
        • Enter "Att Jason, 03992887" in the "Subject" field
        • Enter any text under 'Please enter any information that you feel will help us resolve your inquiry'.
        • Make sure "Log and trace files" is enabled
        • Click Send

        Comment


          #5
          Transitioning from SIM101 to your actual trading account is crucial. Usually, this involves adjusting account settings within the platform. Make sure you link your real account with funds properly to allow for live trading. Besides, dealing with the strategy enabled box inconsistency can be a tad frustrating. The pop-up might be an order submission confirmation, but the unchecked box after clicking "OK" seems odd. It's worth reaching out to NinjaTrader's support to resolve this and get consistent enabling. Have you ever considered exploring AI trading platforms? Ethereum Code is an interesting option that incorporates AI into trading.
          Last edited by Vulnedushk; 09-05-2023, 11:52 AM.

          Comment


            #6
            I started trying to get my bot to trade again. However, though the bot will load all the 1-minute data manually from a ticker symbol list it won't trade. There is a print statement after this line that doesn't happen: protected override void OnBarUpdate(). I am wondering if it is because the Kinetick data connection is linked to my Sim101 account and not my live account. I have the NinjaTrader feed connected to my live account.

            I can't find a way to change the Kinetick data to my live account and I am not sure how to delete the Sim101 account if possible.

            Thanks for your help.
            Benjamin

            Comment


              #7
              Hello Benjamin,

              Thanks for your notes.

              The Sim101 account that comes default with NinjaTrader 8 cannot be deleted from the platform.

              How exactly is the Print statement defined in the script?

              If you connect to your live data feed connection and enable the strategy on a chart window, do you see the strategy successfully enabled?

              If the strategy successfully enabled, do you see Print statements appear in a New > NinjaScript Output window?

              See this help guide page for more information about running a NinjaScript strategy on a chart window: https://ninjatrader.com/support/help...t_strategy.htm

              Note that if you want to run the strategy on the Sim101 account, you would need to set the 'Account' property in the Strategies window to 'Sim101'. If you want to run the strategy on your live account, you would need to be connected to your live data feed connection and set the 'Account' property in the Strategies window to your live account.

              As NinjaTrader_Jason stated: "Charts or automated strategies don't have setting to select the data feed. You can configure preferred connections at Control Center-->Tools-->Options-->Market data. If you select Kinetick for 'Stock', you will receive stock data from Kinetick. More information can be found at the link below.
              https://ninjatrader.com/support/help...ataConnections"
              <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

              Comment


                #8
                Brandon,

                I can successfully enable a stratagy. The "Finished" print statement appears in the Output window but not the next print statement. The Kinetick data feed is set as the preferred feed for stocks. However, whenever I "Enable" the strategy it shows "My NinjaTrader" under "Connection". If "My NinjaTrader" data feed is disabled then I can't "Enable" my strategy. Here is a chunk of my code for you to check. The first print statement worked while the second one did not.

                else if (State == State.Configure)
                // Loop through NASDAQ symbols and add them to the chart
                foreach (string nasdaqSymbol in nasdaqSymbols)
                {
                AddDataSeries(nasdaqSymbol, Data.BarsPeriodType.Minute, 1); // Example aggregation
                Print("Finished");
                }
                }

                protected override void OnBarUpdate()
                {
                Print("1-Minute Data: " + Close[1]);
                if (CurrentBar < 1)
                return;

                string symbol = Instrument.MasterInstrument.Name;

                double percentageIncrease = (Close[0] - Close[1]) / Close[1] * 100;

                if (stockIncreases.ContainsKey(symbol))
                {
                if (percentageIncrease > stockIncreases[symbol])
                stockIncreases[symbol] = percentageIncrease;
                }
                else
                {
                stockIncreases.Add(symbol, percentageIncrease);
                }

                // Calculate 30-day trading volume average
                double averageVolume = SUM(Volume, 30)[0] / 30.0;
                Print("30-day Mean volume: " + averageVolume);
                double currentVolume = 0;
                currentVolume = currentVolume + Volume[0];
                Print("Volume of the day: " + currentVolume);​



                Also, how are strategies "Time in Force" abbreviations defined: DAY, GTC, & GTD? My strategy is set to GTC.

                Thanks,
                Benjamin

                Comment


                  #9
                  Hello Benjamin,

                  Thanks for your notes.

                  I see that you are dynamically calling AddDataSeries() in the strategy that you shared. The arguments passed into the AddDataSeries() method should be hardcoded into your script and not dependent on variables or be dynamically called.

                  From the AddDataSeries() help guide: Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided.

                  AddDataSeries(): https://ninjatrader.com/support/help...dataseries.htm

                  This means that you will need to modify the code in your script to remove the loop and hardcode the arguments for AddDataSeries() for each secondary data series you want to add to the script so it is not dynamically called.

                  The Print statements in OnBarUpdate() should be placed after your CurrentBar check. You would also need to add a CurrentBars check for any added secondary series in the script as well.

                  See the help guide documentation below for more information.

                  CurrentBars: https://ninjatrader.com/support/help...urrentbars.htm
                  Make sure you have enough bars: https://ninjatrader.com/support/help...nough_bars.htm
                  Working with Multi-Timeframe/Multi-Instrument NinjaScripts: https://ninjatrader.com/support/help...nstruments.htm

                  Note to check the Log tab of the Control Center for any errors that might appear when running the script.

                  If your Live account is linked to your NinjaTrader connection and you enable the strategy on your Live account, the NinjaTrader connection would appear in the Connections column of the Strategies tab of the Control Center. In this case, you would have to be connected to your NinjaTrader connection in order to enable the strategy on your Live account.

                  Time In Force DAY means orders will be canceled by the broker at the end of the trading session. GTC means orders will remain working until the order is explicitly canceled. GTD means orders will remain working until the specified date.

                  See this help guide page for more information about Time In Force: https://ninjatrader.com/support/help...=Time+in+force
                  <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                  Comment


                    #10
                    Brandon,

                    Okay, to clarify, AddDAtaSeries() would be:

                    AddDataSeries("A", Data.BarsPeriodType.Minute, 1);
                    AddDataSeries("AA", Data.BarsPeriodType.Minute, 1);
                    AddDataSeries("AAC", Data.BarsPeriodType.Minute, 1);
                    (ect.)

                    and CurrantBar would be:

                    if (CurrentBars[0] < 1 || CurrentBars[1] < 1 || CurrentBars[2] < 1 || ect.)
                    return;

                    Thanks,
                    Benjamin​

                    Comment


                      #11
                      Hello Benjamin,

                      Thanks for your notes.

                      Yes, that would be how to add three secondary 1-Minute data series for instruments called 'A', 'AA', and 'AAC' to the script.

                      That would be the correct way to create a CurrentBars check in the script to make sure you have enough bars in the data series you are accessing.

                      AddDataSeries(): https://ninjatrader.com/support/help...dataseries.htm
                      Make sure you have enough bars: https://ninjatrader.com/support/help...nough_bars.htm
                      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                      Comment


                        #12
                        Brandon,

                        I added the 1-minute data series data and the CurrentBars check. However, I am getting a CS0201 error on the CurrentBars check.

                        Error Description Home
                        Only assignment, call, increment, decrement, await and new object expressions can be used as a statement





                        // Erroneous Sample Code - Statement that does nothing

                        SMA(5)[0];



                        // Resolution Sample Code - 'currentSMA' takes on the current bar's SMA(5) value

                        double currentSMA = SMA(5)[0];


                        I don't see any variable designation in the CurrentBar series examples. Do you know what might be tripping it?

                        Thanks for your help.
                        Benjamin


                        Here is my code sample.
                        protected override void OnBarUpdate()
                        {
                        if (CurrentBars[0] < 1 || CurrentBars[1] < 1 || CurrentBars[2] < 1 ||CurrentBars[3] < 1 || CurrentBars[4] < 1 || CurrentBars[5] < 1 ||
                        CurrentBars[6] < 1 || CurrentBars[7] < 1 || CurrentBars[8] < 1 ||CurrentBars[9] < 1 || CurrentBars[10] < 1 || CurrentBars[11] < 1 ||
                        CurrentBars[12] < 1 || CurrentBars[13] < 1 || CurrentBars[14] < 1 ||CurrentBars[15] < 1 || CurrentBars[16] < 1 || CurrentBars[17] < 1 ||
                        ....
                        CurrentBars[7560] < 1 || CurrentBars[7561] < 1 || CurrentBars[7562] < 1 ||CurrentBars[7563] < 1 || CurrentBars[7564] < 1 || CurrentBars[7565] < 1 ||
                        CurrentBars[7566] < 1 || CurrentBars[7567] < 1 || CurrentBars[7568] < 1 ||CurrentBars[7569] < 1 || CurrentBars[7570] < 1 || CurrentBars[7571] < 1 ||
                        CurrentBars[7572] < 1 );
                        Return;​

                        Comment


                          #13
                          Hello Benjamin,

                          Thanks for your notes.

                          How many AddDataSeries() calls do you have defined in your script in OnStateChange() when the State == State.Configure?

                          If you have three AddDataSeries() calls in your script, then your CurrentBars condition might look something like this.

                          //OnStateChange when State == State.Configure
                          else if (State == State.Configure)
                          {
                          //Add 3 additional secondary data series 1-Minute, 5-Minute, and 10-Minute
                          AddDataSeries(BarsPeriodType.Minute, 1); //BarsInProgressIndex 1
                          AddDataSeries(BarsPeriodType.Minute, 5); //BarsInProgressIndex 2
                          AddDataSeries(BarsPeriodType.Minute, 10); //BarsInProgressIndex 3
                          }​

                          //OnBarUpdate()
                          if (CurrentBars[0] < 10 || CurrentBars[1] < 10 || CurrentBars[2] < 10 || CurrentBars[3] < 10)
                          return;

                          Note that CurrentBars[0] refers to the primary series the script is running on. CurrentBars[1] refers to the first added data series in the script. CurrentBars[2] refers to the second added data series in the script. And, CurrentBars[3] would refer to the third added data series in the script.

                          Review this help guide page demonstrating a CurrentBars check: https://ninjatrader.com/support/help...urrentbars.htm

                          Make Sure You Have Enough Bars in the Data Series You Are Accessing: https://ninjatrader.com/support/help...nough_bars.htm
                          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                          Comment


                            #14
                            Brandon,

                            My trading strategy involves finding the stocks in the exchange that have risen the most in the first few minutes of trading. To do this I am trying to load all the live stock data from the NASDAQ and scan for the largest percent increases and a few other variables to pick the stocks to trade. So, there are 7572 individual ticker symbols to be loaded.

                            If there is a better way to do this please let me know.

                            Thanks,
                            Benjamin

                            Comment


                              #15
                              Hello Benjamin,

                              Thanks for your notes.

                              To clarify, you are calling AddDataSeries() 7572 times in your script to add each stock instrument to the script?

                              If so, then you would do a CurrentBars check in the script for each individual instrument that has been added to the script to ensure that you have enough bars processing for each added series being accessed within the script.

                              There would not be a simpler way to accomplish this as AddDataSeries() methods should be hardcoded and not loaded dynamically. You would need to thoroughly debug your script if you are getting any error messages to understand exactly how the logic in your script is evaluating and behaving.

                              In the previous code you shared I see there is an added ';' at the end of your CurrentBars conditions which should be removed. Also, you should call return; with a lowercase 'r', not an uppercase 'R'.

                              protected override void OnBarUpdate()
                              {
                              if (CurrentBars[0] < 1 || CurrentBars[1] < 1 || CurrentBars[2] < 1 ||CurrentBars[3] < 1 || CurrentBars[4] < 1 || CurrentBars[5] < 1 ||
                              CurrentBars[6] < 1 || CurrentBars[7] < 1 || CurrentBars[8] < 1 ||CurrentBars[9] < 1 || CurrentBars[10] < 1 || CurrentBars[11] < 1 ||
                              CurrentBars[12] < 1 || CurrentBars[13] < 1 || CurrentBars[14] < 1 ||CurrentBars[15] < 1 || CurrentBars[16] < 1 || CurrentBars[17] < 1 ||
                              ....
                              CurrentBars[7560] < 1 || CurrentBars[7561] < 1 || CurrentBars[7562] < 1 ||CurrentBars[7563] < 1 || CurrentBars[7564] < 1 || CurrentBars[7565] < 1 ||
                              CurrentBars[7566] < 1 || CurrentBars[7567] < 1 || CurrentBars[7568] < 1 ||CurrentBars[7569] < 1 || CurrentBars[7570] < 1 || CurrentBars[7571] < 1 ||
                              CurrentBars[7572] < 1 ); //remove ; from this line.
                              Return;​ //call return; with a lowercase r, not Return; with an uppercase R.


                              Below is a link to a forum post that demonstrates how to use prints to understand behavior.
                              https://ninjatrader.com/support/foru...121#post791121
                              <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              89 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              48 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              31 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              34 views
                              0 likes
                              Last Post TheRealMorford  
                              Started by Mindset, 02-28-2026, 06:16 AM
                              0 responses
                              69 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X