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

Call Function Every change of market depth

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

    Call Function Every change of market depth

    Dear friend......http://clip2net.com/s/6PdHOp
    like in the screenshot....I looking for a way to execute a function everytime onmarketdepth() is called. I have also brutally added some strings in OnMarketDepth() function but It doesn't run well ( some printf and some basically operation).

    Many thanks

    #2
    Hello ketron82,

    You may want to add a check to see if there is a "Operation.Update" event or a change in the price of the Market Depth Level to only call your function/calculations when this happens to minimize the calculations your Indicator is doing.

    Here is a list of the MarketDepthEventArgs you may check for.
    JCNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_JC View Post
      Hello ketron82,

      You may want to add a check to see if there is a "Operation.Update" event or a change in the price of the Market Depth Level to only call your function/calculations when this happens to minimize the calculations your Indicator is doing.

      Here is a list of the MarketDepthEventArgs you may check for.
      http://www.ninjatrader.com/support/h...heventargs.htm
      ok tnx...yes ...resolved...I used my function into the iff the example
      Many thanks

      Comment


        #4
        Last question

        I need to do (long/long)=float or double but it doesn't working. How can I do?

        Comment


          #5
          Hello ketron82,

          Are you getting an error message? Or are you getting a value that you do not expect?
          JCNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Barry Milan, Yesterday, 10:35 PM
          5 responses
          16 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          13 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          12 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          8 views
          0 likes
          Last Post nandhumca  
          Working...
          X