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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        54 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        72 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        38 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        99 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        60 views
        0 likes
        Last Post PaulMohn  
        Working...
        X