Dukascopy
 
 
Wiki JStore Search Login

Platform freeze from 22.2.2013
 Post subject: Platform freeze from 22.2.2013 Post rating: 1   New post Posted: Wed 27 Feb, 2013, 16:05 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Hello, after platform update (from 22.2.2013 new platform version was downloaded tree times), my strategies (full platform) freeze every day several times and I must kill process and restart platform.

I found freeze is probably, when I call IHistory.getTicks method. I call this method every time when onTick is received for getting missed ticks between actual tick and last received tick.

Next, I have implemented checking for receiving ticks over onTick more than one time (when onTick receive tick with same or older date than latest tick I received) and this appears always time after platform update. Maybe this is linked with problem with getTicks.

And my last question is, is it still necessary call IHistory.getTicks for ensure all ticks are received over onTick mehod? I found this useful some year ago becouse I don't received all ticks everytime.

For example:
1) onTick received -> ITick 16:34
2) onTick received -> ITick 16:40
3) I call IHistory.getTicks( from 16:34 to 16:40 ) -> returns 3 ticks so I obtain missed tick (for example in 16:37) not passed to onTick, is it still necessary?


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Wed 27 Feb, 2013, 17:04 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
GeniuZ wrote:
Hello, after platform update (from 22.2.2013 new platform version was downloaded tree times), my strategies (full platform) freeze every day several times and I must kill process and restart platform.

I found freeze is probably, when I call IHistory.getTicks method. I call this method every time when onTick is received for getting missed ticks between actual tick and last received tick.
Please provide:
GeniuZ wrote:
Next, I have implemented checking for receiving ticks over onTick more than one time (when onTick receive tick with same or older date than latest tick I received) and this appears always time after platform update. Maybe this is linked with problem with getTicks.
Please provide an example strategy which demonstrates this.
GeniuZ wrote:
And my last question is, is it still necessary call IHistory.getTicks for ensure all ticks are received over onTick mehod?
When was it necessary? You receive all ticks if you simply subscribe to an instrument and don't do prolonged operations within the onTick (see cases when a tick gets skipped).


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Wed 27 Feb, 2013, 17:29 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Thank you for reply.

I removed getTicks method and platform freeze again now. I don't have simple strategy but lot of complex strategies, so I can't provide easy example. I can't read anythink from console, becouse platform does not respond for user inputs.

But I think problem is with same ticks again and there is any problem in platform, this happened sometimes in past, but with last version it happes still around.

You can check double ticks:
public   long[] lastTickTime = new long[Instrument.values().length];
@Override
public void onTick(Instrument instrument, ITick inputTick) throws JFException
{
   int oi = instrument.ordinal();
   long actualTickTime = inputTick.getTime();
   if( lastTickTime[oi] > actualTickTime )
   {
      out("double tick");
   }
   lastTickTime[oi] = actualTickTime + 1;
}


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Wed 27 Feb, 2013, 17:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please provide a full example strategy which replicates the case.


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Wed 27 Feb, 2013, 20:01 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
package jforex;

import java.util.*;

import com.dukascopy.api.*;

public class Strategy1 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();
    }

    public void onAccount(IAccount account) throws JFException {
    }

    public void onMessage(IMessage message) throws JFException {
    }

    public void onStop() throws JFException {
    }

    public   long[] lastTickTime = new long[Instrument.values().length];
   
    @Override
    public void onTick(Instrument instrument, ITick inputTick) throws JFException
    {
       int oi = instrument.ordinal();
       long actualTickTime = inputTick.getTime();
       if( lastTickTime[oi] > actualTickTime )
       {
          console.getOut().println("double tick " + instrument.toString());
       }
       lastTickTime[oi] = actualTickTime + 1;
    }
   
    public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
    }
}


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Thu 28 Feb, 2013, 17:19 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We could not reproduce this by having subscribed to all available platform instruments and running your strategy. Please provide more precise reproduction steps.


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Thu 28 Feb, 2013, 17:43 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
This strategy is not for reproduce freeze but for reproduce same or older ticks are received over onTick method. Do you check it?


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Thu 28 Feb, 2013, 21:15 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Please, can you try start posted strategy on all instruments but in 10 instances at once? Becouse I run 10 strategies at once.

I try start strategy standalone in JDK. (I will start all strategies in JDK and will test freeze later.) First finding - in platform, about 600 same or older ticks was received per instrument in one hour. In SDK, 20 same or older ticks was received in one hour.

Again, before platform update to last version, there was not duplicated ticks detected. Do you checked duplicated ticks with strategy I posted? Duplicated ticks appeared sometimes in history and I think platform was unstable too in this time. But it was corrected after little time and no more duplicated ticks was received. Till to last update.


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Fri 01 Mar, 2013, 08:34 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
GeniuZ wrote:
This strategy is not for reproduce freeze but for reproduce same or older ticks are received over onTick method. Do you check it?
We did not check the strategy logic, this time we did, consider a more convenient way how to check if the last tick time is greater than the time of the previous:
package requests;
 
import java.util.*;
 
import com.dukascopy.api.*;
import com.dukascopy.api.util.DateUtils;
 
public class TickMap implements IStrategy {
    private IConsole console;
    private Map<Instrument, ITick> prevTicks = new HashMap<Instrument, ITick>();
   
    public void onStart(IContext context) throws JFException {
        this.console = context.getConsole();
    }
 
    public void onAccount(IAccount account) throws JFException {
    }
 
    public void onMessage(IMessage message) throws JFException {
    }
 
    public void onStop() throws JFException {    }
     
    @Override
    public void onTick(Instrument instrument, final ITick tick) throws JFException
    {
        ITick prevTick = prevTicks.get(instrument);
        if(prevTick != null && prevTick.getTime() > tick.getTime()){
            console.getErr().println(String.format("%s %s > %s prev tick=%s curr tick=%s",
                    instrument, DateUtils.format(prevTick.getTime()),DateUtils.format(tick.getTime()), prevTick, tick));           
        } else if(prevTick != null) {
            console.getOut().println(String.format("%s %s <= %s prev tick=%s curr tick=%s",
                    instrument, DateUtils.format(prevTick.getTime()),DateUtils.format(tick.getTime()), prevTick, tick));     
            }
        prevTicks.put(instrument, tick);
    }
     
    public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {    }
}


Attachments:
TickMap.java [1.45 KiB]
Downloaded 451 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Fri 01 Mar, 2013, 09:17 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Thank you for reply. Please don't check only greater time bat equal time too.

prevTick.getTime() >= tick.getTime())


In past I compared ITick objects too and these objects ( prevTick and tick ) was equals too.
When you run this comparsion in HT, there are double ticks for example one tick per year only.

In previous versions, there was equals ticks ocassionally in live.


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Fri 01 Mar, 2013, 10:46 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The equal tick issue has been registered.


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Fri 01 Mar, 2013, 11:07 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Thank you, I think resolving of same ticks maybe resolve platform freeze too.

I creted own GUI and I started all strategies under JForex-SDK, I will report when it freeze or not.


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Fri 01 Mar, 2013, 22:11 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
When strategies runs over JForex-SDK no freeze appears, so I don't have problems in JForex-SDK. Strategies are still running.

Before 17:15 GMT (in log 18:15) was any dealy on all instruments with ticks receiving.
But my GUI was live and strategies waited normally for any tick.
I attached log from java console if you want inspect it, maybe usual connection problem.
Quote:
2013-03-01 18:15:14.931 ERROR TimeManager - Unable to detect server time, reason <Request to DFS timed out...

In 17:15 GMT all strategies obtain ticks and continues normally.


Attachments:
log.txt [220.73 KiB]
Downloaded 455 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Sat 02 Mar, 2013, 19:26 

User rating: 1
Joined: Mon 23 May, 2011, 07:52
Posts: 57
Location: Bulgaria,
Hi, I had the same freezing problem until today since several days , very bad thing in some important situations. Don't have any complex strategies or indicators, only some MAs and standard pivots on different period. When manual scrolling the chart it freezes and I need to kill the process ! I wondered if just I experience this problem...
My OS is win 8 64bit with java 7 64 bit, I5 4400Mhz, 8GB RAM

Today I deleted all the cash in java temporary files and jforex, removed the java 7 64 bit edition and installed java 6 32 bit.
Until now no problems, will see on Monday also when the markets open, but no freezing today.

PS: Had again a freezing :( :( :( :(


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Mon 04 Mar, 2013, 09:46 

User rating: 1
Joined: Mon 23 May, 2011, 07:52
Posts: 57
Location: Bulgaria,
Dear support, my second platform (win7 32 bit) has frozen now too when pressing the button -Set chart auto shift. There is really a major problem since last update of program


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Mon 04 Mar, 2013, 10:42 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
JForex-SDK has frozen yesterday at 23h if second DFS timeout appeared.
I started JForex platform again with Java console and platform freeze when "DFS timed out" occured in console.
ERROR TimeManager - Unable to detect server time, reason <Request to DFS timed out...


 
 Post subject: Re: Platform freeze from 22.2.2013 Post rating: 0   New post Posted: Mon 04 Mar, 2013, 11:19 
User avatar

User rating: 2
Joined: Mon 30 May, 2011, 15:41
Posts: 86
Location: Czech Republic, Prague
Platform freezes again, I can't scroll Java console becouse it is frozen too, but I see latest message "DFS timeout" so this error occurs in any case after (or before?) platform freeze.


 

Jump to:  

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