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 Waxavi, Today, 02:10 AM
          0 responses
          3 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by TradeForge, Today, 02:09 AM
          0 responses
          8 views
          0 likes
          Last Post TradeForge  
          Started by Waxavi, Today, 02:00 AM
          0 responses
          2 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by elirion, Today, 01:36 AM
          0 responses
          4 views
          0 likes
          Last Post elirion
          by elirion
           
          Started by gentlebenthebear, Today, 01:30 AM
          0 responses
          4 views
          0 likes
          Last Post gentlebenthebear  
          Working...
          X