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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        56 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        133 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        73 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X