Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

OHLC Informer bug on windows machine. Revised
 Post subject: OHLC Informer bug on windows machine Post rating: 1   New post Posted: Thu 26 Dec, 2013, 08:58 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
The attached TestOhlcObjects strategy creates an OHLC Informer widget on the active chart and removes it on stop.
How to reproduce the bug:
1) run local the TestOhlcObjects strategy;
2) exit the platform;
3) enter the platform;
What is expected: no OHLC Informer on the chart.
What actually is: the created OHLC Informer has not been removed by the strategy during exiting platform.
package jforex;

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

public class TestOhlcObjects implements IStrategy {
    private IChart chart;
    private IOhlcChartObject ohlc;
   
    public void onStart(IContext context) throws JFException {
        chart = context.getLastActiveChart();
        ohlc = chart.getChartObjectFactory().createOhlcInformer();
        chart.add(ohlc);
        ohlc.setFillOpacity(0.2f);
    }
   
    public void onStop() throws JFException {
        chart.remove(ohlc);
    }
   
    public void onAccount(IAccount account) throws JFException {}
    public void onMessage(IMessage message) throws JFException {}
    public void onTick(Instrument instrument, ITick tick) throws JFException {}
    public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {}
}
There is no such a bug with other types of chart objects.


Attachments:
TestOhlcObjects.java [854 Bytes]
Downloaded 137 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: OHLC Informer bug on windows machine Post rating: 0   New post Posted: Tue 07 Jan, 2014, 12:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We could not replicate this.


 
 Post subject: Re: OHLC Informer bug on windows machine Post rating: 0   New post Posted: Tue 07 Jan, 2014, 12:15 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
API Support wrote:
We could not replicate this.
Yes, the bug is fixed in the newest API 2.9.5.2 version.


 
 Post subject: OHLC Informer bug on windows machine. Revised Post rating: 0   New post Posted: Tue 07 Jan, 2014, 12:33 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
Dear Support team,

I beg your pardon for mistakenly confirmation and closing OHLC Informer bug topic.
That bug can be easily reproduced on DEMO ver. 2.30.2.

Do you exit and re-enter the platform while trying to replicate the bug?


 
 Post subject: Re: OHLC Informer bug on windows machine. Revised Post rating: 0   New post Posted: Tue 07 Jan, 2014, 15:55 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
hebasto wrote:
Do you exit and re-enter the platform while trying to replicate the bug?
Yes we did and we still can't replicate it. Is also the formatting of the object the same as it was plotted by the strategy after relaunching the platform?


 
 Post subject: Re: OHLC Informer bug on windows machine. Revised Post rating: 0   New post Posted: Tue 07 Jan, 2014, 16:42 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
API Support wrote:
Is also the formatting of the object the same as it was plotted by the strategy after relaunching the platform?
Yes, it was. I can post screenshots on your request.


 
 Post subject: Re: OHLC Informer bug on windows machine. Revised Post rating: 0   New post Posted: Tue 07 Jan, 2014, 17:01 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
There must be something missing then in the case that you describe since we followed the steps and could not replicate this.


 
 Post subject: Re: OHLC Informer bug on windows machine. Revised Post rating: 0   New post Posted: Wed 08 Jan, 2014, 11:53 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
Exactly step to replicate the bug on DEMO 2.30.2:
1) open a new chart;
2) close default OHLC Index: the chart is clear now;
3) start the TestOhlcObjects strategy (local run): a custom OHLC Index appears in the top left corner of the chart;
See screenshot after step 3
4) do not stop TestOhlcObjects strategy, exit (Menu -> File-> Exit) and re-enter the platform: custom OHLC Index is not removed;
See screenshot after step 4, pay attention to the Messages Tab: it is just after re-entering to the platform.


Attachments:
File comment: After re-entering the platform
step4.png [165.64 KiB]
Downloaded 241 times
File comment: Before exiting the platform
step3.png [159.65 KiB]
Downloaded 191 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: OHLC Informer bug on windows machine. Revised Post rating: 0   New post Posted: Wed 08 Jan, 2014, 13:57 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
hebasto wrote:
4) do not stop TestOhlcObjects strategy,
This was the difference - we did stop the strategy. The reason why the object remains on the chart is because if you close the platform onStop does not get executed, rather all started strategies get terminated.


 

Jump to:  

  © 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