Dukascopy
 
 
Wiki JStore Search Login

Strategy Help
 Post subject: Strategy Help Post rating: 0   New post Posted: Wed 31 Jul, 2013, 08:40 

User rating: 0
Joined: Fri 12 Jul, 2013, 12:21
Posts: 57
Hi Dirk, Vadim and others,

I am trying to compile a very simple startegy. In short:
I look at weekly candles.
When a new Candle opens, It first looks at last weeks candle. It calculates the hight of the candle and take 30% of this height in pips.
This pip amount will be our pending order from the open of this week.

So lets say:
Last week Candle Low: 1.3000
Last week Candle High: 1.3100
So the candle hight = 100 pips. 30 % is 30 pips.

When This weeks candle opens at 1.3150 I want to place a STOP BUY at 1.3150 + 30 pips, so 1.3180
and a STOP SELL at 1.3150-30 pips = 1.3120

The stop loss is calculated also based on the height of last weeks candle, only this time we take 10%.
So for the STOP BUY, the Stoploss will be set 10 pips below the open = 1.3140
for the STOP SELL, the stoploss will be 10 pips above the open = 1.3160

I want the position to close at the open of NEXT weeks candle and the cycle starts over.

I have made this so far, but it does NOT work at all.....
Can you see what I did wrong?


Attachments:
FIRST.vfs [53.38 KiB]
Downloaded 309 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: Strategy Help Post rating: 0   New post Posted: Wed 31 Jul, 2013, 15:53 

User rating: 0
Joined: Fri 12 Jul, 2013, 12:21
Posts: 57
Hi Vadim,

do you have any idea what I did wrong?

thanks again


 
 Post subject: Re: Strategy Help Post rating: 0   New post Posted: Wed 31 Jul, 2013, 16:02 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Greetings.

I'v made some adjustments on the strategy, take a look:
download/file.php?mode=view&id=4167

But one thing is missing, how positions should be closed in profit?


Attachments:
FIRSTv2.vfs [43.37 KiB]
Downloaded 377 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: Strategy Help Post rating: 0   New post Posted: Wed 31 Jul, 2013, 16:12 

User rating: 0
Joined: Fri 12 Jul, 2013, 12:21
Posts: 57
Vadim,

Thank you so much for the help! However, I tried your modified file and it does NOT enter enypositions. Did it work on a backtest at your computer?
Here, nothing happens. Not even a pending positions is created! :-(

Any idea ?

And yes, the positions in profit needs to be closed on the open of next weeks candle..

Thanks alot.. I really don't know whta is the problem here.


 
 Post subject: Re: Strategy Help Post rating: 0   New post Posted: Wed 31 Jul, 2013, 16:22 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
So at the end of the week you want to close all open and pending positions, then we will use AllPositions variable in closing cycle.

But if one position open then opposite pending order should be canceled. So that would be done on Trade Event .

download/file.php?mode=view&id=4168


Attachments:
FIRSTv2.vfs [44.59 KiB]
Downloaded 370 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: Strategy Help Post rating: 0   New post Posted: Wed 31 Jul, 2013, 16:31 

User rating: 0
Joined: Fri 12 Jul, 2013, 12:21
Posts: 57
Thanks again for the help!

However, the system still does not enter a position. And if it enters, it basically exits IMMEDIATELY.... I have 4 timesa 0.8 pip loose trade, but there are no pending positions anywhere.

Try to run it on your computer, because I don;t think what you made works :-(
Just one addition, I want the position to be closed upon the OPEN of the next weekly candle.


 
 Post subject: Re: Strategy Help Post rating: 0   New post Posted: Wed 29 Jan, 2014, 22:39 
User avatar

User rating: 0
Joined: Sun 19 Feb, 2012, 12:48
Posts: 10
Location: Portugal, Coimbra
Hello,

After converter mq4 strategy, I have this message:

java.lang.NullPointerException @ jforex.converted.Squared.f0_5(Squared.java:844)

Can someone help me?

Many Thanks


Attachments:
Squared.jfx [36.28 KiB]
Downloaded 108 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: Strategy Help Post rating: 0   New post Posted: Thu 30 Jan, 2014, 10:35 
User avatar

User rating: 0
Joined: Sun 19 Feb, 2012, 12:48
Posts: 10
Location: Portugal, Coimbra
I need your help, please.

Many Thanks


 
 Post subject: Re: Strategy Help Post rating: 0   New post Posted: Thu 30 Jan, 2014, 16:10 
Visual JForex expert at Dukascopy
User avatar

User rating: 27
Joined: Fri 03 May, 2013, 18:25
Posts: 366
Location: GermanyGermany
Greetings!

Please address those kind of questions here: viewforum.php?f=124

(I cannot move single posts into a certain section)

Thank you!


 

Jump to:  

cron
  © 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