Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Retrieve Orders from an indicator

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

    Retrieve Orders from an indicator

    Hello,

    I have couple of questions:
    1. I have created an indicator which is working just fine, what I want is to get the number of orders for a given price?. how can I achieve that?.

    2. I have created a strategy in the same DLL as indicator, for the first 2 times when I launched the chart, I could see both the indicator and the strategy present under their respective headers. But I did something (dont know what), my strategy is not seen in the "stratergies" window. I tried all possible things to get it back, but no success. I checked the DLL in the bin and it is latest etc. how to debug/check?. If I create a strategy from the ninjatrader UI, it is seen and working fine, but not from visual studio.
    public class CheckOrderStatus : StrategyBase

    thanks,
    Subhash

    #2
    Hello,

    Thank you for the post.

    For your first item, if you are referring to the order book you could see the following example:


    This would allow you to access the levels of order data similar to the level 2 window.

    Regarding the second item, I am not certain I understand the process you followed. Are you saying that you created a DLL using Visual studio and it is not working when referenced?

    I look forward to being of further assistance.

    Comment


      #3
      Thanks

      Thanks for the response.

      #2 I have the strategy working. basically I had to extend the class from StrategyRenderBase

      Comment


        #4
        OnMarketData not called

        Hello Jesse,
        I followed your example in the link you provided. which works perfectly fine in the market replay data. how ever on the live feed, this method is not at all called.
        -Subhash

        Comment


          #5
          Hello,

          Thank you for the reply.

          When you say the method is not called, what portion of the logic are you referring to?

          The sample does have a condition and is generally intended for just being an example. if the
          Code:
          if (CrossAbove(Close, SMA(5), 1))
          has not become true, you would not see any output.

          Have you implemented the logic from the sample in your script in your own way or just copied the same logic into your script? If you had copied and pasted you may just be seeing the condition not becoming true, you could remove the condition to allow the prints to occur on every bar.

          Otherwise, I would likely suggest adding in Prints to see what portion of the logic is failing to understand better what is happening.

          I look forward to being of further assistance.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          607 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          353 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          560 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          561 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X