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 Max238, Today, 01:28 AM
        1 response
        22 views
        0 likes
        Last Post CactusMan  
        Started by giulyko00, Yesterday, 12:03 PM
        2 responses
        10 views
        0 likes
        Last Post giulyko00  
        Started by r68cervera, Today, 05:29 AM
        0 responses
        4 views
        0 likes
        Last Post r68cervera  
        Started by geddyisodin, Today, 05:20 AM
        0 responses
        6 views
        0 likes
        Last Post geddyisodin  
        Started by JonesJoker, 04-22-2024, 12:23 PM
        6 responses
        38 views
        0 likes
        Last Post JonesJoker  
        Working...
        X