Dukascopy
 
 
Wiki JStore Search Login

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

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

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

Drawing chart objects via strategy
 Post subject: Drawing chart objects via strategy Post rating: 0   New post Posted: Thu 06 Feb, 2014, 18:17 

User rating: 0
Joined: Tue 18 Jun, 2013, 21:55
Posts: 14
Location: Slovakia, Nitra
Greetings,

is it possible to draw dots into charts via strategy? I read wiki, but
there are just tips how to draw horizontal, vertical lines and so on... If
yes, please could you send me the solution?

Meanwhile, I found solution, but I don't like it:

IChart chart = context.getChart(instrument);

ITextChartObject textChartObject = chart
  .getChartObjectFactory()
  .createText("bullet" + bidBar.getTime(), bidBar.getTime(), bidBar.getLow());

textChartObject.setColor(Color.BLUE);
textChartObject.setLocked(true);
textChartObject.setText("•");
textChartObject.setTooltip(Double.toString(bidBar.getLow()));
textChartObject.setVisibleInWorkspaceTree(false);

chart.add(textChartObject);


Best regards
bojno


 
 Post subject: Re: Drawing chart objects via strategy Post rating: 1   New post Posted: Fri 07 Feb, 2014, 07:31 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
This thread will maybe useful to you.


 
The Best Answer  Post subject: Re: Drawing chart objects via strategy Post rating: 1   New post Posted: Fri 07 Feb, 2014, 08:21 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
bojno wrote:
Meanwhile, I found solution, but I don't like it:
What in particular you don't like about the solution? If you need another symbol this example contains a link to other dot-like symbols:
https://www.dukascopy.com/wiki/#Chart_object_catalog/Symbol
If you wish to draw dot according to absolute, not the chart price-time coordinates, consider using the screen label:
https://www.dukascopy.com/wiki/#Chart_object_catalog/Label
hebasto wrote:
This thread will maybe useful to you.
We think that there are enough capabilities to draw the dot from a strategy, such that one does not have to involve the indicators.


 

Jump to:  

cron
  © 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