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.

open chart event listener
 Post subject: open chart event listener Post rating: 0   Post Posted: Mon 15 Feb, 2016, 11:27 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
Hello support,

I need in strategy know immediately about new opened chart in platform (manually). Is any listener for this event. I didn’t find any in documentation. I want to draw S/R levels in chart.

Could you help me? Thank you.


 
 Post subject: Re: open chart event listener Post rating: 0   Post Posted: Tue 16 Feb, 2016, 13:58 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
If you don't plan to learn to write it yourself then we would suggest using services of external programmers:
https://www.dukascopy.com/fxcomm/member ... am_service


 
 Post subject: Re: open chart event listener Post rating: 0   Post Posted: Wed 17 Feb, 2016, 08:05 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
Hello support,

this is misunderstanding. I made strategy and strategy need to know when I open manually new chart to draw in this chart S/R levels.

I need java code listener advise. Thank you.


 
 Post subject: Re: open chart event listener Post rating: 0   Post Posted: Wed 17 Feb, 2016, 13:12 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Here is an exmaple

int lastLength = 0;

IChart getNewChart() {
    IChart lastActiveChart = null;
    int length = context.getCharts().size();
    if(length != lastLength) {
        lastActiveChart = context.getLastActiveChart();
    }
    lastLength = length;
}


 
 Post subject: Re: open chart event listener Post rating: 0   Post Posted: Mon 22 Feb, 2016, 18:51 

User rating: 1
Joined: Mon 27 Feb, 2012, 22:49
Posts: 119
Location: Czech Republic,
But this is not good solution. Last active chart is not always last opened chart.
Chart open listener is better and almost the must.


 

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