API Support Forum
OEC API > API Support > Where do I ask questions about the Custom Indicator API?
Author Topic: Where do I ask questions about the Custom Indicator API?
(3 messages, Page 1 of 1)
Moderators: VPfau
SThompson30
Posts: 20
Joined: Jan 09, 2008


Posted: Sep 06, 2009 @ 11:04 PM             Msg. 1 of 3
I have some questions about the C# Custom Indicators. Where should I ask those?

For example, how can I set the Text Font AND SIZE when creating a Text label in the calculate method, like
this:

Value1 = ((Double)(DrawingObjects.Text.New(((Double)(Date)), ((Double)(Time)), Open, "Hello")));

I cannot find a Font property in the API docs. :-) And EL doesn't seem to have on either. So my indicator labels are tiny and I haven't found any chart profile properties that affect them... maybe they are there... but I haven't figured it out.

Thanks,

-Scott
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Sep 08, 2009 @ 04:37 PM             Msg. 2 of 3
Please try to use the next:

int txtid = DrawingObjects.Text.New(Date, Time, Open, "Hello");

DrawingTools.CAText textObj = DrawingObjects.Find<DrawingTools.CAText>(txtid);

textObj.Font = new System.Drawing.Font("Microsoft Sans Serif", 11);
SThompson30
Posts: 20
Joined: Jan 09, 2008


Posted: Sep 09, 2009 @ 02:13 AM             Msg. 3 of 3
Thanks Victor! That worked just fine.

My next question is... what is the way to tell whether the bars are 'second' bars versus minute bars? I did a complicated thing where I looked at the Timestamps, but I am pretty sure that is not the best way. I know about BarInterval and BarType, but is there a way to see the BarUnit? I just don't know C# that well, and the API docs, well... you know... :-)

Thanks again!

-Scott