Dukascopy
 
 
Wiki JStore Search Login

indicator colors change on restart of platform
 Post subject: indicator colors change on restart of platform Post rating: 0   New post Posted: Mon 21 Nov, 2011, 14:06 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
I have coded a number of indicators with several outputParameters where I set the default colors for the outputs in indicator onStart(). It appears beyond a certain number of outputs (10 or more?) if you reload the JForex platform that the default colors/line styles are rearranged!

default colors for the indicator as set in OnStart method
Image

and here is the indicator on the chart with the correct default colors....
Image

and after a JForex platform restart all the line colors and style have changed...
Image

   
    private Color RoyalBlue = new Color(65, 105, 225);
    private Color Crimson = new Color(220, 20, 60);
    private Color DarkGray = new Color(85, 85, 85);
    private Color DemiBlack = new Color(64, 64, 64);
    private Color Orchid = new Color(218, 112, 214); 

    public void onStart(IIndicatorContext context)
    {
        this.context = context;
       
        indicatorInfo = new IndicatorInfo("FLOOR PIVOTS", "Floor Pivots", "Support & Resistance Indicators", true, false, true, 2, 9, 23);
        indicatorInfo.setSparceIndicator(true);
  //      indicatorInfo.setShowOnTicks(false);
        indicatorInfo.setRecalculateAll(true);
               
        calculationTimeframe = new InputParameterInfo("Calculation Input data", InputParameterInfo.Type.BAR);
        calculationTimeframe.setPeriod(Period.DAILY_SUNDAY_IN_MONDAY);
        calculationTimeframe.setFilter(Filter.WEEKENDS);
       
        displayTimeframe = new InputParameterInfo("Display Input data", InputParameterInfo.Type.BAR);
        displayTimeframe.setFilter(Filter.WEEKENDS);
       
        inputParameterInfos = new InputParameterInfo[]
        {
           displayTimeframe,
            calculationTimeframe
        };
       
     
        setPeriods();

        optInputParameterInfos = new OptInputParameterInfo[]
        {
            new OptInputParameterInfo("Period", OptInputParameterInfo.Type.OTHER, new IntegerListDescription(period, periodValues, periodNames)),
            new OptInputParameterInfo("Number Periods Lookback", OptInputParameterInfo.Type.OTHER, new IntegerRangeDescription(periodLookback, 1, 50, 1)),
            new OptInputParameterInfo("Label Offset (candles)", OptInputParameterInfo.Type.OTHER, new IntegerRangeDescription(labelOffset, 0, 25, 1)),           
            new OptInputParameterInfo("Show MidPivot Levels", OptInputParameterInfo.Type.OTHER, new BooleanOptInputDescription(showMidPivotLevels)),
            new OptInputParameterInfo("Show Central Pivot Range", OptInputParameterInfo.Type.OTHER, new BooleanOptInputDescription(showCentralPivotRange)),
            new OptInputParameterInfo("Show Previous Open/High/Low", OptInputParameterInfo.Type.OTHER, new BooleanOptInputDescription(showYesterdayLevels)),
            new OptInputParameterInfo("Large Labels", OptInputParameterInfo.Type.OTHER, new BooleanOptInputDescription(largeLabels)),
            new OptInputParameterInfo("Align Labels Left", OptInputParameterInfo.Type.OTHER, new BooleanOptInputDescription(labelsLeft)),
            new OptInputParameterInfo("Display Period", OptInputParameterInfo.Type.OTHER, new BooleanOptInputDescription(displayPeriod))
        };

        outputParameterInfos = new OutputParameterInfo[]
        {
            createOutputParameterInfo("PV", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.LINE),
            createOutputParameterInfo("TC", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.LINE),
            createOutputParameterInfo("BC", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.LINE),
            createOutputParameterInfo("R1", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("R2", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("R3", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("R4", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("S1", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("S2", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("S3", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("S4", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("High", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("Low", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("Open", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("mR1", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("mR2", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("mR3", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("mR4", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("mS1", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("mS2", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("mS3", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("mS4", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.DASH_LINE ),
            createOutputParameterInfo("Separators", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.LINE )
        };
       
        // central pivot, and top, bottom of central pivot range
        outputParameterInfos[0].setColor(DemiBlack);
        outputParameterInfos[1].setColor(Orchid);
        outputParameterInfos[2].setColor(Orchid);
       
//        outputParameterInfos[1].setLineWidth(3);   // this compiles in eclipse, but not in JForex
//        outputParameterInfos[2].setLineWidth(3);
       
        // resistance levels
        outputParameterInfos[3].setColor(Crimson);
        outputParameterInfos[4].setColor(Crimson);
        outputParameterInfos[5].setColor(Crimson);
        outputParameterInfos[6].setColor(Crimson);
        // support levels
        outputParameterInfos[7].setColor(RoyalBlue);
        outputParameterInfos[8].setColor(RoyalBlue);
        outputParameterInfos[9].setColor(RoyalBlue);
        outputParameterInfos[10].setColor(RoyalBlue);
        // yesterday high, low, open
        outputParameterInfos[11].setColor(DemiBlack);
        outputParameterInfos[12].setColor(DemiBlack);
        outputParameterInfos[13].setColor(DemiBlack);
        // mid pivots
        outputParameterInfos[14].setColor(DarkGray);
        outputParameterInfos[15].setColor(DarkGray);
        outputParameterInfos[16].setColor(DarkGray);
        outputParameterInfos[17].setColor(DarkGray);
        outputParameterInfos[18].setColor(DarkGray);
        outputParameterInfos[19].setColor(DarkGray);
        outputParameterInfos[20].setColor(DarkGray);
        outputParameterInfos[21].setColor(DarkGray);
        // separators
        outputParameterInfos[22].setColor(DemiBlack);
       
        decimalFormat = new DecimalFormat("0.0000");
    }


this is a big time waster if you setup your charts to provide at a glance color coded information for trading...
can we get it fixed with the next release of the JForex platform please?


 
 Post subject: Re: indicator colors change on restart of platform Post rating: 0   New post Posted: Fri 03 Feb, 2012, 12:17 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
why has this not yet been accepted as a bug? this is a serious issue with custom indicators on the desktop platform.


 
 Post subject: Re: indicator colors change on restart of platform Post rating: 0   New post Posted: Thu 09 Feb, 2012, 10:06 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
with desktop 2.14 this can bug can be reproduced by simply right clicking on the chart indicator list to remove the indicator, then right clicking on the chart list header to add recent indicators, and add the same indicator back. Colors for outputs will randomly change.


 
 Post subject: Re: indicator colors change on restart of platform Post rating: 0   New post Posted: Thu 09 Feb, 2012, 14:21 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
We are unable to see the problem. The output parameters are saved every time you change them. Have you cleaned JAVA cache?


 
 Post subject: Re: indicator colors change on restart of platform Post rating: 0   New post Posted: Thu 09 Feb, 2012, 23:25 

User rating: -
Desktop Support wrote:
We are unable to see the problem. The output parameters are saved every time you change them. Have you cleaned JAVA cache?


No. Happy to try that though. How do I clear my java cache?


 
 Post subject: Re: indicator colors change on restart of platform Post rating: 0   New post Posted: Fri 10 Feb, 2012, 00:52 

User rating: 2
Joined: Wed 18 May, 2011, 17:36
Posts: 49
Location: FranceFrance
See picture please.


Attachments:
JAVACACHE.JPG [215.12 KiB]
Downloaded 786 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: indicator colors change on restart of platform Post rating: 0   New post Posted: Fri 10 Feb, 2012, 10:30 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
Cleared my java cache and the problem can still be reproduced. I have attached an indicator I wrote to automatically mark fibonacci retracements.

Attachment:
FibonacciIndicator_v1.java [23.23 KiB]
Downloaded 591 times


Add the indicator, then remove it from the chart by right-clicking and selecting "remove indicator" in the workspace pane, then add the indicator back by right clicking on the chart instrument title in the workspace pane and add recent indicators. The colors for the indicator outputs have changed (been re-arranged) on the chart. Sometimes it's just one output, other times multiple outputs.

This also happens on re-start of the JForex platform.


 
 Post subject: Re: indicator colors change on restart of platform Post rating: 0   New post Posted: Fri 10 Feb, 2012, 12:15 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
Will fix this


 
 Post subject: Re: indicator colors change on restart of platform Post rating: 0   New post Posted: Thu 23 Feb, 2012, 13:05 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1054
Location: Geneva, Switzerland
Fixed. Available in 2.14.27 version.


 

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