Dukascopy
 
 
Wiki JStore Search Login

Close a position about upper Bollinger Band
 Post subject: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Tue 23 Apr, 2013, 11:34 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Hi Guys
Can you show me how you close a open position for example:
When the tick crosses the upper Bollinger Band + 5 pips, then close the position. Thank you very much ;)
Chris


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Tue 23 Apr, 2013, 12:56 
Visual JForex expert at Dukascopy
User avatar

User rating: 4
Joined: Fri 06 Feb, 2009, 16:34
Posts: 130
DEMO3jZNEC wrote:
Can you show me how you close a open position for example:
When the tick crosses the upper Bollinger Band + 5 pips, then close the position. Thank you very much ;)

Can you be more specific? I would prefer to give more small example, instead creating the whole strategy :).
We think it will be more valuable, if you create by yourself the strategies.
We can give you the strategy example, but we need to understand what the problem of misunderstanding.
So what the main problem:
1) to get tick cross with upper BB ?
2) to add + 5 pips to the if check?
3) to close the specific position after this check?


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Tue 23 Apr, 2013, 13:45 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Sorry for my not clearly understandable question. I Try again. :P
I want the following funktion:
When the tick is more as the upper BB 5 pips then close the position.
My main problem is:
How can i check this Point?

Is that clear for you :? ?

thanks for your greatful help
Chris


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Tue 23 Apr, 2013, 14:16 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Now You have the right questions?
1: Check the amount by tick upper BB
2: add 5 pips to the upper BB amount by each check -> example: amount upper BB = 1.3250 + 5 Pips --> 1.3255 -> close the open position
3: if tick goes over 1.3255 then close the position

Its clear for you what i mean?
Thanks
Chris


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Wed 24 Apr, 2013, 10:51 
Visual JForex expert at Dukascopy
User avatar

User rating: 4
Joined: Fri 06 Feb, 2009, 16:34
Posts: 130
Dear Chris, we understand the idea of what you want to do, but we misunderstand why you cant do it.
It will be usefull information for us. Anyway, here the example for you:


Attachments:
BB5PipsTick.vfs [31.78 KiB]
Downloaded 407 times
BBands5Pips.PNG [102.81 KiB]
Downloaded 576 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: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Thu 25 Apr, 2013, 07:11 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Hy
At first thanks for your great help :!: . I am a beginner and do not understand yet diverse functions. So I'm learning with the hope of your support.
I added your "closing" example in my strategy. Opening a position working, but the close does not work. Can you maybe show me how I need to include your "close" example in open (buy) - position in the workflow?
thanks a lot
Chris


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Thu 25 Apr, 2013, 11:11 
Visual JForex expert at Dukascopy
User avatar

User rating: 4
Joined: Fri 06 Feb, 2009, 16:34
Posts: 130
DEMO3jZNEC wrote:
I added your "closing" example in my strategy. Opening a position working, but the close does not work. Can you maybe show me how I need to include your "close" example in open (buy) - position in the workflow?

Sorry, but we suppose, that you are is incorrect. The close is work. The strategy dont open positions, but close by condition.
See the attached example, we add a first time Buy position without SL and TP, and the strategy close it (default params for Historical Tester, Intraday).
Also you can check it on "Close " block the breakpoint and to check it also with Historical Tester, when the block will pause the strategy.


Attachments:
BB5PipsTick.vfs [37.57 KiB]
Downloaded 347 times
BBands5Pips_2.PNG [96.99 KiB]
Downloaded 493 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: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Sun 28 Apr, 2013, 22:54 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Yes - it works - great - thanks a lot.
Now i have another question. I built into the strategy that only one open position is possible. Now I would like to additionally that the time when the position is closed, 15 minutes no trades can be made. How can I build this in the Strategy?
thanks for your support.
Chris ;)


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Mon 29 Apr, 2013, 10:44 
Visual JForex expert at Dukascopy
User avatar

User rating: 4
Joined: Fri 06 Feb, 2009, 16:34
Posts: 130
DEMO3jZNEC wrote:
Now i have another question. I built into the strategy that only one open position is possible. Now I would like to additionally that the time when the position is closed, 15 minutes no trades can be made. How can I build this in the Strategy?

You need to store the closed position time with variable, Date and Time type.
Than to calculate the difference check (15 minutes) from current server time (it can be get from any Start Point Event, like as Last Candle time or Last Tick time). See the examples:


Attachments:
timePeriodCheck.vfs [19.75 KiB]
Downloaded 328 times
timePeriodCheck.PNG [169.34 KiB]
Downloaded 516 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: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Tue 30 Apr, 2013, 07:25 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Hello support.
Thank you. I tried to incorporate it into my strategy. Unfortunately, until now without success. I have made ​​a mistake?
Image


Attachments:
Timeperiode.PNG [70.16 KiB]
Downloaded 1302 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: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Tue 30 Apr, 2013, 10:45 
Visual JForex expert at Dukascopy
User avatar

User rating: 4
Joined: Fri 06 Feb, 2009, 16:34
Posts: 130
DEMO3jZNEC wrote:
Thank you. I tried to incorporate it into my strategy. Unfortunately, until now without success. I have made ​​a mistake?

Hello. From screen it looks like ok, maybe better if can attach your strategy for our check?


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Wed 01 May, 2013, 23:02 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Hi
Thanks for your Help.


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Wed 01 May, 2013, 23:06 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Please find attached the file


Attachments:
King_II.vfs [59.82 KiB]
Downloaded 322 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: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Thu 02 May, 2013, 09:53 
Visual JForex expert at Dukascopy
User avatar

User rating: 4
Joined: Fri 06 Feb, 2009, 16:34
Posts: 130
We found the bug, lastCloseTime variable, needs to be set the Start value.


Attachments:
King_II.vfs [61.87 KiB]
Downloaded 343 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: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Thu 02 May, 2013, 18:17 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Hi thanks a lot. But - you has no last Close Time variable in the Calculation Express. Is this correct?
Thanks
Chris
Image


Attachments:
130502.PNG [37.84 KiB]
Downloaded 1202 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: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Fri 03 May, 2013, 11:49 
Visual JForex expert at Dukascopy
User avatar

User rating: 4
Joined: Fri 06 Feb, 2009, 16:34
Posts: 130
DEMO3jZNEC wrote:
Hi thanks a lot. But - you has no last Close Time variable in the Calculation Express. Is this correct?

No, it is not correct. The Close Time variable should be there.


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Sat 04 May, 2013, 00:00 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Hi
It does not work correctly :( . Are you sure that the start date in the Last close time variable changes after the first closing position? He still gives me several positions within 15 minutes.
Thank you for your help


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Sun 05 May, 2013, 18:28 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
As you can see - after a close Position - it opens a new Position within 15 Min. It doesn't work.
Thanks for your help
Image


Attachments:
15minutes.PNG [31.05 KiB]
Downloaded 1115 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: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Fri 10 May, 2013, 09:42 
User avatar

User rating: 0
Joined: Wed 14 Mar, 2012, 19:04
Posts: 46
Location: Switzerland, Kloten
Hello Support
Do you have a answer to my problem please?
Thank you :!:


 
 Post subject: Re: Close a position about upper Bollinger Band Post rating: 0   New post Posted: Mon 13 May, 2013, 13:59 
Visual JForex expert at Dukascopy
User avatar

User rating: 4
Joined: Fri 06 Feb, 2009, 16:34
Posts: 130
DEMO3jZNEC wrote:
Hello Support
Do you have a answer to my problem please?
Thank you :!:

We will fix soon one bug and with this bug fix, we will answer to you.


 

Jump to:  

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