Jump to content
Software FX Community

FinancialCharts and FinancialChartsClass


User (Legacy)
 Share

Recommended Posts

In design time I added finanial chart to my chart so, what is the difference between saying

Dim fExt As CfxFE_COM.FinancialCharts

fExt = AxChartFX1.GetExtension("CfxFE.Financial") then use fExt object in my code

and saying

Dim fExt As CfxFE_COM.FinancialChartsClass = New CfxFE_COM.FinancialChartsClass()

AxChartFX1.AddExtension(fExt) then use fExt Object

In other words, what is the difference bet' FinancialCharts and FinancialChartsClass

Regards

Link to comment
Share on other sites

Can u give me more information please 

for example, I created an object (fExt1) from FinancialChartsClass and another object (fExt2) from FinancialCharts

Then Why there is a difference in volume SHAPE when I say

fExt1.Volume.Visibile = true or say

fExt2.Volume.Visibile = true

Regards

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:Ftb#luL9DHA.200@webserver3.softwarefx.com...

FinancialChartsClass is the co-class. The class needed to CREATE a new instance.

FinancialCharts is the interface.

There is no practical difference, is just COM stuff.

--

FP

Software FX

Link to comment
Share on other sites

No difference.

However, you can not do both.

If you already added the extension at design time, and then you do:

Dim fExt As CfxFE_COM.FinancialChartsClass = New CfxFE_COM.FinancialChartsClass()

AxChartFX1.AddExtension(fExt)

You are adding TWO (2) Financial Extensions to the chart which is wrong.

So , either you add the extension at design time and then in your code retrive the pointer by calling GetExtension OR you do the code above. But you NEVER do both.

--

FP

Software FX

Link to comment
Share on other sites

Actually I added finanial Extentions in design time and in runtime

I had to do that for my chart to works well, where I added one in design time then code using the other created in runtime

because If I used the extention created in design time only, no data appears in the chart

If I didn't add the extention in design time and use only that created in runtime, the chart is drown but in wrong values

So what is my mistake?

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:LBCdXLX9DHA.196@webserver3.softwarefx.com...

No difference.

However, you can not do both.

If you already added the extension at design time, and then you do:

Dim fExt As CfxFE_COM.FinancialChartsClass = New CfxFE_COM.FinancialChartsClass()

AxChartFX1.AddExtension(fExt)

You are adding TWO (2) Financial Extensions to the chart which is wrong.

So , either you add the extension at design time and then in your code retrive the pointer by calling GetExtension OR you do the code above. But you NEVER do both.

--

FP

Software FX

Link to comment
Share on other sites

You CAN NOT add two financial extensions to one chart.

If you added the extension at design time YOU CAN NOT create another one.

If you added the extension at design time you must do:

fExt = AxChartFX1.GetExtension("CfxFE.Financial")

NEVER do:

Dim fExt As CfxFE_COM.FinancialChartsClass = New CfxFE_COM.FinancialChartsClass()

AxChartFX1.AddExtension(fExt)

> because If I used the extention created in design time only, no data appears in the chart

What do you mean by this ? no data ? what shows in the chart ?

--

FP

Software FX

Link to comment
Share on other sites

I mean all values are zero, and this is not true, and I don't know why!!

Bellow is my function that drows the online chart that drows only 2 values, volume and price

NOTE: I added the finanial extension at design time also (I got that this is wrong but I had to do that as I told u, so I ask to avoid this)

Hope u can help me

thanks

Private Sub drowOnline()

AxChartFX1.Type = AxChartFX1.Type Or CfxType.CT_EVENSPACING

AxChartFX1.TypeEx = AxChartFX1.TypeEx Or CfxTypeEx.CTE_SMOOTH Or CfxTypeEx.CTE_NOLEGINVALIDATE

AxChartFX1.TypeMask = AxChartFX1.TypeMask Or CfxType.CT_EVENSPACING

AxChartFX1.RealTimeStyle = 1 Or 2

ds = ws.getdailyData("1778026")

''Dim fExt As CfxFE_COM.FinancialCharts

''fExt = AxChartFX1.GetExtension("CfxFE.Financial")

Dim fExt As CfxFE_COM.FinancialChartsClass = New CfxFE_COM.FinancialChartsClass()

AxChartFX1.AddExtension(fExt)

Dim nCOD As CfxCod

Dim j As Integer

If (ds.Tables(0).Rows.Count > 0) Then

For j = 0 To ds.Tables(0).Rows.Count - 1

nCOD = CfxCod.COD_VALUES Or CfxCod.COD_REALTIMESCROLL

AxChartFX1.OpenDataEx(CfxCod.COD_VALUES Or CfxCod.COD_ADDPOINTS, 5, 1)

AxChartFX1.set_ValueEx(2, 0, ds.Tables(0).Rows(j)("PRICE"))

AxChartFX1.set_ValueEx(4, 0, ds.Tables(0).Rows(j)("VOLUME")) 'Quan

nCOD = nCOD Or CfxCod.COD_SCROLLLEGEND

AxChartFX1.set_Legend(nOffset, ds.Tables(0).Rows(j)("TIME").ToString().Split(" ")(1))

AxChartFX1.CloseData(nCOD)

nOffset = nOffset + 1

Next

AxChartFX1.Gallery = fExt.GalleryType(CfxFE_COM.cfxfeFinancialGallery.CHART_ANALYTICAL)

AxChartFX1.set_ItemWidth(CfxItem.CI_LOOPPOS, 3)

AxChartFX1.Axis(CfxAxisIndex.AXIS_X).SetScrollView(0, 200)

AxChartFX1.Series(2).Color = Convert.ToUInt32(ColorTranslator.ToOle(Color.MediumVioletRed))

fExt.PriceDisplay = CfxFE_COM.cfxfePriceDisplay.CLOSE_PRICE

fExt.VOLUME.Visible = True

fExt.BollingerBand.Visible = True

fExt.SimpleMA50.Visible = True

fExt.VOLUME.SpaceGap = 8

Dim k As Integer

For k = 0 To AxChartFX1.Series.Count - 1

AxChartFX1.Series(k).Visible = False

Next

AxChartFX1.Series(2).Visible = True

AxChartFX1.Series(4).Visible = True

End If

End Sub

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:iv6BjWm9DHA.2804@webserver3.softwarefx.com...

You CAN NOT add two financial extensions to one chart.

If you added the extension at design time YOU CAN NOT create another one.

If you added the extension at design time you must do:

fExt = AxChartFX1.GetExtension("CfxFE.Financial")

NEVER do:

Dim fExt As CfxFE_COM.FinancialChartsClass = New CfxFE_COM.FinancialChartsClass()

AxChartFX1.AddExtension(fExt)

> because If I used the extention created in design time only, no data appears in the chart

What do you mean by this ? no data ? what shows in the chart ?

--

FP

Software FX

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.

Guest
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.

 Share

×
×
  • Create New...