Jump to content
Software FX Community

Exception when addressing Axis property of RSI component


Recommended Posts

I try to set the max and min properties of a relative strength index indicator Axis with the following piece of code: 


RelativeStrengthIndex RelativeStrengthIndex = new SoftwareFX.ChartFX.Financial.Server.RelativeStrengthIndex();RelativeStrengthIndex.Visible = true;


financial1.Gallery.Analytical.Palette = "Financial.Market";

RelativeStrengthIndex.Periods = 70;

RelativeStrengthIndex.Axis.Max = 100; // This is where the exception is thrown

RelativeStrengthIndex.Axis.Min = 0;

RelativeStrengthIndex.Axis.Gridlines = true;

RelativeStrengthIndex.Axis.Visible =

true;chart.Panes[RelativeStrengthIndex.Axis.Pane].Title.Text = "RSI";

chart.Panes[RelativeStrengthIndex.Axis.Pane].Title.Font =

new System.Drawing.Font("Verdana", 7, System.Drawing.FontStyle.Regular);


Unfortunately I get a nasty exception:

System.IndexOutOfRangeException was unhandled by user code  Message="Index was outside the bounds of the array."  Source="ChartFX.Internet"  StackTrace: at SoftwareFX.ChartFX.Internet.Server.AxisCollection.GH(Int32 1QF) at SoftwareFX.ChartFX.Internet.Server.SeriesAttributes.set_YAxis(YAxis value) at SoftwareFX.ChartFX.Financial.Server.StudySeriesCollection.3D(YAxis WA) at SoftwareFX.ChartFX.Financial.Server.Study.get_Axis() at Beurs.ChartServer.ChartCreator.CreateType7() in E:\Dev\QuoteWeb2\Beurs.ChartServer\ChartCreator.cs:line 270 at Beurs.ChartServer.ChartCreator.Create(Int32 chartType) in E:\Dev\QuoteWeb2\Beurs.ChartServer\ChartCreator.cs:line 63 at Beurs.ChartServer.chart.ProcessRequest(HttpContext context) in E:\Dev\QuoteWeb2\Beurs.ChartServer\chart.ashx.cs:line 53 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  InnerException:

Anyone knows how to deal with this?

Appreciate your help.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...