Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

IScreenLabelChartObject bug when created from a Strategy
 Post subject: IScreenLabelChartObject bug when created from a Strategy Post rating: 0   New post Posted: Sun 25 Feb, 2018, 14:04 
User avatar

User rating: 0
Joined: Mon 07 Jan, 2013, 23:30
Posts: 19
Location: Ukraine, Odessa
When I try to create a IScreenLabelChartObject from a Strategy this object appears only in the workspace tree but not on the screen.
When plotting a ScreenLabel manually by selecting from drawings - everything is ok.

Also it's impossible to open the "Edit Label" stage from context menu for this object in workspace tree. It's simply doesn't reacts on a command.
It's doesn't get a new text when I set it by .setText() method.
I've already tried almost all methods it has (.move(), setxDistance(), setyDistance(), .setMenuEnabled() etc.).

Here is some code:

public void onStart(IContext context) throws JFException {

IChart chart= context.getChart(Instrument.EURUSD);

IScreenLabelChartObject screenLabelChartObject;
screenLabelChartObject = chart.getChartObjectFactory().createScreenLabel("12345");
screenLabelChartObject.setMenuEnabled(true);
screenLabelChartObject.setVisibleInWorkspaceTree(true);
screenLabelChartObject.setText("text12345");
screenLabelChartObject.setColor(Color.white);

screenLabelChartObject.setMenuEnabled(true);
chart.add(screenLabelChartObject);

context.stop();

}

Image


Attachments:
screenlabel.png [236.18 KiB]
Downloaded 292 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: IScreenLabelChartObject bug when created from a Strategy Post rating: 0   New post Posted: Thu 01 Mar, 2018, 13:13 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Fixed and will be available in next release.


 
 Post subject: Re: IScreenLabelChartObject bug when created from a Strategy Post rating: 0   New post Posted: Mon 05 Mar, 2018, 07:36 
User avatar

User rating: 0
Joined: Mon 07 Jan, 2013, 23:30
Posts: 19
Location: Ukraine, Odessa
Thanks a lot!


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com