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

indicators with @ in the front

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

    indicators with @ in the front

    I saw a code on this forum SampleGetHighLowByTimeRange.cs which uses two other indicators @MIN.cs and @MAX.cs.

    (1) Why does an indicator code have a "@" in front of the name? Does the "@" indicate that it is meant to be callable from another code?

    (2) If yes, then how does the a code X that calls an indicator in code Y, know within its code that it needs to use an external file code Y to read that indicator?

    #2
    Hello uday12,

    Thank you for writing in.

    The @ sign in front of the name simply means that this is a system indicator that was included with NinjaTrader.

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      1. I think it is similar to an include statement, or treating that script as a function that is called and returning a value.

      2. I think when ninjatrader starts up, all indicator script file class names are loaded or registered into it's memory, so when it makes a call to Max or Min, it if can't find it in it's memory, it throws an error.

      Comment


        #4
        Originally posted by balltrader View Post
        1. I think it is similar to an include statement, or treating that script as a function that is called and returning a value.

        2. I think when ninjatrader starts up, all indicator script file class names are loaded or registered into it's memory, so when it makes a call to Max or Min, it if can't find it in it's memory, it throws an error.
        Suppose I create two indicators IND1 and IND2, and I save IND1 as @IND1. Then can I call IND1 within the IND2 code, or do I need to do anything special?

        Comment


          #5
          Hello uday12,

          You do not need an @ in front of the indicator's file name in order to call the indicator from another indicator.

          The @ only signifies that the indicator is an indicator included with NInjaTrader by default.
          Zachary G.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by AttiM, 02-14-2024, 05:20 PM
          9 responses
          174 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by funk10101, Today, 08:14 AM
          0 responses
          1 view
          0 likes
          Last Post funk10101  
          Started by adeelshahzad, Today, 03:54 AM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by RookieTrader, Today, 07:41 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by kujista, Today, 05:44 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X