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 I can implement renko feedData?
 Post subject: How I can implement renko feedData? Post rating: 0   New post Posted: Mon 30 Jun, 2014, 15:18 

User rating: 0
Joined: Mon 31 Mar, 2014, 16:50
Posts: 21
Location: Italy, San Severino Marche MC
Can you tell me how I can implement renko feedData?

Thank you.

......
import com.dukascopy.api.feed.IRenkoBarFeedListener;

@SuppressWarnings("deprecation")
public class RenkoTest1 implements IStrategy, IFeedListener, IRenkoBarFeedListener
{
@Configurable("")
public IFeedDescriptor renkoFeedDescriptor = new RenkoFeedDescriptor(Instrument.EURJPY, PriceRange.valueOf(3), OfferSide.ASK); //default renko session is 1min, creation point = close
private IConsole console;

public void onStart(IContext context) throws JFException
{
this.console = context.getConsole();
context.setSubscribedInstruments(java.util.Collections.singleton(renkoFeedDescriptor.getInstrument()), true);
context.subscribeToFeed(renkoFeedDescriptor, this);
context.subscribeToRenkoBarFeed(renkoFeedDescriptor.getInstrument(), renkoFeedDescriptor.getOfferSide(), renkoFeedDescriptor.getPriceRange(), this);
........


Log:
30/06/2014 14:12:11 1. ERROR in /tmp/jfxide/tmp/compile/RenkoTest1.java (at line 34)
30/06/2014 14:12:11 context.subscribeToRenkoBarFeed(renkoFeedDescriptor.getInstrument(), renkoFeedDescriptor.getOfferSide(), renkoFeedDescriptor.getPriceRange(), this);
30/06/2014 14:12:11 ^^^^^^^^^^^^^^^^^^^^^^^
30/06/2014 14:12:11 The method subscribeToRenkoBarFeed(Instrument, OfferSide, PriceRange, IRenkoBarFeedListener) in the type IContext is not applicable for the arguments (Instrument, OfferSide, PriceRange, RenkoTest1)
30/06/2014 14:12:11 ----------
30/06/2014 14:12:10 Compiling RenkoTest1.java


 
 Post subject: Re: How I can implement renko feedData? Post rating: 0   New post Posted: Mon 30 Jun, 2014, 15:23 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You don't need to implement the IRenkoBarFeedListener interface, if use the universal IFeedListener, see more here:
https://www.dukascopy.com/wiki/#Chart_feeds


 

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