Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A Min/Max error

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

    A Min/Max error

    For the first time, I am attempting to assign Close[0] and a price to two signals in an indicator to pass to a Strategy rather than just -0- or -1-. I was hoping to get an answer from the Strategy Builder as to how to solve this problem but it didn't work. Can you help me resolve this error?

    2022-04-01 07:51:35:888|3|4|Indicator 'SupportandResistanceDetection': Error on calling 'CalculateMinMax' method on bar 6032: Index was outside the bounds of the array.

    #2
    Hi galsermil, thanks for writing in. I will need to see an example script that can reproduce this. Please Export the strategy and post it here so I can have a look:


    Kind regards,
    -ChrisL

    Comment


      #3
      Chris,

      I had assumed that it would be as simple as a change in the property declaration. A message that I received while exporting says that it can only be imported to a PC where a third party vendor indicator is loaded and I seriously doubt you will have that IT indicator so I am gong to copy a typical entry from the indicator and my Property declaration.

      AddPlot(new Stroke(Brushes.Transparent, 2), PlotStyle.Bar, "SandRSignal");
      AddPlot(new Stroke(Brushes.Transparent, 2), PlotStyle.Bar, "PivotSignal");

      else if (Close[0] <= (IT_FTreset1.S2[0] + (Zone * TickSize)) && (Close[0] >= (IT_FTreset1.S2[0])))
      {
      SandRSignal[0] = Close[0];
      PivotSignal[0] = IT_FTreset1.S2[0] ;
      }
      [Browsable(false)]
      [XmlIgnore]
      public Series<double> SandRSignal
      {
      get { return Values[0]; }
      }

      [Browsable(false)]
      [XmlIgnore]
      public Series<double> PivotSignal
      {
      get { return Values[1]; }
      }
      Attached Files

      Comment


        #4
        Hi galsermil, thanks for posting that. I can not test this for myself because of the custom indicator being used, but I would have to guess the OnCalculateMinMax error is coming from one of these custom indicators. You will need to reduce the strategy, taking out one indicator at a time to see which one is throwing this error. You can also change around the parameters you are sending to each of these indicators to see if you can avoid this error. Once you find the indicator causing the issue, ask the developer what could be wrong here as they are the only ones that have the source ocde.

        Kind regards,
        -ChrisL

        Comment


          #5
          Chris,

          I can be as wrong as I can be but I believe that it is my indicator causing the error as I have used the same signals for the past two or three weeks but I was assigning values of either 1 or 0 so what has changed is the size of the value being assigned.

          Comment


            #6
            Chris,

            I have been consulting the users guide, since I have stated assigning the plot values of the Custom indicator, do I need to <AddChartIndicator().>?

            Comment


              #7
              Hi galsermil, your strategy is not overriding OnCalculateMinMax, so it's one of the custom indicators. You should reduce the strategy one indicator at a time to confirm this. If you do not want to change the original file, right-click the code>Save As>give it a new name. This will make a copy of it so you can change it without changing the original file.

              Comment


                #8
                Chris,

                Are you including the Indicator named in the error message when you say 'custom indicators' and are giving no credibility to the fact that a specific indicator is named n the error message?

                Comment


                  #9
                  Hi galsermil, I am not seeing this SupportandResistanceDetection indicator being used anywhere in the strategy or in the other OBOS indicator. Where is this being used? The good part of this is that the SupportandResistanceDetection is open source, so you can reduce this one as well. Does this same issue happen if you simply remove the use of the IT_FTreset indicator from that indicator?

                  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
                  134 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