Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Indicator error

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

    Custom Indicator error

    Trying to create an indicator by using one of the custom indicator. But, getting this error:

    Indicator 'QMomentum': Error on calling 'OnBarUpdate' method on bar 30: .IsValidDataPoint cannot be used on a series running with MaximumBarsLookBack.TwoHundredFiftySix.

    Attached is the code snippet of the indicator. Any idea what might be missing?

    Appreciate any help.​
    Attached Files

    #2
    Hello ark321,

    in this case the error is in the QMomentum indicator and not your custom indicator. Is that something you have the source code for?

    Essentially the QMomentum has a line of code like the following: \

    myDoubleSeries = new Series<double>(this, MaximumBarsLookBack.TwoHundredFiftySix);

    and instead needs to be

    myDoubleSeries = new Series<double>(this, MaximumBarsLookBack.Infinite);

    Comment


      #3
      No, dont have the source code.But the same logic works when I create a strategy using QMomentum indicator

      Comment


        #4
        Hello ark321,

        Unfortunately you would have to contact the creator of that indicator to have that code changed. However the indicator is being used while you are using it in your indicator is making its logic use IsValidDataPoint which is something the developer of that indicator has added into its code. In order to use that method with a series that series needs to be defined correctly, the error specified that the series was not made correctly for use with IsValidDataPoint.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        47 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        23 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        33 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        51 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Working...
        X