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

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.
      Brandon H.NinjaTrader Customer Service

      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 burtoninlondon, Today, 12:38 AM
        0 responses
        5 views
        0 likes
        Last Post burtoninlondon  
        Started by AaronKoRn, Yesterday, 09:49 PM
        0 responses
        14 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Yesterday, 08:42 PM
        0 responses
        11 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Yesterday, 07:51 PM
        0 responses
        13 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,983 views
        3 likes
        Last Post jhudas88  
        Working...
        X