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.

Want to stop receiving rates
 Post subject: Want to stop receiving rates Post rating: 0   New post Posted: Thu 25 Jul, 2013, 13:26 

User rating: 0
Joined: Mon 08 Jul, 2013, 11:20
Posts: 12
I would like to ask you if it is possible to start a strategy and then stop receiving rates as i want to use a different rate provider. I am trying
FeedDataProvider.getDefaultInstance().disconnected();
with no success and if i try a
FeedDataProvider.getDefaultInstance().close();
then i get several exceptions

CAUSED BY:
Exception(1): null
at com.dukascopy.api.impl.connect.DCClientImpl$7.tickReceived(DCClientImpl.java:819)
at com.dukascopy.dds2.greed.market.LiveCurrencyMarketProcessingThread$1.run(LiveCurrencyMarketProcessingThread.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)


 
 Post subject: Re: Want to stop receiving rates Post rating: 0   New post Posted: Thu 25 Jul, 2013, 13:46 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We only support JForex-API methods. Moreover, please don't use any non-JForex-API classes from the JForex-SDK project, as they are subject to be changed or removed.


 
 Post subject: Re: Want to stop receiving rates Post rating: 0   New post Posted: Thu 25 Jul, 2013, 13:50 

User rating: 0
Joined: Mon 08 Jul, 2013, 11:20
Posts: 12
Is there a JForex-API method that i can do this? I dont think i have seen something like that in the wiki.


 
 Post subject: Re: Want to stop receiving rates Post rating: 0   New post Posted: Thu 25 Jul, 2013, 13:59 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You have two options:
  • Don't subscribe the particular instruments before the strategy start (i.e., don't call IClient.setSubscribedInstruments). But in this case you won't be able to trade that instrument, access its historical data and calculate indicators on its feed.
  • Ignore the ticks which you receive and construct them from your own data. You can also , for example, calculate indicators on your own values, see https://www.dukascopy.com/wiki/#Indicator_Calculation/Calculate_indicator_on_array


 
 Post subject: Re: Want to stop receiving rates Post rating: 0   New post Posted: Thu 25 Jul, 2013, 16:03 

User rating: 0
Joined: Mon 08 Jul, 2013, 11:20
Posts: 12
First of all thanks for your prompt replies! The think is that i dont want to get any ticks. I know that i can ignore them, but i wouldn't like to receive them but i want to be able to trade(so the first solution cannot be applied here).


 
 Post subject: Re: Want to stop receiving rates Post rating: 0   New post Posted: Fri 26 Jul, 2013, 07:18 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The best you can do is ignoring them.


 

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