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.

RangeBarIndicatorsCandles problem
 Post subject: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Wed 23 Nov, 2011, 16:13 

User rating: 0
Joined: Tue 22 Nov, 2011, 12:47
Posts: 130
Location: United States,
hi,

I tried compiling in JForex the example from the Wiki (RangeBars with indicators) found here -

https://www.dukascopy.com/wiki/index.php?title=Range_Bars_with_indicators

I get the following compilation errors -

The method subscribeToRangeBarFeed(Instrument, OfferSide, PriceRange, IRangeBarFeedListener) in the type IContext is not applicable for the arguments (Instrument, OfferSide, PriceRange, RangeBarIndicatorsCandles.MyRangeBarFeedListener)

15:07:36 IRangeBar cannot be resolved to a type

In eclipse it compiles just fine. Any clue?


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Wed 23 Nov, 2011, 17:46 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The example has been fixed. Also notice that there is a java file available for dowload underneath the example source code.


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Wed 23 Nov, 2011, 20:29 

User rating: 0
Joined: Tue 22 Nov, 2011, 12:47
Posts: 130
Location: United States,
ok. now the code wont compile in Eclipse but is compiled ok in JForex. It seems to be the change of location of IRangeBar and IRangeBarFeedListener.


So what should I do in order to sync both Eclipse and JForex on the same version of the API?


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Thu 24 Nov, 2011, 08:48 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
see:
viewtopic.php?f=65&t=35945&p=46562


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Thu 24 Nov, 2011, 09:19 

User rating: 0
Joined: Tue 22 Nov, 2011, 12:47
Posts: 130
Location: United States,
yes thank you for the clarification.

But how should I both develop and deploy without changing the code on each deploy?

what SDK version should I be using in Ecplise in order to be in line with the JForex UI?

also - where do I get this SDK from? I guess it is in your archive somewhere?

thanks!!
cb888trader.


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Thu 24 Nov, 2011, 09:30 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
cb888trader wrote:
But how should I both develop and deploy without changing the code on each deploy?
That is the inconvenience that we are working to solve. We plan to publish Standalone version for JForex API 2.6.38 so that no such import adjustments are necessary.
cb888trader wrote:
what SDK version should I be using in Ecplise in order to be in line with the JForex UI?
If you mean JForex Standalone version, then as zip only the latest one is available (for JForex-API 2.6.49).
cb888trader wrote:
also - where do I get this SDK from? I guess it is in your archive somewhere?
See the first answer.


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Thu 24 Nov, 2011, 10:09 

User rating: 0
Joined: Tue 22 Nov, 2011, 12:47
Posts: 130
Location: United States,
Oh.. :?

Do yo have a timeline for such a release?

Thanks for all the help!!


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Thu 24 Nov, 2011, 10:51 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
cb888trader wrote:
Do yo have a timeline for such a release?
As soon as possible.


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Fri 25 Nov, 2011, 02:52 

User rating: 0
Joined: Fri 25 Nov, 2011, 02:49
Posts: 17
Location: Malaysia,
I must be missing something? I get the following errors when trying to compile in jforex


Do I need to download something else??


2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 The method subscribeToRangeBarFeed(Instrument, OfferSide, PriceRange, RangeBarIndicatorsCandles.MyRangeBarFeedListener) is undefined for the type IContext
2011-11-25 01:21:46 ^^^^^^^^^^^^^^^^^^^^^^^
2011-11-25 01:21:46 context.subscribeToRangeBarFeed(Instrument.EURUSD, OfferSide.BID, rangeBarPriceRange, new MyRangeBarFeedListener());
2011-11-25 01:21:46 14. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 100)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^^^^
2011-11-25 01:21:46 prevRangeBar = bar;
2011-11-25 01:21:46 13. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 82)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^^^^
2011-11-25 01:21:46 if (useEma) makeEMAOrder(firstCandleTime, lastCandleTime, prevRangeBar.getOpen(), prevRangeBar.getClose());
2011-11-25 01:21:46 12. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 77)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^^^^
2011-11-25 01:21:46 if (useEma) makeEMAOrder(firstCandleTime, lastCandleTime, prevRangeBar.getOpen(), prevRangeBar.getClose());
2011-11-25 01:21:46 11. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 77)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^^^^
2011-11-25 01:21:46 lastCandleTime = history.getBarStart(RangeBarIndicatorsCandles.this.period, Math.min(curTime,prevRangeBar.getEndTime()));
2011-11-25 01:21:46 10. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 74)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^^^^
2011-11-25 01:21:46 firstCandleTime = history.getBarStart(RangeBarIndicatorsCandles.this.period, prevRangeBar.getTime());
2011-11-25 01:21:46 9. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 73)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^^^^
2011-11-25 01:21:46 prevRangeBar = bar;
2011-11-25 01:21:46 8. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 65)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^^^^
2011-11-25 01:21:46 if(prevRangeBar == null){
2011-11-25 01:21:46 7. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 64)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^
2011-11-25 01:21:46 public void onBar(Instrument instrument, OfferSide offerSide, PriceRange priceRange, IRangeBar bar) {
2011-11-25 01:21:46 6. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 59)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 The method onBar(Instrument, OfferSide, PriceRange, IRangeBar) of type RangeBarIndicatorsCandles.MyRangeBarFeedListener must override or implement a supertype method
2011-11-25 01:21:46 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-11-25 01:21:46 public void onBar(Instrument instrument, OfferSide offerSide, PriceRange priceRange, IRangeBar bar) {
2011-11-25 01:21:46 5. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 59)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBarFeedListener cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^^^^^^^^^^^^^
2011-11-25 01:21:46 class MyRangeBarFeedListener implements IRangeBarFeedListener{
2011-11-25 01:21:46 4. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 57)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 IRangeBar cannot be resolved to a type
2011-11-25 01:21:46 ^^^^^^^^^
2011-11-25 01:21:46 private IRangeBar prevRangeBar;
2011-11-25 01:21:46 3. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 51)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 The import com.dukascopy.api.listener cannot be resolved
2011-11-25 01:21:46 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2011-11-25 01:21:46 import com.dukascopy.api.listener.IRangeBarFeedListener;
2011-11-25 01:21:46 2. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 12)
2011-11-25 01:21:46 ----------
2011-11-25 01:21:46 The import com.dukascopy.api.bar cannot be resolved
2011-11-25 01:21:46 ^^^^^^^^^^^^^^^^^^^^^
2011-11-25 01:21:46 import com.dukascopy.api.bar.IRangeBar;
2011-11-25 01:21:46 1. ERROR in /var/folders/fh/71c6m11x2hz8k8zccns5b_vh0000gn/T/jfxide/tmp/RangeBarIndicatorsCandles.java (at line 10)


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Fri 25 Nov, 2011, 08:24 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
In which JForex version do you get the exception?


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Fri 25 Nov, 2011, 08:33 

User rating: 0
Joined: Fri 25 Nov, 2011, 02:49
Posts: 17
Location: Malaysia,
i am using 2.12.21 api ver 2.6.33


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Fri 25 Nov, 2011, 09:00 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Range bars are available with JForex API 2.6.38 (current DEMO version), up till then you can only form range bars by yourself in your strategy. Similarly as one can form custom period by himself, see:
viewtopic.php?f=65&t=43297&p=56450


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Fri 25 Nov, 2011, 09:13 

User rating: 0
Joined: Fri 25 Nov, 2011, 02:49
Posts: 17
Location: Malaysia,
ok thanks I will have a look and try that


 
 Post subject: Re: RangeBarIndicatorsCandles problem Post rating: 0   New post Posted: Thu 01 Dec, 2011, 15:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
API Support wrote:
cb888trader wrote:
Do yo have a timeline for such a release?
As soon as possible.
See:
viewtopic.php?f=113&t=44129


 

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