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 kaywai, 09-01-2023, 08:44 PM
          5 responses
          601 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          22 views
          0 likes
          Last Post xiinteractive  
          Started by Pattontje, Yesterday, 02:10 PM
          2 responses
          18 views
          0 likes
          Last Post Pattontje  
          Started by flybuzz, 04-21-2024, 04:07 PM
          17 responses
          230 views
          0 likes
          Last Post TradingLoss  
          Started by agclub, 04-21-2024, 08:57 PM
          3 responses
          17 views
          0 likes
          Last Post TradingLoss  
          Working...
          X