Dukascopy
 
 
Wiki JStore Search Login

time remaining to the close of a candle indicator needed
 Post subject: time remaining to the close of a candle indicator needed Post rating: 0   New post Posted: Sun 29 Sep, 2013, 17:57 

User rating: 0
Joined: Fri 19 Apr, 2013, 15:09
Posts: 3
Location: Poland, Warsaw
Hi guys,

I need an indicator that shows time left to the close of a candle for jforex.
Anybody can help with that???

thanx,
Greg

ps. you can pm me also on [email protected]


 
 Post subject: Re: time remaining to the close of a candle indicator needed Post rating: 1   New post Posted: Tue 01 Oct, 2013, 11:39 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Hi,

You rather create a strategy with such functionality, as drawing on the chart (to show the countdown) is easier from strategy.
You can use the following pseudo code to update a chart object's text with the countdown text:
currentBar = history.getBar(chart.getInstrument(), chart.getSelectedPeriod(), OfferSide.BID, 0);
obj.setText(countDownTime.format(currentBar.getTime() + chart.getSelectedPeriod().getInterval() - new Date().getTime()));


 

Jump to:  

cron
  © 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