Dukascopy
 
 
Wiki JStore Search Login

JForex Chart objects "sticky" cannot be cleared from chart
 Post subject: JForex Chart objects "sticky" cannot be cleared from chart Post rating: 0   New post Posted: Tue 06 May, 2014, 17:44 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Hi, attached shows some vertical lines which were entered in the
distant past by a Strategy module. In the workspace.xml file these
are marked with an attribute "hiddenFromWorkspaceTree" value of true
and also I see a "sticky" attribute which is also true. (maybe that's
what makes it unclearable... I'm just guessing about these attributes)

Anyway, I would like to be able to use the standard Chart "clear" operation
to clear these out in the JForex platform, but they appear to be inaccessible
to the standard "clear chart" function. This removes moving averages and
other such objects, but not these vertical lines.

Is there a way to unconditionally clear them off a chart manually
through the JForex platform?

Thanks! HyperScalper

Image


Attachments:
ChartObjectsNotClearable.PNG [118.26 KiB]
Downloaded 251 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: JForex Chart objects "sticky" cannot be cleared from chart Post rating: 0   New post Posted: Tue 06 May, 2014, 17:53 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Looking back at the code which places these vertical lines, I see
that I am the one who set the flag "setVisibleInWorkspaceTree(false)"
and I also used "setLocked(true)" That must be part of the
reason they are sticky.

Oops... But instead of writing code to clear them out, it should
still be possible to use the JForex platform to eliminate them from
the charts, I think...

        IChartObjectFactory factory = chart.getChartObjectFactory();
        IVerticalLineChartObject co = factory.createVerticalLine(key, time);
        if (verticalStroke==null) {
           verticalStroke = new SolidBasicStroke(0.2f);
        }
        co.setStroke(verticalStroke);
        co.setColor(color);
        co.setText(text, font);
        co.setLocked(true); // locked
        co.setVisibleInWorkspaceTree(false); // set not visible
        chart.add(co);



 

Jump to:  

  © 1998-2025 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