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

2nd instrument.fullname?

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

    #16
    Originally posted by Radical View Post
    I didn't know about that , very useful!

    To Steve R: Right click within the Ninjascript editor window, and you'll see it.
    lol Oh shoot, WITHIN the editor window, OK

    I ended up Copy>>Paste-copy>>Rename the .CS file, and then I had to edit one line of code...

    CS file found in ...Bin>>Custom>>Indicator folder..

    Evidently I do things the hard way.

    Either way it's already well on its way and will be a much better piece of code when she's done.

    Many thanks to Kevin Doren for making the Spread() indicator in the first place. He saved me an eternity of time. Now I'm gonna butcher it good for him.
    Last edited by Steve R; 08-02-2012, 09:16 PM.

    Comment


      #17
      Originally posted by Steve R View Post
      ...
      It's like I said before, Inst#1 and Inst#2 are the primary and secondary data series of the chart. (Multi-instrument chart I think you guys call it?)
      I think I begin to understand, and it means that you are not doing what you think you are doing, unfortunately. You have to understand the OO paradigm, and how NT fits it into its framework.

      Indicators/Strategies are separate objects from the Chart object. However, the NT framework is written so that when you apply an indicator or strategy onto a chart, the chart instrument is made available to the indicator. You have to remember that this is a primary instrument flow though only. You cannot access the instrument on another chart with an indicator on the primary chart. So having that secondary instrument on a chart is apropos of nothing. If you want an indicator/strategy to access multiple instruments, you must explicitly use the Add() syntax to load that second instrument into the indicator or strategy.

      When you call an indicator from another one, you must explicitly pass it its properties as parameters. Those parameters cannot be read from another chart: they must be explicitly related to the property needed. IOW, they must be stated. So I find it hard to understand what you mean when you say: "... Inst#1 and Inst#2 are the primary and secondary data series of the chart. " There is only one instrument that belongs to a chart, the so-called primary instrument that is loaded. The chart is not the indicator: the chart does not have a secondary instrument; the indicator may have multiple instruments.

      Comment


        #18
        Originally posted by koganam View Post
        I think I begin to understand, and it means that you are not doing what you think you are doing, unfortunately. You have to understand the OO paradigm, and how NT fits it into its framework.

        Indicators/Strategies are separate objects from the Chart object. However, the NT framework is written so that when you apply an indicator or strategy onto a chart, the chart instrument is made available to the indicator. You have to remember that this is a primary instrument flow though only. You cannot access the instrument on another chart with an indicator on the primary chart. So having that secondary instrument on a chart is apropos of nothing. If you want an indicator/strategy to access multiple instruments, you must explicitly use the Add() syntax to load that second instrument into the indicator or strategy.

        When you call an indicator from another one, you must explicitly pass it its properties as parameters. Those parameters cannot be read from another chart: they must be explicitly related to the property needed. IOW, they must be stated. So I find it hard to understand what you mean when you say: "... Inst#1 and Inst#2 are the primary and secondary data series of the chart. " There is only one instrument that belongs to a chart, the so-called primary instrument that is loaded. The chart is not the indicator: the chart does not have a secondary instrument; the indicator may have multiple instruments.
        yeah, no kidding. ya figure that's why I'm here asking questions maybe? lol

        Matthew gave me the answer 6 hours ago. I'm looking for another passage-way to freedom that I might be able to navigate.
        Last edited by Steve R; 08-02-2012, 10:09 PM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,404 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        159 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X