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.

Renko Moving Average
 Post subject: Renko Moving Average Post rating: 0   New post Posted: Mon 03 Dec, 2012, 10:05 

User rating: 0
Joined: Mon 03 Dec, 2012, 09:55
Posts: 30
Hi

I am new .. just stated with JForex. I want to calculate a moving average and bollinger bands on Renko bars but I cannot see in the documentation a method to do it? Is it possible ?

Many Thanks

Paul


 
 Post subject: Re: Renko Moving Average Post rating: 0   New post Posted: Mon 03 Dec, 2012, 11:41 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See:
https://www.dukascopy.com/wiki/#Indicator_Calculation/Universal_price_feed


 
 Post subject: Re: Renko Moving Average Post rating: 0   New post Posted: Mon 03 Dec, 2012, 11:55 

User rating: 0
Joined: Mon 03 Dec, 2012, 09:55
Posts: 30
Hi

Great thanks ... so I would set up the feed descriptor in my start up method ... and use the listener as my on tick method essentially? And would I get an onBar event for this?

Thanks again

Paul


 
 Post subject: Re: Renko Moving Average Post rating: 0   New post Posted: Mon 03 Dec, 2012, 12:08 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
murfinp wrote:
Great thanks ... so I would set up the feed descriptor in my start up method ... and use the listener as my on tick method essentially?
In a sense that onFeedData executes whenever a new ITimedData element gets formed - then yes.
murfinp wrote:
And would I get an onBar event for this?
No, you only need the IFeedListener.onFeedData unless you want to use both time aggregation feeds (i.e. one minute candles) and renkos.


 
 Post subject: Re: Renko Moving Average Post rating: 0   New post Posted: Mon 03 Dec, 2012, 12:15 

User rating: 0
Joined: Mon 03 Dec, 2012, 09:55
Posts: 30
Hi

Sorry I an not quite clear so the onFeeddata get called on every Tick or only on when a new renko is formed ? I am thinking I would use the Renko feed listener to identify a new Renko bar (in effect it is called when a new renko is formed [a renko feed!]) and I would use the tick event to handle individual ticks ... so in effect the renko listener mimicks an onBar ???

Thanks again


 
 Post subject: Re: Renko Moving Average Post rating: 0   New post Posted: Mon 03 Dec, 2012, 12:25 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
murfinp wrote:
Sorry I an not quite clear so the onFeeddata get called on every Tick or only on when a new renko is formed ?
The latter, see:
https://www.dukascopy.com/client/javadoc/com/dukascopy/api/feed/IFeedListener.html
See the following examples, launch them both with live and historical data to see how they work:
https://www.dukascopy.com/wiki/#Chart_feeds/Subscribe_to_a_feed
murfinp wrote:
so in effect the renko listener mimicks an onBar ???
Partially - renko listener is more precise, in the sense that IStrategy.onBar fires on a new bar for all subscribed instruments on all periods that have just been completed (e.g. at 12:00 completes not only 1H, but also 4H, 1M, 5M, 10M, 15M, 30M bars), but IFeedListener.onFeedData only fires on the completion of the particular ITimedData element of the designated IFeedDescriptor.


 
 Post subject: Re: Renko Moving Average Post rating: 0   New post Posted: Mon 03 Dec, 2012, 12:27 

User rating: 0
Joined: Mon 03 Dec, 2012, 09:55
Posts: 30
Hi

Great that is really helpful ... much appreciated ....

Best

Paul


 

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