Dukascopy
 
 
Wiki JStore Search Login

method "setHistogramTwoColor()" in JForex3 fail
 Post subject: method "setHistogramTwoColor()" in JForex3 fail Post rating: 0   New post Posted: Thu 08 Dec, 2016, 10:57 
User avatar

User rating: 0
Joined: Mon 07 Jan, 2013, 23:30
Posts: 19
Location: Ukraine, Odessa
Dear support!

In new JForex 3 the method

setHistogramTwoColor(boolean histogramTwoColor)
(If set to true and drawing style is histogram, then it will be shown in two colors, positive values with green and negative with red)


doesn't works in indicator. Still operates well in old good JForex.

Some source code from my indicator:

public void onStart(IIndicatorContext context)
{
console = context.getConsole();
this.context = context;
this.history = context.getHistory();

indicatorInfo = new IndicatorInfo("Simple", "Simple", "MyIndicators", false, false, false, 1, 0, 1);
indicatorInfo.setRecalculateOnNewCandleOnly(true);

inputParameterInfos = new InputParameterInfo[]
{
new InputParameterInfo("Input data", InputParameterInfo.Type.BAR)
};

outputParameterInfos = new OutputParameterInfo[]
{

new OutputParameterInfo("out", OutputParameterInfo.Type.DOUBLE, OutputParameterInfo.DrawingStyle.HISTOGRAM) {{ setHistogramTwoColor(true); }}
};

}


Would be grateful for help!
Image
Image


Attachments:
JFOREX_Chart_EUR_USD_Daily_snapshot.png [16.45 KiB]
Downloaded 527 times
JFOREX3_Chart_EUR_USD_Daily_snapshot.png [17.92 KiB]
Downloaded 548 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: method "setHistogramTwoColor()" in JForex3 fail Post rating: 0   New post Posted: Tue 03 Jan, 2017, 13:14 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1048
Location: Geneva, Switzerland
"Trend down" color on histograms are used for values that are less than the previous in JForex 3 now. It used to be applied to negative values, but we do not find it correct.

User can create two outputs for positive and negative values with different colors instead.


 

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