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

Please help error cs1502

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

    Please help error cs1502

    Please help to understand, tried to write a indicator delta spread on the basis of spread indicator and that's what produces the program

    "Most suitable overloaded method for 'NinjaTrader.Indicator.Indicator.S(int, double, string, double, string)' has some invalid arguments"
    "Argument '4': type conversion from 'string' to 'double' cannot" and indicates "Third_instr"
    "Argument '5': conversion from 'double' to 'string' cannot" indicates "Sharpness"
    Last edited by Papercut110; 08-12-2016, 09:47 PM.

    #2
    Hello Papercut110,

    Thank you for writing in.

    It looks like the indicator, S, that you're calling is asking for int, double, string, double, string arguments, in that order.

    Your two calls to S, however, are passing Direction, K, Second_instr, Third_instr, Sharpness. Direction is an int, K is a double, Second_instr is a string, Third_instr is a string, and Sharpness is a double.

    You'll need to ensure that you're passing the arguments in the order stated above (int, double, string, double, string).
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      I'm sorry, I'm weak in programming
      Last edited by Papercut110; 08-12-2016, 09:48 PM.

      Comment


        #4
        Hello Papercut110,

        You will not need to modify the S indicator.

        You will only need to modify the ordering of the arguments you have passed to S from the SP indicator.

        S's indicator method is asking for the arguments to be passed in this order: int, double, string, double, string

        Ensure you are passing your variables from SP to S in that order.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          NinjaTrader_ZacharyG, you're the best, forever grateful! it worked!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Graci117, Today, 09:02 PM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by ETFVoyageur, Today, 07:55 PM
          0 responses
          7 views
          0 likes
          Last Post ETFVoyageur  
          Started by janio973, Today, 07:24 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by aligator, 01-06-2022, 12:14 PM
          4 responses
          246 views
          0 likes
          Last Post john_44573  
          Started by reynoldsn, Today, 05:56 PM
          0 responses
          14 views
          0 likes
          Last Post reynoldsn  
          Working...
          X