Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on double creation

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

    Error on double creation

    private double BollingerESupper;


    BollingerESupper = Bollinger(8,1.3,25).Upper[0]; based on series 8 array, 1.3 SD, 25 period, upper.



    Compile error "best overload method does not match.... has some invalid arguements"
    Compile error "Cannot convert to INT from Iseries Double"

    ????

    ​​​​​​​Regards and thanks


    #2
    Try BollingerESupper = Bollinger(Closes[8],1.3,25).Upper[0];

    Comment


      #3
      Hello elliot5,

      Thanks for writing in.

      This error message means that you are not using the correct arguments when calling the Bollinger() method.

      You are passing an int argument '8' in for the Bollinger() method when it calls for a Series<double> argument.

      Bollinger(ISeries<double> input, double numStdDev, int period).Upper[int barsAgo]

      As Tasker-182 said, If you would like to use the Close price 8 bars ago, you could pass in Close[8] into your Bollinger() method.

      See this help guide page for more information about the Bollinger() method and sample code: https://ninjatrader.com/support/help...nger_bands.htm

      See this help guide page for more information about Series<double> variables: https://ninjatrader.com/support/help...t8/seriest.htm

      Let me know if I may assist further.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Yes thanks that works - in the NT reference there was no indication to use the Closes text. Thanks guys for helping me understand it better.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        88 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        135 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        119 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X