|
Attention! Read the forum rules carefully before posting a topic.
Submit JForex API bug reports in this forum only. Submit Converter issues in Converter Issues. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
IChart getSelectedPeriod for user defined period |
pminc74
|
Post subject: IChart getSelectedPeriod for user defined period |
Post rating: 0
|
Posted: Wed 05 Aug, 2020, 15:02
|
|
User rating: 3
Joined: Fri 15 Nov, 2019, 12:54 Posts: 16 Location: Poland,
|
Hi,
I've defined new price based period with value of 100 pips.
In my plugin code I'm trying to get currently selected period in the active chart.
IChart chart; // <- pointing to active chart
Period period = chart.getSelectedPeriod();
The getSelectedPeriod() method returns valid information for all interval-based periods, but for other periods (like price-based) it always returns "7 Days".
How can I get the valid price-based period data?
Best regards, Marcin
|
|
|
|
|
pminc74
|
Post subject: Re: IChart getSelectedPeriod for user defined period |
Post rating: 0
|
Posted: Thu 06 Aug, 2020, 09:58
|
|
User rating: 3
Joined: Fri 15 Nov, 2019, 12:54 Posts: 16 Location: Poland,
|
I've found the way to access this information - from feedDescriptor object:
IFeedDescriptor feedDescriptor = chart.getFeedDescriptor(); DataType dataType = feedDescriptor.getDataType(); //PRICE_RANGE_AGGREGATION PriceRange priceRange = feedDescriptor.getPriceRange(); // 100_PIPS
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|