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.

Use of custom indicator
 Post subject: Use of custom indicator Post rating: 0   New post 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.
 
 Post subject: Re: Use of custom indicator Post rating: 0   New post Posted: Tue 01 Mar, 2016, 11:52 
User avatar

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]);


 
 Post subject: Re: Use of custom indicator Post rating: 0   New post 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.
 
 Post subject: Re: Use of custom indicator Post rating: 1   New post 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.


 
 Post subject: Re: Use of custom indicator Post rating: 0   New post Posted: Mon 04 Apr, 2016, 09:51 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
In this forum we try to focus on JForex API issues. There are a number of external programmers who can program the strategy for you:
https://www.dukascopy.com/fxcomm/member ... am_service


 

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