|
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.
Use of custom indicator |
eduardobasilio
|
Post subject: Use of custom indicator |
Post rating: 0
|
Posted: Mon 22 Feb, 2016, 01:41
|
|
User rating: 1
Joined: Sat 27 Apr, 2013, 16:18 Posts: 30 Location: Brazil,
|
Hello, support. I had posted an issue https://www.dukascopy.com/swiss/english ... 65&t=53496 and you had gently answered me with the complete indicator. But I still don't know how to use it. When I ask for indicator result, by using the following code snipet: Object[] ultimoZigZagTeste = indicators.calculateIndicator(instrument, period5, new OfferSide[] {sideTest}, "ZIGZAG_OBV", new AppliedPrice[] {AppliedPrice.CLOSE}, paramZigZag, Filter.WEEKENDS, intUltimoZigZagTeste, ultimaBarraAsk.getTime(), 0); it's returning an error... Could you help me also on this issue, please? See the hole code attached for more informations. Thank you in advance. Eduardo.
Attachments: |
ZigZagObvIndicatorStrategy.java [15.94 KiB]
Downloaded 101 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
API Support
|
Post subject: Re: Use of custom indicator |
Post rating: 0
|
Posted: Tue 01 Mar, 2016, 11:52
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
This code calls the indicator ITick tick = history.getLastTick(Instrument.EURUSD); long time = history.getBarStart(Period.ONE_MIN, tick.getTime()); Object[] out = indicators.calculateIndicator( Instrument.EURUSD, Period.ONE_MIN, new OfferSide[] {OfferSide.BID, OfferSide.BID}, "ZIGZAG_OBV", new AppliedPrice[] {AppliedPrice.CLOSE, AppliedPrice.CLOSE}, new Object[]{12, 5, 3}, Filter.WEEKENDS, 10, time, 0);
console.getOut().println(((double[]) out[0])[9] +" "+ ((double[]) out[1])[9]);
|
|
|
|
 |
eduardobasilio
|
Post subject: Re: Use of custom indicator |
Post rating: 0
|
Posted: Thu 03 Mar, 2016, 01:40
|
|
User rating: 1
Joined: Sat 27 Apr, 2013, 16:18 Posts: 30 Location: Brazil,
|
Thank you very much for your reply.
But it seems like the indicator is not working well. It should return obv values for specific bars where zigzag indicates the obv trend. Instead it's returning values that I cannot indentify wich ones they are.
Please refer to the code and test return attached.
Thanks once more.
Attachments: |
ZigZagObvIndicatorStrategy.java [15.72 KiB]
Downloaded 110 times
|
ZigZagObvIndicatorStrategy_03032016_002733.csv [5.38 KiB]
Downloaded 119 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
eduardobasilio
|
Post subject: Re: Use of custom indicator |
Post rating: 1
|
Posted: Tue 22 Mar, 2016, 17:16
|
|
User rating: 1
Joined: Sat 27 Apr, 2013, 16:18 Posts: 30 Location: Brazil,
|
Good afternoon.
It have been 19 days since my last post with no reply.
Do you please have any idea of when are you going to answer?
Thanks. Regards.
Eduardo.
|
|
|
|
 |
API Support
|
Post subject: Re: Use of custom indicator |
Post rating: 0
|
Posted: Mon 04 Apr, 2016, 09:51
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|