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.

A few questions on Jforex chart bid ask
 Post subject: A few questions on Jforex chart bid ask Post rating: 0   New post Posted: Mon 22 Nov, 2010, 16:08 

User rating: -
I want ask

Is the price line in JFOREX shown as the bid or ask as default?

Can this be changed to show either one?

Is there an JFOREX indi to show bid/ask separately on chart in the corner out there?

Thanks!


 
 Post subject: Re: A few questions on Jforex chart bid ask Post rating: 0   New post Posted: Tue 23 Nov, 2010, 09:45 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,

By default chart price shown as bid, you can change it by using drop down list, but period can not be ticks.
You can write and draw on chart inside the strategy, for example if you need to write ask price in the chart left corner and draw ask price line, please consider the following code:
    IChart chart = context.getChart(Instrument.EURUSD);
    public void onTick(Instrument instrument, ITick tick) throws JFException  {
       if (instrument.equals(Instrument.EURUSD)) {
          chart.setCommentColor(Color.GREEN);
          chart.comment(String.valueOf(tick.getAsk()));
          chart.draw("hLine", IChart.Type.HLINE, tick.getTime(),tick.getAsk() );
       }
    }

For more details about how to draw on the chart take a look at the following JForex Wiki page https://www.dukascopy.com/wiki/index.php/IChart


 

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