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.

Absolute index in the drawOutput method
 Post subject: Absolute index in the drawOutput method Post rating: 0   New post Posted: Wed 18 May, 2011, 21:35 

User rating: 0
Joined: Wed 18 May, 2011, 21:14
Posts: 4
Location: Switzerland, Biel
Hi,

Is it possible to know the absolute position of the index of output buffer (defined in OutputParameterInfo []) in the method drawOutput?
(Sorry for my bad English)

Thank you for your reply...

regards
Sacha


 
 Post subject: Re: Absolute index in the drawOutput method Post rating: 0   New post Posted: Fri 20 May, 2011, 07:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You can use int outputIdx (which is the index of the output parameter).
...
private OutputParameterInfo[] outputParameterInfos = ...;
...
@Override
public Point drawOutput(
  Graphics g,
  int outputIdx,
  Object values,
  Color color,
  Stroke stroke,
  IIndicatorDrawingSupport indicatorDrawingSupport,
  List<Shape> shapes,
  Map<Color, List<Point>> handles) {
   ...
   String name = outputParameterInfos[outputIdx].getName();
   ...
}


 

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