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.

How to automatically open a plot?
 Post subject: How to automatically open a plot? Post rating: 0   New post Posted: Sat 08 Feb, 2014, 00:18 

User rating: 0
Joined: Sat 08 Feb, 2014, 00:11
Posts: 1
Location: Germany,
Dear all,

I am new in here and have a stupid question concerning the following stupid code :D :

package jforex;

import java.util.*;

import com.dukascopy.api.*;

public class simple_outputs1 implements IStrategy {
    private IEngine engine;
    private IConsole console;
    private IHistory history;
    private IContext context;
    private IIndicators indicators;
    private IUserInterface userInterface;
   
    public void onStart(IContext context) throws JFException {
        this.engine = context.getEngine();
        this.console = context.getConsole();
        this.history = context.getHistory();
        this.context = context;
        this.indicators = context.getIndicators();
        this.userInterface = context.getUserInterface();
        console.getOut().println("simple_outputs1 is started!!   :-)");
         
         IFeedDescriptor feedDescriptor = new TicksFeedDescriptor(Instrument.EURUSD);
         IChart openChart(IFeedDescriptor feedDescriptor);
         
    }

    public void onAccount(IAccount account) throws JFException {
    }

    public void onMessage(IMessage message) throws JFException {
    }

    public void onStop() throws JFException {
        console.getOut().println("simple_outputs1 is closed!!   :-)");
    }

    public void onTick(Instrument instrument, ITick tick) throws JFException {
    }
   
    public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
    }
}


Why does this not open the EUR-USD chart?
I would like to learn and understand...

Thank you!


 
 Post subject: Re: How to automatically open a plot? Post rating: 0   New post Posted: Fri 14 Feb, 2014, 10:14 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
first of all the code does not compile, here is an example how to do this:
https://www.dukascopy.com/wiki/#Chart_Operations/Open/Close_chart


 

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