Dukascopy
 
 
Wiki JStore Search Login

IClientChartPresentationManager not working with ITesterClient
 Post subject: IClientChartPresentationManager not working with ITesterClient Post rating: 0   New post Posted: Tue 14 Mar, 2017, 15:55 

User rating: 2
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
Hello Support,

I wanted to make the default candlesticks invisible on the chart while backtesting with TesterMainGUIMode.java under Eclipse. The story is that I have my own indicator that draws algo OHLC candlesticks for me on the chart. Now I wanted to color the default candlesticks to the background color so that they get invisible in TesterMainGUIMode by using the clientGUI.getChartPresentationManager() function but I got the following error message:

//Background is white so that the default candles will be colored to white as well to make them disappear
           final IClientGUI clientGUI =  client.getClientGUI(mychart);
           IClientChartPresentationManager chartPresentationManager = clientGUI.getChartPresentationManager();
           chartPresentationManager.setTheme(
                  chartPresentationManager.getTheme()
                      .setName("candle color theme")                  
                      .setColor(ColoredElement.CANDLE_BEAR, Color.WHITE)
                      .setColor(ColoredElement.CANDLE_BULL, Color.WHITE)
                     
           );



at singlejartest.TesterMainGUIMode.startStrategy(TesterMainGUIMode.java:238)
   at singlejartest.TesterMainGUIMode$3$1.run(TesterMainGUIMode.java:306)
   at java.lang.Thread.run(Unknown Source)
java.lang.IllegalStateException: It's not designed to open chart GUI in back-testing at the moment
   at com.dukascopy.api.impl.connect.TesterClientImpl.getClientGUI(TesterClientImpl.java:680)
   at singlejartest.TesterMainGUIMode.setChartPanels(TesterMainGUIMode.java:139)
   at com.dukascopy.api.impl.connect.TesterClientImpl.startTest(TesterClientImpl.java:1012)
   at com.dukascopy.api.impl.connect.TesterClientImpl.startTest(TesterClientImpl.java:965)
   at com.dukascopy.api.impl.connect.TesterClientImpl.startStrategy(TesterClientImpl.java:811)
   at com.dukascopy.api.impl.connect.TesterClientImpl.startStrategy(TesterClientImpl.java:760)
   at singlejartest.TesterMainGUIMode.startStrategy(TesterMainGUIMode.java:238)
   at singlejartest.TesterMainGUIMode$3$1.run(TesterMainGUIMode.java:306)
   at java.lang.Thread.run(Unknown Source)


this is a bug :shock: ?? could you please give me a piece of advice how to make the default candlesticks coming from TesterMainGUIMode invisible? The code is attached.

Thanks in advance!!!


Attachments:
TesterMainGUIMode.java [14.13 KiB]
Downloaded 232 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.
 

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