Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          607 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          353 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          560 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          561 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X