Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SampleCustomEvents_NT8.zip and SampleLevel2Book_NT8.zip not working in NT8

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

    SampleCustomEvents_NT8.zip and SampleLevel2Book_NT8.zip not working in NT8

    Hi,

    When I add SampleCustomEvents_NT8 or SampleLevel2Book_NT8 to my chart I don't see that it do anything. I have level 2 data so I don't really understand what is wrong. Would be glad if someone else can try it and see if it work on their charts.

    Kind regards
    Derik

    #2
    Hello derikb,

    Thanks for your post.

    When importing and testing the SampleCustomEvents_NT8 and SampleLevel2Book_NT8 indicators, I am seeing them work as expected.

    The SampleCustomEvents_NT8 and SampleLevel2Book_NT8 indicators will print information to a New > NinjaScript Output window once they are applied to a Chart. For example, please see the attached screenshot demonstrating SampleLevel2Book_NT8 printing information to a NinjaScript Output window.

    If you open a NinjaScript Output window and add the SampleCustomEvents_NT8 or SampleLevel2Book_NT8 indicator to a Chart, do you see information printed in the NinjaScript Output window?

    Let us know if we may assist further.
    Attached Files
    <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


      #3
      Hi Brandon,

      Thank you for your response. I thought it must put it in the chart. How can I sum the ask at each level and the plot it in a window below my chart.

      Thank you for your help.
      Derik

      Comment


        #4
        Hello derikb,

        Thank you for your note.

        To sum the ask prices you could use the C# Sum method and save that value to a variable. Then, you could call AddPlot() to create a plot and assign the value of the summed ask prices to that plot. The code for the C# Sum method would look something like this.

        double sum = askRows.Sum(s => s.Price);

        See the attached script which is a modified version of SampleCustomEvents. This script demonstrates how you could accomplish the above.

        Also, see this help guide documentation for more information about AddPlot - https://ninjatrader.com/support/help...t8/addplot.htm

        Let us know if we may assist further.
        Attached Files
        <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


          #5
          Hi Brandon,

          Thank you. This helped me a lot.

          Kind regards
          Derik

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          81 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          41 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          64 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          66 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          54 views
          0 likes
          Last Post CarlTrading  
          Working...
          X