Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
JFOREX-3818 Standalone API: charts available in strategy http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=96&t=47291 |
Page 1 of 1 |
Author: | kurak777 [ Sat 05 May, 2012, 19:34 ] | ||
Post subject: | JFOREX-3818 Standalone API: charts available in strategy | ||
Hi, It would be very useful for developers of external clients using Standalone API to be able to start chart container from Strategy. By chart container I mean the chart window with tabs etc. like in JForex Desktop (have a look at the attachment). I am writing about charts for live trading not for backtesting. Ideally it would be great if there was a method in the API that starts/opens charts container and charts are accessible/modifiable by API. Can you please add this to Standalone API? Thanks and kind regards, Kurak
|
Author: | kurak777 [ Mon 07 May, 2012, 15:08 ] |
Post subject: | Re: Standalone API: charts available in strategy |
Hi Support Team! Why did you move the the post to Knowledge Base category? I put it originally in Feature Requests as it is a feature request. regards, Kurak |
Author: | API Support [ Fri 11 May, 2012, 09:25 ] |
Post subject: | Re: Standalone API: charts available in strategy |
What is the reason for requesting this. Why not use JForex client? |
Author: | yoursong [ Sat 12 May, 2012, 16:17 ] |
Post subject: | Re: Standalone API: charts available in strategy |
This would be great. The JForex client is not really useful as a charting platform since the IIndicator interface is not usable at all (no access to previous data e.g. for MA calculation optimization, no fixed bar indices e.g. 0 first bar on chart - the indices are viewport based, difficult and unreliable multi currency access, no attaching a strategy to a specific chart, no decent drawing methods, etc) Right now im pulling the jforex pricefeed via api into MT5 because of this which is less than ideal too since MT5 is just so slow with its ticks, candle closes etc so im working on my own java charting too. The best thing of course would be if Dukascopy would just open source the client or at least charting. |
Author: | yoursong [ Sun 13 May, 2012, 16:42 ] |
Post subject: | Re: Standalone API: charts available in strategy |
How is Dukascopys policy on the following: If one is to create his own frontend aka client using the jforex standalone api: 1) Can this be distributed freely opensource for public/private/commercial use? 2) Can this be distributed freely closed source for public/private/commercial use? 3) Can this be distributed commercially opensource for public/private/commercial use? 4) Can this be distributed commercially closed source for public/private/commercial use? 5) Would Dukascopy maybe support something like this as a community project? e.g. JForex client like client but with the usability of MT and the power of JForex / Java or is this in contrast to supporting its own client. Thanks |
Author: | API Support [ Tue 15 May, 2012, 09:04 ] |
Post subject: | Re: Standalone API: charts available in strategy |
yoursong wrote: no access to previous data e.g. for MA calculation optimization Indicators can be calculated on an arbitrary historical interval over an arbitrary data feed (see https://www.dukascopy.com/wiki/#Indicator_Calculation). You can even calculate an indicator on a value array. Please elaborate what data you can't access.yoursong wrote: no fixed bar indices e.g. 0 first bar on chart - the indices are viewport based Indicator calculation from strategy has nothing to do with the chart. If you mean that the result arrays are time-wise in ascending order (as opposed to MT), then it is "as designed".yoursong wrote: difficult and unreliable multi currency access You don't receive all possible instrument data on purpose, since it would cause storing irrelevant data in your local cache. You need to subscribe to all the needed instruments on strategy start, see https://www.dukascopy.com/wiki/#Subscrib ... instrumentyoursong wrote: no attaching a strategy to a specific chart This might also be interpreted an advantage, that the strategy can work without a chart. It also makes multi-instrument strategies more straightforward. And you can always retrieve a chart from strategy if it is opened.yoursong wrote: no decent drawing methods Please elaborate what additional methods do you require besides the ones that are given in https://www.dukascopy.com/wiki/#Chart_object_catalogyoursong wrote: The best thing of course would be if Dukascopy would just open source the client or at least charting. We don't plan to do this. In case of any problems with chart usage, please register either a Bug report or Feature request.yoursong wrote: How is Dukascopys policy on the following: We don't restrict the redistribution of Standalone API.
If one is to create his own frontend aka client using the jforex standalone api: 1) Can this be distributed freely opensource for public/private/commercial use? 2) Can this be distributed freely closed source for public/private/commercial use? 3) Can this be distributed commercially opensource for public/private/commercial use? 4) Can this be distributed commercially closed source for public/private/commercial use? 5) Would Dukascopy maybe support something like this as a community project? e.g. JForex client like client but with the usability of MT and the power of JForex / Java or is this in contrast to supporting its own client. Thanks |
Author: | yoursong [ Tue 15 May, 2012, 15:13 ] |
Post subject: | Re: Standalone API: charts available in strategy |
API Support wrote: yoursong wrote: no access to previous data e.g. for MA calculation optimization Indicators can be calculated on an arbitrary historical interval over an arbitrary data feed (see https://www.dukascopy.com/wiki/#Indicator_Calculation). You can even calculate an indicator on a value array. Please elaborate what data you can't access.API Support wrote: yoursong wrote: no fixed bar indices e.g. 0 first bar on chart - the indices are viewport based Indicator calculation from strategy has nothing to do with the chart. If you mean that the result arrays are time-wise in ascending order (as opposed to MT), then it is "as designed".API Support wrote: yoursong wrote: difficult and unreliable multi currency access You don't receive all possible instrument data on purpose, since it would cause storing irrelevant data in your local cache. You need to subscribe to all the needed instruments on strategy start, see https://www.dukascopy.com/wiki/#Subscrib ... instrumentAPI Support wrote: yoursong wrote: no attaching a strategy to a specific chart This might also be interpreted an advantage, that the strategy can work without a chart. It also makes multi-instrument strategies more straightforward. And you can always retrieve a chart from strategy if it is opened.API Support wrote: yoursong wrote: no decent drawing methods Please elaborate what additional methods do you require besides the ones that are given in https://www.dukascopy.com/wiki/#Chart_object_catalog- ohlc bars - multi color lines etc (i know can be "hacked" but there we are again... usability is poor) - draw those option on charts e.g. blank out current chart to draw your own candles of a synthetic instrument e.g. usdx on a chart or in an indicator. most simple thing would be of course if you could create your own feed / descriptor whatever to let the client chart a synthetic feed e.g. usdx. this would also solve most multi currency problems since you could simply change the underlying feed and then let indicators / strategies work on the output values API Support wrote: yoursong wrote: The best thing of course would be if Dukascopy would just open source the client or at least charting. We don't plan to do this. In case of any problems with chart usage, please register either a Bug report or Feature request.PS: Don't be offended. It's just frustrating from time to time since the jforex api + feed is very good but there is of course a reason why everyone still uses MT for charting and tries to pull the feed into there instead of simply using the jforex client. |
Author: | yoursong [ Tue 15 May, 2012, 17:45 ] |
Post subject: | Re: Standalone API: charts available in strategy |
Hmm i am a bit surprised that my post get edited / forged although it was simple objective answers. |
Author: | API Support [ Wed 16 May, 2012, 07:55 ] |
Post subject: | Re: Standalone API: charts available in strategy |
The post's formatting made it hard to read and reply, we returned the contents and reformatted it. The post will be replied as soon as available. |
Author: | API Support [ Wed 16 May, 2012, 12:02 ] |
Post subject: | Re: Standalone API: charts available in strategy |
yoursong wrote: If you calculate an exponential moving average (same applies to almost any indicator) you calculate e.g. the SMA of your most left bar, calculate another 100 or whatever bars for smoothing and then calculate your actual EMA for every of the following bars till your recent bar based on the EMA value of the previous bar. This technique (which applies to most indicators) is crucial for at least half way performant calculation of a lot of such things on multiple charts. This is not possible in JForex (to my knowledge) since you cannot access prev. values. Instead of one calculation you calculate 200 or more (decent smoothing) bars for every single bar that you need a value for. This is already an absolut no go. You can't even simply save the values in your own array since you never really know where you are what has been calculated etc since it just randomly chooses a barrange based on the viewport. This might be because of the independence of indicators to charts but indicators are primarily meant for charts and decoupling them from each other defeats most of the purpose. Exponential moving average uses the unstable period property which automatically gives the indicator access to previous bars for smoothing.The latest bar can be accessed through IHistory object made available in indicators (IIndicatorContext.getHistory()). You can, in some way, bypass the viewport limitation by setting recalclateAll/unstablePeriod to true in your custom indicators. yoursong wrote: If you indicator wants to access the current chart_bar For that purpose you can use IHistory interface, which is accessible also from IIndicatorContext.yoursong wrote: You are always getting pushed around randomly based on viewport which also created the above mentioned problem in almost any calculation. a) Indicator's job is to calculate output array over a given inputs array, b) jforex platform's job is to pass at the given moment the input array that it requires outputs for. You should not be concerned about b).yoursong wrote: Yeah of course. If you want to display an usd index (i know there are examples and they work alpha quality at best exactly because of this) it is a pain in the ... to get data from multiple instruments for the same amount of bars. Sometimes you got x bars there, x bars there and so on. It's never consistent and you can't really decide on your own how much you need / how much you want to access / calculate. Again because of the basic decoupling problem managed above you are always being constrained to arbitrary values / bars that are either not enough for your needs / that you don't want / need whatever. This is especially frustrating since jforex is excellent for this since it got no "empty - missing/skipped" bars like MT. Please specify if you refer to strategies or indicators? From strategy you can consistently retrieve the necessary bar data at any moment. See: https://www.dukascopy.com/wiki/#History_bars For indicators, if you need a specified number of bars (i.e. >10), then set the lookback to 10, see: https://www.dukascopy.com/wiki/#IIndicator_interface/Method_getLookback For indicator work with multiple instruments, see: https://www.dukascopy.com/wiki/#Indicator_for_multiple_instruments yoursong wrote: It still is less useful of course since you can only draw in charts and not create a indicator view window with a strategy. Do you mean plotting the indicator on chart? https://www.dukascopy.com/wiki/#Add_indicators_on_chartyoursong wrote: - ohlc bars For strategy you would draw an rectangle and a short line.For indicator you can use HeikenAshi indicator as an example, see: https://www.dukascopy.com/wiki/#Platform_indicator_source_files yoursong wrote: - multi color lines etc (i know can be "hacked" but there we are again... usability is poor) For strategy you would combine multiple short lines.For indicator, if you suffice two-colored line with different trend-up and trend-down colors, then you can use: https://www.dukascopy.com/client/javadoc/com/dukascopy/api/indicators/OutputParameterInfo.html#setColor2(java.awt.Color) If you have any other setting for the coloring, then you need to use IDrawingIndicator.drawOutput. yoursong wrote: - draw those option on charts e.g. blank out current chart to draw your own candles of a synthetic instrument e.g. usdx on a chart or in an indicator. most simple thing would be of course if you could create your own feed / descriptor whatever to let the client chart a synthetic feed e.g. usdx. this would also solve most multi currency problems since you could simply change the underlying feed and then let indicators / strategies work on the output values Again you can use Heikin Ashi indicator as example how to draw your custom candles. Also you can see CustomCandleIndicator as another example.For more efficient assistance, for further inquiries please for each point specify if you are referring to IStrategy, IIndicator, platform chart usage, indicator calls from strategies, strategy usage with charts or indicator usage with charts. |
Author: | API Support [ Thu 17 May, 2012, 09:44 ] |
Post subject: | Re: Standalone API: charts available in strategy |
Regarding redistribution and copyrights, please see the copyright notice at the beginning of standalone.Main.java of JForexClientLibrary. |
Author: | kurak777 [ Sun 20 May, 2012, 18:57 ] |
Post subject: | Re: Standalone API: charts available in strategy |
Hi, Thanks for the answers. I am glad there are people besides me who would find such functionality of API useful. For me Dukascopy Desktop platform is generally fine but offers only basic functionality... I created own application for displaying quotes, sending orders, trades and position management and most importantly risk management. The app completely replaces and extends functionality of Dukascopy GUI. The application is based on JForex Standalone API. The only thing that is missing is functionality of charts. I want to offer this app to my clients. If I have decided to do it now, the app without charts would be an incomplete product. Of course there are workarounds - I can run my app from JForex Desktop platform or run my app + JForex Desktop - those multiply windows would make it not only harder to use but also it is not elegant and not professional. I know Dukascopy API already offers plenty of functionalities, it is free and most open API of forex broker I have ever seen. I think opening charts for developers would be the final complement of this great API. Probably JForex Desktop platform and Standalone API could be decompiled and all needed classes extracted but such option is time consuming, not resistant to updates of API, not supported and what is more important probably it is not legal to offer such “hacked” product to clients. Would be very grateful for adding this to “Features Requests” and API soon Best regards, Kurak |
Author: | kurak777 [ Wed 04 Jul, 2012, 08:18 ] |
Post subject: | Re: JFOREX-3818 Standalone API: charts available in strategy |
Dear Support, Is there any roadmap for requests implementation? Is there any planned date of implementing this specific requirement? Thanks and best regards, Kurak |
Author: | API Support [ Thu 05 Jul, 2012, 12:54 ] |
Post subject: | Re: JFOREX-3818 Standalone API: charts available in strategy |
There is no a roadmap. But we will increase priority for such request. |
Author: | imorris2012 [ Thu 12 Jul, 2012, 05:41 ] |
Post subject: | Re: JFOREX-3818 Standalone API: charts available in strategy |
Dear Support: I will also jump on board and request that charting be available in the Standalone API. |
Author: | API Support [ Mon 03 Sep, 2012, 09:40 ] |
Post subject: | Re: JFOREX-3818 Standalone API: charts available in strategy |
https://www.dukascopy.com/wiki/#JForex_SDK/Work_with_charts |
Author: | hyperscalper [ Mon 28 Jan, 2013, 19:57 ] |
Post subject: | Re: JFOREX-3818 Standalone API: charts available in strategy |
Yes, please continue to enhance what we can do with charting in the standalone API. MouseClickListeners and ability to translate to time/price. Ability to influence chart coloration attributes. Ability to control whether chart shows closed trades, etc. Anything that can be done to safely open the Charts to standalone API usage is appreciated. HyperScalper |
Author: | SFXbernhard [ Fri 10 Jul, 2015, 11:48 ] |
Post subject: | Re: JFOREX-3818 Standalone API: charts available in strategy |
Is it possible to send my own feed to a JForex chart? e.g. if I want to add EUR/USD and GBP/USD prices and display them in an own IChart. Is this possible? I have not found anything like a CustomFeedDescriptor which would accept such a custom Instrument. |
Page 1 of 1 |