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

Instrument EURUSE Default

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

    Instrument EURUSE Default

    Hi,

    I am using a graph of a cutom symbol "VOW". I have access to the bar data and I can see it on the graph. in source code when addressing the Instrument I am getting "$EURUSD Default" and not "VOW" as I should.

    any ideas to solve this issue?

    Assaf

    #2
    Hi Assaf,

    Thank you for your note.

    How are you addressing the instrument in the code?

    What type of instrument is the VOW? Forex, Future, Stock or Index?

    How did you confirm that it was defaulting to use the $EURUSD instrument instead?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi,
      I am addressing the instrument from code Instrument.MasterInstrument.Name. on the graph there is only one instrument VOW which is a Stock. I debuged the source and I can see it's using EURUSD instead.

      one more thing, in the Initialize I am add("$EURUSD...
      when debuging I can see in the BarsArray that BarsArray[0] is VOW and BarsArray[1] is EURUSD.
      thanks,

      Assaf
      Last edited by asafs; 12-05-2013, 07:45 AM.

      Comment


        #4
        Assaf,

        Could you provide me the code on how you have this setup?
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Hi,
          as I told you in the Initialize I am add("$EURUSD...
          when debuging I can see in the BarsArray that BarsArray[0] is VOW and BarsArray[1] is EURUSD.
          the code is part of a framework so it will be dificult to send you all please address my with specific questions.

          thanks Assaf

          Comment


            #6
            Instrument EURUSE Default

            Hi,
            I solved it by using BarsArray[0].Instrument.MasterInstrument.Name.
            How can BarsArray[0].Instrument != IndicatorBase.Instrument ?

            Assaf

            Comment


              #7
              Asafs,

              I'm sure if I'm following you correctly.

              BarsArray[0] will always be the primary data series that you are charting.

              Any added data series to the code will add a 1 value to the Bars index, thus adding the EURUSD to the code will give it a Bar index of 1.

              If this is not what you are seeing with the script, I will need to see the full method that you use to add the instrument and how you test for it in the code in order to assist.

              Thank you for your patience.
              Cal H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bortz, 11-06-2023, 08:04 AM
              47 responses
              1,610 views
              0 likes
              Last Post aligator  
              Started by jaybedreamin, Today, 05:56 PM
              0 responses
              9 views
              0 likes
              Last Post jaybedreamin  
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              19 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              6 views
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              16 views
              0 likes
              Last Post Javierw.ok  
              Working...
              X