Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing an indicator plot value

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

    Accessing an indicator plot value

    I want to build a strategy which reads a plot value from a custom indicator. I have no source for the indicator. Besides plotting, the value also shows in the data box.

    I have looked but cannot find an example.

    #2
    Hello,

    If you can see the plot you can likely access the plot by its name from a strategy. A simple example is how the Bollinger indicator works, you can use this as a source example of how to expose values as well.

    In a strategy to access the Lower plot of the Bollinger you would use the following syntax:

    Code:
    Bollinger(2,12).Lower[0]
    This is likely the same with the custom indicator, look at the plot name and the indicator name. In the NinjaScript editor type the indicator name:

    Code:
    Bollinger(
    When you press the Open parenthesis it should prompt you on what is required, fill in the parameters and close the parenthesis )

    Code:
    Bollinger(2,12)
    Now type a period and the Plot name followed by a [0] to access the Current bars value.:

    Code:
    Bollinger(2,12).Lower[0]
    Try this and let me know if this does not work.

    I look forward to being of further assistance.

    Comment


      #3
      Your example worked as expected.

      However, the actual indicator has 20 arguments and I have been unable to figure out what should be entered. I do get some very interesting syntax errors.

      All I have to work with is the parameter specification at the top of a chart, and the values in the indicator window. The indicator itself is encrypted by the vendor and not available to me.

      Alternatively, the value I want is displayed in the data box, and If I could just read its value

      Comment


        #4
        Hello ninjaGeorge,

        Jesse has provided the officially supported way that you would go about this. For your specific scenario I would recommend contacting the vendor directly and asking them if the variable you are looking to use is exposed or not and if it is, what its' name is so you can access it via code.

        We do not have enough information on our end to investigate further unfortunately.

        Please let me know if you have any questions.
        Michael M.NinjaTrader Quality Assurance

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        72 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        39 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X