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.

Customizing TesterMainGuiMode
 Post subject: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Tue 19 Jul, 2011, 22:33 

User rating: 0
Joined: Mon 23 May, 2011, 16:03
Posts: 13
Location: BrazilBrazil
When running TesterMainGuiMode having subscribed more than one currency, It's not possible to see all of the charts being drawn like before when using jForex platform (having checked visualmode option). When using TesterMainGuiMode, how can I display all charts I am subscribded in ?

Thanks,

Guidera


 
 Post subject: Re: NoSuchField error when running console java tester Post rating: 0   New post Posted: Wed 20 Jul, 2011, 09:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Guidera wrote:
When using TesterMainGuiMode, how can I display all charts I am subscribded in ?
Consider the following code changes:
//(..)
//1) change the setChartPanels method
public void setChartPanels(Map<IChart, ITesterGui> chartPanels) {
   if(chartPanels != null && chartPanels.size() > 0){
      for (IChart chart : chartPanels.keySet()){
         LOGGER.debug("Chart for instrument" + chart.getInstrument().toString());
         
         Instrument instrument = chart.getInstrument();
         setTitle(instrument.toString() + " " + chart.getSelectedOfferSide() + " " + chart.getSelectedPeriod());
            
         JPanel chartPanel = chartPanels.get(chart).getChartPanel();
         addChartPanel(chartPanel);
      }
   }
}
//(..)
//2) in startStrategy - add an additional instrument
instruments.add(Instrument.GBPUSD);
//(..)
//3) in addChartPanel comment out the following line
   //removecurrentChartPanel();
//(..)


 
 Post subject: Re: NoSuchField error when running console java tester Post rating: 0   New post Posted: Sat 30 Jul, 2011, 05:54 

User rating: 0
Joined: Mon 23 May, 2011, 16:03
Posts: 13
Location: BrazilBrazil
And how do I configure the type of the chart to be ploted ?

for example:
Chart:
Type: Candle, Bar, Line
Periodicity: 10 secs, 1 min , 10 min


 
 Post subject: Re: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Mon 01 Aug, 2011, 14:43 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You can do this in setChartPanels method:
public void setChartPanels(Map<IChart, ITesterGui> chartPanels) {
   if (chartPanels != null && chartPanels.size() > 0) {         
      for (IChart chart : chartPanels.keySet()) {
         LOGGER.debug("Chart for instrument"
               + chart.getInstrument().toString());

         Instrument instrument = chart.getInstrument();
         setTitle(instrument.toString() + " "
               + chart.getSelectedOfferSide() + " "
               + chart.getSelectedPeriod());
         
         // configure chart type
         if(chart.getInstrument().equals(Instrument.EURUSD))
         {
            // show tick line if the instrument is EURUSD
            chartPanels.get(chart).getTesterChartController().changePeriod(DataType.TICKS, Period.TICK);
         }
         else
         {
            // show candles otherwise
            chartPanels.get(chart).getTesterChartController().changePeriod(DataType.TIME_PERIOD_AGGREGATION, Period.TEN_MINS);
         }
         
         JPanel chartPanel = chartPanels.get(chart).getChartPanel();
         addChartPanel(chartPanel);
      }
   }
}


 
 Post subject: Re: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Thu 11 Aug, 2011, 02:05 

User rating: 0
Joined: Mon 23 May, 2011, 16:03
Posts: 13
Location: BrazilBrazil
Thanks, works nice

How can I enable equity, P/L and Balance functions like on JForex platform Historical Testing (the functions from the checkboxes in Historical Tester window). How can I enable them from coding?


 
 Post subject: Re: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Thu 11 Aug, 2011, 11:10 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Currently Equity, P/L and Balance indicators are not published in JForex API, thus you can't attach them to the tester. The indicators will be available with the next release.


 
 Post subject: Re: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Tue 06 Sep, 2011, 19:33 

User rating: 0
Joined: Mon 23 May, 2011, 16:03
Posts: 13
Location: BrazilBrazil
Is Equity, P/L and Balance indicators already possible trhough code ?


 
 Post subject: Re: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Wed 07 Sep, 2011, 07:27 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
There has not been a release yet.


 
 Post subject: Re: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Sun 16 Oct, 2011, 17:41 

User rating: 0
Joined: Mon 23 May, 2011, 16:03
Posts: 13
Location: BrazilBrazil
Noticed that lately there has been an API release.

I would now like to ask you again how can I enable Equity, P/L and Balance indicators trhough code.

Thank you,

Guidera


 
 Post subject: Re: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Tue 18 Oct, 2011, 10:19 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please be advised that the feature will be available with that the feature will be available with a re-release of Standalone API (JForex API 2.6.46) which will be out as soon as possible.
Follow standalone API releases here:
viewforum.php?f=113


 
 Post subject: Re: Customizing TesterMainGuiMode Post rating: 0   New post Posted: Wed 19 Oct, 2011, 10:18 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Guidera wrote:
I would now like to ask you again how can I enable Equity, P/L and Balance indicators trhough code.
See:
https://www.dukascopy.com/wiki/index.php ... n_GUI_mode


 

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