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.

indicator which show timeleft to next 1 min bar
 Post subject: indicator which show timeleft to next 1 min bar Post rating: 0   New post Posted: Thu 18 Jul, 2013, 22:10 
User avatar

User rating: 1
Joined: Fri 22 Mar, 2013, 12:09
Posts: 9
Location: Italy, Florence
Hi

anybody can tell me which method i have to use to show timeleft to next 1 min bar?
on my 1 min char of eur/usd i want to show countdown to the next 1 min candle
60
59
58
...
10
9
8
..
1
i try to create my indicator but i don't know which method of jforex api i need to use

thx to all


 
 Post subject: Re: indicator which show timeleft to next 1 min bar Post rating: 0   New post Posted: Fri 19 Jul, 2013, 08:47 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
It is much easier to implement with strategy chart objects - you need to update a text object on every tick. See object creation here:
https://www.dukascopy.com/wiki/#Create_and_manage_chart_objects
See Text object here:
https://www.dukascopy.com/wiki/#Chart_object_catalog


 
 Post subject: Re: indicator which show timeleft to next 1 min bar Post rating: 1   New post Posted: Fri 19 Jul, 2013, 13:01 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Quote:
you need to update a text object on every tick

There is no guarantee that there is a tick for every second (especially in low volume periods like start and end of the week), so this is not a proper place.

Take a look on this topic, where another user just asked the same.


 
 Post subject: Graphical Bar Timers Post rating: 1   New post Posted: Mon 22 Jul, 2013, 21:43 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
You can have this Bar Timer collection for free.....

It uses the Swing user interface to show when Bars close of various intervals.

It's just a JForex Strategy module. Attached is the .jfx code and a screenshot.

This code relies upon the correctness of your System Clock, so use a synchronization
service such as Meinberg NTP or similar clock synch service.

It does not rely upon callbacks to the Strategy module. Instead, it has its
own thread which periodically places an update task on the
SwingUtilities.invokeLater(...) queue to update the floating
graphical user interface.

In onStop() cleanup, this thread is stopped, and the user interface is
properly dispose()'d.

This will also be in JStore, just search for "hyper".

HyperScalper

Image


Attachments:
File comment: Screenshot of Bar Timers in operation
HyperScalperBarTimersImage.PNG [11.3 KiB]
Downloaded 479 times
File comment: Bar Timers Swing User Interface
HyperScalperBarTimers.jfx [8.63 KiB]
Downloaded 354 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.
 
 Post subject: Re: indicator which show timeleft to next 1 min bar Post rating: 0   New post Posted: Sun 28 Jul, 2013, 23:11 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Hi HyperScalper,
May I ask why have you chosen Swing objects instead of using Draw elements from the platform? Or you wanted to have a floating window around?
For me it seems to be a better option to have everything in one place (the platform in this manner).

Another interesting fact is that you use the PC clock. Was this not a problem during usage? Maybe it is just me, but I just can't trust my PC's clock somehow, no matter what ntp config is around :)


 

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