| Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
| price line on every tick http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=49930 |
Page 1 of 1 |
| Author: | Jiri [ Thu 29 Aug, 2013, 15:51 ] |
| Post subject: | price line on every tick |
Hello API Support, I would like to kindly ask whether is possible to publish here example of "Draw on all charts" "on Tick" method. I mean for instance the mentioned horizontal line(s) (ask,bid) would move based on tick (real time). Thank you for any response. J. |
|
| Author: | jlongo [ Thu 29 Aug, 2013, 21:55 ] | ||
| Post subject: | price line on every tick | ||
Hi Jiri: See the example in annex... Trade well JL
|
|||
| Author: | Jiri [ Fri 30 Aug, 2013, 08:49 ] |
| Post subject: | Re: draw price level horizontal line in all charts |
Perfect JL, Thank you. |
|
| Author: | API Support [ Fri 30 Aug, 2013, 08:57 ] |
| Post subject: | Re: draw price level horizontal line in all charts |
bidLine = chart.draw("Bid", IChart.Type.HLINE, 0, 0); Please don't use the deprecated methods, instead use:IChartObject bidLine = chart.getChartObjectFactory().createHorizontalLine("Bid", tick.getBid()); See more here http://www.dukascopy.com/wiki/#Create_and_manage_chart_objectsinstruments = Instrument.values();You don't need to take care of the instruments, simply iterate the following way: public void onTick(Instrument instrument, ITick tick) throws JFException { and on stop do the following (if there won't be such object the remove will take no effect): public void onStop() throws JFException {
|
|
| Author: | Jiri [ Mon 02 Sep, 2013, 07:39 ] |
| Post subject: | Re: draw price level horizontal line in all charts |
Hello API Support, is there any reason why my last question has been deleted? Regards, J. |
|
| Author: | API Support [ Mon 02 Sep, 2013, 08:05 ] |
| Post subject: | Re: price line on every tick |
The bug will get fixed with the next JForex-API version. |
|
| Author: | Jiri [ Mon 02 Sep, 2013, 08:27 ] |
| Post subject: | Re: price line on every tick |
I see, perfect. Thank you. J. |
|
| Author: | Jiri [ Tue 03 Sep, 2013, 08:57 ] |
| Post subject: | Re: price line on every tick |
Hello Api Support, could you please advise how to get approximate solution (with help of deprecated methods) before the mentioned bug will get resolved? For strategy "Add custom information in OHLC Index" (again based onTick method) I would need to use it at all opened charts (even same instruments) http://www.dukascopy.com/wiki/#Add_custom_information_in_OHLC_Index Thank you in advance J. |
|
| Author: | API Support [ Tue 03 Sep, 2013, 11:44 ] |
| Post subject: | Re: price line on every tick |
Jiri wrote: could you please advise how to get approximate solution (with help of deprecated methods) before the mentioned bug will get resolved? You should ensure the key uniqueness among all charts for each chart object you create.Jiri wrote: For strategy "Add custom information in OHLC Index" (again based onTick method) I would need to use it at all opened charts (even same instruments) Simply iterate through IContext.getCharts() and apply the logic likewise as it is given in the example.
|
|
| Author: | Jiri [ Wed 04 Sep, 2013, 14:11 ] |
| Post subject: | Re: price line on every tick |
Thank you, It helped. J. |
|
| Page 1 of 1 |