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 r68cervera, Today, 05:29 AM
          0 responses
          2 views
          0 likes
          Last Post r68cervera  
          Started by geddyisodin, Today, 05:20 AM
          0 responses
          3 views
          0 likes
          Last Post geddyisodin  
          Started by JonesJoker, 04-22-2024, 12:23 PM
          6 responses
          34 views
          0 likes
          Last Post JonesJoker  
          Started by GussJ, 03-04-2020, 03:11 PM
          12 responses
          3,239 views
          0 likes
          Last Post Leafcutter  
          Started by AveryFlynn, Today, 04:57 AM
          0 responses
          6 views
          0 likes
          Last Post AveryFlynn  
          Working...
          X