Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API function requests in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

XY coordinates, Chart listeners, Strategy drawings, ...
 Post subject: XY coordinates, Chart listeners, Strategy drawings, ... Post rating: 0   New post Posted: Fri 01 Aug, 2014, 07:56 
User avatar

User rating: 3
Joined: Fri 28 Feb, 2014, 19:33
Posts: 9
Location: CanadaCanada
Greetings,

I would like to ask you if you can add some stuff to the API:

- X and Y coordinates of the mouse on the chart e.g. into com.dukascopy.api.indicators.IIndicatorDrawingSupport - getMouseX(), getMouseY() or so... + methods as getValueForY(int y) and getTimeForX(int x) or something similar > it means opposite to getXForTime() and getYForValue();

- Chart Listeners that we can add or remove or so... For example for mouse events, key events etc... If you don't want add native java listeners, you can create your own API of listeners...

- Also, IIndicatorContext could provide information like providing IIndicatorDrawingSupport, for example you can create interface IIndicatorSupport and into IIndicatorContext add method getIndicatorSupport() ... This information can be useful e.g. in getMinMax() or also calculate() when the will be used drawOutput() ... It should contain info like getMinTime(), getMaxTime(), getChartWidth(), getChartHeight(), getMinPrice(), getMaxPrice(), etc...

- Finally, it was mentioned here already, but it could be nice to have referrence java.awt.Graphics(2D) in the IStrategy too, e.g. IContext.getGraphics()... It is simply I think...

This EVERYTHING is based on my EXPERIENCE with JForex and this stuff really missing for me and I think for others too ...

Later I probably add some other requests too...

Please, do everything! ... For me, your platform is the best, because provide lot of things in contrast to other platform ... So you should keep it this way always...

OTHERS, ADD YOUR OPINION(S) AND SUPPORT THE EXISTED...

Best regards
brolinko


 
 Post subject: Re: XY coordinates, Chart listeners, Strategy drawings, ... Post rating: 0   New post Posted: Fri 01 Aug, 2014, 11:38 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
brolinko wrote:
- X and Y coordinates of the mouse on the chart e.g. into com.dukascopy.api.indicators.IIndicatorDrawingSupport - getMouseX(), getMouseY() or so... + methods as getValueForY(int y) and getTimeForX(int x) or something similar > it means opposite to getXForTime() and getYForValue();

- Chart Listeners that we can add or remove or so... For example for mouse events, key events etc... If you don't want add native java listeners, you can create your own API of listeners...
See:
https://www.dukascopy.com/wiki/#Chart_Operations/Add_mouse_listener
brolinko wrote:
- Also, IIndicatorContext could provide information like providing IIndicatorDrawingSupport, for example you can create interface IIndicatorSupport and into IIndicatorContext add method getIndicatorSupport() ... This information can be useful e.g. in getMinMax() or also calculate() when the will be used drawOutput() ... It should contain info like getMinTime(), getMaxTime(), getChartWidth(), getChartHeight(), getMinPrice(), getMaxPrice(), etc...
Indicators have separation between the calculation logic and drawing logic - all drawing operations get carried out in a separate thread. Providing the drawing information in the indicator main thread would break this logic.
brolinko wrote:
- Finally, it was mentioned here already, but it could be nice to have referrence java.awt.Graphics(2D) in the IStrategy too, e.g. IContext.getGraphics()... It is simply I think...
We don't plan to do that, if you lack some particular type of chart object, please make a request. See more in the following discussion:
viewtopic.php?f=83&t=50106


 
 Post subject: Re: XY coordinates, Chart listeners, Strategy drawings, ... Post rating: 0   New post Posted: Fri 01 Aug, 2014, 11:50 
User avatar

User rating: 3
Joined: Fri 28 Feb, 2014, 19:33
Posts: 9
Location: CanadaCanada
I meant to add xy coordinates and chart listeners to indicator, no strategy...,

xy coordinates into IIndicatorDrawingSupport ... getMouseX(), getMouseY(), ...

And Chart Listeners too, either IIndicatorDrawingSupport or IIndicatorContext ... or other way...

At least, this stuff you could add there somewhere...


 
 Post subject: Re: XY coordinates, Chart listeners, Strategy drawings, ... Post rating: 0   New post Posted: Tue 05 Aug, 2014, 14:24 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Such functionality does not fit the indicator concept. If you need some interaction with the user then you should make it either as a strategy or a plugin.


 

Jump to:  

  © 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