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

Beginner Indicator Problem

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

    Beginner Indicator Problem

    I cannot find the problem with this indicator - I was literally following someone doing a webinar and for the life cannot see what is wrong.

    error - "Cannot implicitly convert type 'double' to 'NinjaTrader.Data.DataSeries' Line 95

    Can someone please help me out. Now when I create another separate Indicator - and try to compile - it gives me the same error and references the above indicator.

    Any help would be appreciated I have attached the indicator.

    Thanks,
    Attached Files

    #2
    Hi scott,

    The compile error is caused by this section:
    Code:
    [Browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
    [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
    public DataSeries Signal
    {
    get { return _signal[0]; }
    }
    I don't see anywhere in your code you use this DataSeries Signal, so you can delete all of the above section and it will likely compile and work.

    The structure for that section of code would be needed if you wanted to expose the value of _signal from another indicator, using the public Signal that's linked to it. If you want to maintain this functionality, try with this change:

    Code:
    [Browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
    [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
    public DataSeries Signal
    {
    get { return _signal; }
    }
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan - figured it out - thank you that was it.
      Last edited by scott__; 02-24-2012, 02:47 PM.

      Comment


        #4
        What should I be looking for? For help resolving your compile errors, please see my last reply for two different approaches.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          sorry - my lack of understanding at this point lead to the response. I made the change you recommended and all is good

          Thanks again

          Comment


            #6
            Great that took care of it. Thanks for updating us!
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by JTizz, Today, 03:32 PM
            1 response
            35 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by ebaydan777, Today, 02:41 PM
            1 response
            28 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by aligator, Today, 02:28 PM
            1 response
            27 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by daniel_weber8, Today, 01:21 PM
            1 response
            45 views
            0 likes
            Last Post NinjaTrader_ChristopherS  
            Started by jungsoohuh, Today, 12:07 PM
            1 response
            37 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Working...
            X