Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help : Indicator does not display

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

    Help : Indicator does not display

    My indicator does not plot anything.
    I have checked the log file and got the following message error :
    "Error on plotting indicator "xx": please check the OnBarUpdate() method or the Plot() method : out of bound issue"

    Tried to find where it comes from without success

    Here is the code :

    #region Variables
    // Wizard generated variables
    privateint period = 10; // Default setting for Period
    // User defined variables (add any user defined variables below)
    private DataSeries Value1;
    privatedouble MyVal =0.0;
    private DataSeries Value2;
    private DataSeries Value3;
    #endregion

    protectedoverridevoid Initialize()
    {
    Add(
    new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
    CalculateOnBarClose =
    true;
    Overlay =
    false;
    PriceTypeSupported =
    false;
    Value1=
    new DataSeries(this);
    Value2=
    new DataSeries(this);
    Value3=
    new DataSeries(this);
    }

    protectedoverridevoid OnBarUpdate()
    {


    if (CurrentBar >= 40)
    {
    Value1.Set(TEMA(Input,period)[
    0]);
    Value3.Set(Math.Log(Value1[
    0]));

    for (int n = 1; n<41 ; n++)
    {
    MyVal=MyVal+LinRegSlopeSFX(Value3,
    false,n,0)[0]*Math.Sqrt(n);
    }
    }
    Value2.Set(MyVal*
    100);
    MyVal=
    0;
    Plot0.Set(Value2[
    0]);
    }




    #2
    Originally posted by kuroro13 View Post
    My indicator does not plot anything.
    I have checked the log file and got the following message error :
    "Error on plotting indicator "xx": please check the OnBarUpdate() method or the Plot() method : out of bound issue"

    Tried to find where it comes from without success

    Here is the code :

    #region Variables
    // Wizard generated variables
    privateint period = 10; // Default setting for Period
    // User defined variables (add any user defined variables below)
    private DataSeries Value1;
    privatedouble MyVal =0.0;
    private DataSeries Value2;
    private DataSeries Value3;
    #endregion

    protectedoverridevoid Initialize()
    {
    Add(
    new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
    CalculateOnBarClose =
    true;
    Overlay =
    false;
    PriceTypeSupported =
    false;
    Value1=
    new DataSeries(this);
    Value2=
    new DataSeries(this);
    Value3=
    new DataSeries(this);
    }

    protectedoverridevoid OnBarUpdate()
    {


    if (CurrentBar >= 40)
    {
    Value1.Set(TEMA(Input,period)[
    0]);
    Value3.Set(Math.Log(Value1[
    0]));

    for (int n = 1; n<41 ; n++)
    {
    MyVal=MyVal+LinRegSlopeSFX(Value3,
    false,n,0)[0]*Math.Sqrt(n);
    }
    }
    Value2.Set(MyVal*
    100);
    MyVal=
    0;
    Plot0.Set(Value2[
    0]);
    }




    Value3.Set(Math.Log(Value1[0]));

    You might want to check Value1[0] for zero value

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    578 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X