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.

How to get the period of the main chart please ?
 Post subject: How to get the period of the main chart please ? Post rating: 0   New post Posted: Mon 16 May, 2011, 09:22 

User rating: 0
Joined: Mon 16 May, 2011, 09:11
Posts: 2
Hi Forum,

I want my indicator to read the period of the chart,
where it is connected to.
I.e. if the user is changing the period of the chart,
the indicator can read the new period and react on it.

Thanks a lot
Ulawun


 
 Post subject: Re: How to get the period of the main chart please ? Post rating: 0   New post Posted: Mon 16 May, 2011, 09:36 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please have a look at the following: https://www.dukascopy.com/client/javadoc ... getPeriod()


 
 Post subject: Re: How to get the period of the main chart please ? Post rating: 0   New post Posted: Mon 16 May, 2011, 09:48 

User rating: 0
Joined: Mon 16 May, 2011, 09:11
Posts: 2
Thanks Support.

I only tried IIndicatorContext.getPeriod() in onStart method.
There the return value is null.

Now i tried IIndicatorContext.getPeriod() in calculate method.
It works.

Thanks again
Ulawun


 

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