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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          132 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          74 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          117 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          112 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          89 views
          0 likes
          Last Post CarlTrading  
          Working...
          X