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.

 Post subject: PRINT Post rating: 0   New post Posted: Mon 06 Apr, 2020, 14:36 

User rating: 0
Joined: Fri 31 May, 2013, 21:20
Posts: 14
Location: Syrian Arab RepublicSyrian Arab Republic

How can I convert this line , so the text can be printed on the CHART instead of Messages

print("print me on the chart pls");


 Post subject: Re: PRINT Post rating: 0   New post Posted: Tue 07 Apr, 2020, 01:34 

User rating: 17
Joined: Thu 20 Apr, 2017, 22:42
Posts: 153
Location: Russian Federation,
import java.awt.*;
import java.util.*;

import com.dukascopy.api.*;
import com.dukascopy.api.drawings.*;

public class DemoStrategy implements IStrategy {
    public void onStart(IContext context) throws JFException {
        IChart chart = context.getLastActiveChart();
        IChartObjectFactory cf = chart.getChartObjectFactory();

        IScreenLabelChartObject staticLabel = cf.createScreenLabel("my-static-label");
        staticLabel.setText("static - print me on the chart pls");

        ILabelChartObject timedLabel = cf.createLabel("my-timed-label");
        timedLabel.setText("timed - print me on the chart pls");
        timedLabel.setTime(0, System.currentTimeMillis());
        timedLabel.setPrice(0, (chart.getMaxPrice() + chart.getMinPrice()) / 2);


Jump to:  

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