Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
Renko in JForex4 http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=200&t=51471 |
Page 1 of 1 |
Author: | jamesadk [ Tue 01 Jul, 2014, 20:21 ] |
Post subject: | Renko in JForex4 |
Good evening, I have been testing the jForex4 platform with some code I wrote in order to test the onFeedData for a Renko price feed (complete code supplied at the bottom). I wrote the strategy in regular JForex where it compiles and worked (i.e. it returned values for the MACD, Stoch and SMA indicators despite the MACD always being one brick behind due to this feedData problem) and I tested against regular JForex at the same time. However from my tests I can see that there remain problems with the onFeedData in the new jForex4 as the same strategy now does not return values for Stoch OR SMA. It is stated earlier in this topic that for the new system it is now neccessary to define the period of the renko feed as a tick based period "Period.TICK" which I wrote as: "public IFeedDescriptor feedDescriptor = new RenkoFeedDescriptor(Instrument.EURUSD,PriceRange.ONE_PIP,OfferSide.BID,Period.TICK);" I took this from the second constructor detailed here: https://www.dukascopy.com/client/javadoc/com/dukascopy/api/feed/util/RenkoFeedDescriptor.html However when you do this, the code fails to compile, (yet it compiles fine in regular JForex). For it to compile in JForex4 I have found you need to remove the "Period.TICK". Can you please show me how to define a renko feed based on tick data in JForex4? IMPORTANT!!: I have also noticed that there can be a VERY significant time delay in the output of messages from the strategy, sometimes in the order of a several minutes, and after a while the messages fail to come through at all. Whereas it's essentially instantaneous in regular JForex, always. This makes it impossible to check that the feedData is correct. Have a lot of the indicator definitions changed for JForex4 or is it a bug that the indicators now do not work? Thanks package jforex; |
Author: | API Support [ Wed 02 Jul, 2014, 13:51 ] |
Post subject: | Re: Renko in JForex4 |
jamesadk wrote: "public IFeedDescriptor feedDescriptor = new RenkoFeedDescriptor(Instrument.EURUSD,PriceRange.ONE_PIP,OfferSide.BID,Period.TICK);" This will get fixed with the next release. Please note that the period argument here stands for the base period, therefore only such periods are applicable:Period.createCustomPeriod(Unit.Day, x); //where x=1,2..7This will get described in our javadocs. |
Author: | jamesadk [ Wed 02 Jul, 2014, 16:20 ] |
Post subject: | Re: Renko in JForex4 |
OK. Thank you for your fast response, I don't quite understand your answer though.. Are you saying that in order to have a renko feed based on ticks it will be OK to use: public IFeedDescriptor feedDescriptor = new RenkoFeedDescriptor(Instrument.EURUSD,PriceRange.ONE_PIP,OfferSide.BID,Period.TICK); or will we have to use the an alteration of: Period.createCustomPeriod(Unit.Day, x); //where x=1,2..7 is this what you mean by it being explained in the javadoc? Also: what about the indicators in the code I supplied initially, will they work once the renko tick period has been released? And are the slow console messages all related to this? |
Author: | API Support [ Wed 02 Jul, 2014, 16:26 ] |
Post subject: | Re: Renko in JForex4 |
Add a new Renko feed type in the platform to understand what the base period stands for. |
Author: | jamesadk [ Thu 27 Nov, 2014, 19:56 ] |
Post subject: | Re: Renko in JForex4 |
Hi support: apologies for effectively re-opening a dormant old post, but given the major overhaul in the renko calculation method in Demo (Version 2.42.2) I am now longer getting feeds through the system at the correct time (I use renko bricks calculated on ticks - so the data feed should come through immediately) using: public IFeedDescriptor feedDescriptor = new RenkoFeedDescriptor(Instrument.EURUSD,PriceRange.TWO_PIPS,OfferSide.BID); yet when I use: public IFeedDescriptor feedDescriptor = new RenkoFeedDescriptor(Instrument.EURUSD,PriceRange.TWO_PIPS,OfferSide.BID,Period.TICK); It doesn't work either. Please can you tell me the correct iteration of the RenkoFeedDescriptor to now use. I have tried "createCustomPeriod" as previously outlined but can't get that to work. Many thanks |
Page 1 of 1 |