Dukascopy
 
 
Wiki JStore Search Login

Help For this Strategy
 Post subject: Help For this Strategy Post rating: 0   New post Posted: Wed 04 Nov, 2015, 16:30 
User avatar

User rating: 0
Joined: Wed 04 Nov, 2015, 15:55
Posts: 2
Location: Iran, Islamic Republic ofIran, Islamic Republic of
Hello
I read this forum from A to Z but I can't create my strategy right now.
I want to know, Is there anyone to help me to build my strategy?

My strategy is simple:

Bollinger band : SMA20 dev 2

Buy: if grean candle close > BB uper band ----> buy stop +2pip

sl: setup bar low -2pip
exit: if red bar close <bb upper band
--------------------------------------------------------------------
Sell: if red candle close< BB lower band-----> sell stop -2pip

sl: setup bar high +2pip

exit : if green bar close>bb lower band

-------------------------------------------------------

First of all I cant create this type of sl and tp

second I cant create pending order that trigger at high+2pip/Low-2pip

and third exit the trade


please help me

Thanks a lot for your help


 
 Post subject: Re: Help For this Strategy Post rating: 0   New post Posted: Thu 05 Nov, 2015, 11:10 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

Could you please attach the progress that you made so far ? (vfs file)
I recommend you to:
- first insert your indicators with the needed settings and "Get historical candle" block with shift 1
Quote:
Buy: if green candle close > BB upper band ----> buy stop +2pip


--> IF block : candle close (from get historical candle) > BB band upper band THEN insert pending open
to calculate the price, take the tick price + 0.0002 = Entry price, then inset this entry price into your pending price.

Quote:
sl: setup bar low -2pip
exit: if red bar close <bb upper band


In the pending open block, there is a setting section in the bottom, open it and set the parameter in PRICE;
use a calculation block to determine the SL price : low (from get historical candle) - 0.0002 = SL PRice then drag it into the pending block
For the exit you need :
1- Check the candle type if Red or Green: compare open and close prices in a IF block
2- IF Open>Close AND IF Close < BB upper band THEN insert Close and cancel position

Cheers


 
 Post subject: Re: Help For this Strategy Post rating: 0   New post Posted: Fri 06 Nov, 2015, 17:39 
User avatar

User rating: 0
Joined: Wed 04 Nov, 2015, 15:55
Posts: 2
Location: Iran, Islamic Republic ofIran, Islamic Republic of
Hi
Thanks a lot for your help, I tried your advice but I have some errors:

1)I cant use "Ge historical data" for close. There is no option in it that I can choose close.
Or when I first input Get Historical data then put IF Block with close candle and upperband, J forex give me an error like Null,or....

2)J forex can't close order

I attach my work
please see why I can't create this.

Thanks a lot for your great help


Attachments:
bbp.vfs [37.18 KiB]
Downloaded 189 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: Help For this Strategy Post rating: 0   New post Posted: Tue 10 Nov, 2015, 17:49 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

I'll get back to you asap...

Thanks for your patience.


 
 Post subject: Re: Help For this Strategy Post rating: 0   New post Posted: Mon 23 Nov, 2015, 14:56 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi and thanks for your patience again

Here is a quick example retracing your idea but I only made the long flow. I'll let finish that...
I also added some comments ...

Cheers


Attachments:
SampleBBandsIdea.vfs [42.28 KiB]
Downloaded 199 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: Help For this Strategy Post rating: 0   New post Posted: Mon 23 Nov, 2015, 15:03 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
One more detail:
You have to set the shift value to 1 instead of 0 in "Get historical candle" block.
with this the system can retrieve fully the OHLC data of the previous candle; if you use 0 i.e current candle, the close price/high and low cannot be determined and fixed permanently while the candle is still under construction. Hope you get the main idea.

Cheers


 

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