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.

CDL indicator to RENKO bar
 Post subject: CDL indicator to RENKO bar Post rating: 0   New post Posted: Wed 27 Jun, 2012, 21:58 

User rating: 0
Joined: Thu 03 Nov, 2011, 21:46
Posts: 68
Location: Russian Federation,
please help:
how make this CDL indicator adapted for RENKO bar
example:
I want know Prev bar, not current

double[][] cdl = calculateIndicator("SPININGTOP", feedDescr, appliedPrice, new Object[]{}, 1,bar.getTime(), 1);
if(cdl[0][0] == 100 ) {
buy = true;

if(cdl[0][0] == -100 ) {
sell = true;

this OK ?
please advise

thank you


 
 Post subject: Re: CDL indicator to RENKO bar ? Post rating: 0   New post Posted: Thu 28 Jun, 2012, 07:22 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See:
https://www.dukascopy.com/wiki/#Candlestick_pattern_indicators/Use_hammer_pattern
change the parameters instrument, period with your feed descriptor.


 
 Post subject: Re: CDL indicator to RENKO bar ? Post rating: 0   New post Posted: Thu 28 Jun, 2012, 09:24 

User rating: 0
Joined: Thu 03 Nov, 2011, 21:46
Posts: 68
Location: Russian Federation,
maxi wrote:
please help:
how make this CDL indicator adapted for RENKO bar
example:
I want know Prev bar, not current

double[][] cdl = calculateIndicator("SPININGTOP", feedDescr, appliedPrice, new Object[]{}, 1,bar.getTime(), 1);
if(cdl[0][0] == 100 ) {
buy = true;

if(cdl[0][0] == -100 ) {
sell = true;

this OK ?
please advise

thank you


I asked to help here.
I didn't ask to give page.
you can change code above, for the correct ?


 
 Post subject: Re: CDL indicator to RENKO bar ? Post rating: 0   New post Posted: Thu 28 Jun, 2012, 09:29 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
please provide full example strategy


 
 Post subject: Re: CDL indicator to RENKO bar ? Post rating: 0   New post Posted: Thu 28 Jun, 2012, 09:38 

User rating: 0
Joined: Thu 03 Nov, 2011, 21:46
Posts: 68
Location: Russian Federation,
API Support wrote:
please provide full example strategy


just : I ask to insert this indicator to this strategy: BullPowerStrat
viewtopic.php?f=112&t=47542

change this :
for(double[] bullP : bullPower) {
if(bullP[0] < 0) {
buySign = false;
break;
}
}

for(double[] bearP : bearPower) {
if(bearP[0] > 0) {
sellSign = false;
break;
}
}

to new Pattern CDL
if(cdl[0][0] == 100 ) {
buy = true;

if(cdl[0][0] == -100 ) {
sell = true;


also:

You can add trailing
and hours for trading
in this code ?

thank you for help

P.S.

I test this strategy in demo . and I see message
20:00:01 java.lang.ClassCastException: java.lang.Double cannot be cast to [D @ jforex.strategies.indicators.BullPowerStrat.a(Unknown Source)

after this message, strategy make STOP for work
08:00:49 Stopping "BullPowerStrat" strategy at 2012-06-28 08:00:49.153 GMT on the local computer


please advie with this error.


 
 Post subject: Re: CDL indicator to RENKO bar Post rating: 0   New post Posted: Tue 10 Jul, 2012, 14:19 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
There is no such indicator "SPININGTOP" in jforex


 
 Post subject: Re: CDL indicator to RENKO bar Post rating: 0   New post Posted: Tue 10 Jul, 2012, 15:09 

User rating: 0
Joined: Thu 03 Nov, 2011, 21:46
Posts: 68
Location: Russian Federation,
API Support wrote:
There is no such indicator "SPININGTOP" in jforex



You can add this indicator
or any other from a pattern
Thank you


Attachments:
sp.jpg [51.51 KiB]
Downloaded 508 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: CDL indicator to RENKO bar Post rating: 0   New post Posted: Wed 11 Jul, 2012, 08:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please, briefly describe what is your trading strategy with this indicator.


 
 Post subject: Re: CDL indicator to RENKO bar Post rating: 0   New post Posted: Wed 11 Jul, 2012, 08:41 

User rating: 0
Joined: Thu 03 Nov, 2011, 21:46
Posts: 68
Location: Russian Federation,
API Support wrote:
Please, briefly describe what is your trading strategy with this indicator.





change this :
for(double[] bullP : bullPower) {
if(bullP[0] < 0) {
buySign = false;
break;
}
}

for(double[] bearP : bearPower) {
if(bearP[0] > 0) {
sellSign = false;
break;
}
}

to new Pattern CDL
if(cdl[0][0] == 100 ) {
buy = true;

if(cdl[0][0] == -100 ) {
sell = true;


also:

You can add trailing
and hours for trading
in this code ?

thank you for help

P.S.

I test this strategy in demo . and I see message
20:00:01 java.lang.ClassCastException: java.lang.Double cannot be cast to [D @ jforex.strategies.indicators.BullPowerStrat.a(Unknown Source)

after this message, strategy make STOP for work
08:00:49 Stopping "BullPowerStrat" strategy at 2012-06-28 08:00:49.153 GMT on the local computer


please advie with this error.


 
 Post subject: Re: CDL indicator to RENKO bar Post rating: 0   New post Posted: Mon 16 Jul, 2012, 13:26 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Submit a new strategy request in this forum only.
Any programming questions must be asked in "Knowledge Base".


 

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