Dukascopy
 
 
Wiki JStore Search Login

4hr strategy help please
 Post subject: 4hr strategy help please Post rating: 0   New post Posted: Sun 19 Nov, 2017, 16:48 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Hi I am very new to visual JForex and am having trouble setting up a strategy. What I want to do is set up a strategy that can identify the following situation:

1. The last four hour candle breaks above the previous four hour candle high but closes below it.
2. When this condition is met I would like to enter on the current candle at a 50% retracement of the last 4 hour candle
3. On entry the stop should be 1pip above the last four hour high
4. Move stop to break even +1 when 20 pips profit is reached and take profit at 50 pips

Can someone please give me a helping hand? I have read the manual but still struggling, many thanks


 
 Post subject: Re: 4hr strategy help please Post rating: 1   New post Posted: Mon 20 Nov, 2017, 17:06 
Visual JForex expert at Dukascopy
User avatar

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

Here is an example. Please test and let me know if you have any question.

Cheers


Attachments:
ABaj_V1.vfs [44.12 KiB]
Downloaded 235 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: 4hr strategy help please Post rating: 0   New post Posted: Tue 21 Nov, 2017, 02:16 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
That is so helpful, thank you! I am just waiting for a pin number so I can test it.


 
 Post subject: Re: 4hr strategy help please Post rating: 0   New post Posted: Tue 21 Nov, 2017, 12:22 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Hi I am attempting to run the strategy but the bars fail to load on the chart. The only change I made was the instrument which I changed from eur/usd to aud/usd. I am running it on demo and have used historical data. Any ideas?


 
 Post subject: Re: 4hr strategy help please Post rating: 1   New post Posted: Tue 21 Nov, 2017, 15:07 
Visual JForex expert at Dukascopy
User avatar

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

In which platform it failed to load bars ? was this in JForex ? can you paste a screenshot with your test default parameters please.


 
 Post subject: Re: 4hr strategy help please Post rating: 1   New post Posted: Tue 21 Nov, 2017, 15:22 
Visual JForex expert at Dukascopy
User avatar

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


Attachments:
Abaj.JPG [207.33 KiB]
Downloaded 577 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: 4hr strategy help please Post rating: 0   New post Posted: Tue 21 Nov, 2017, 15:35 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Thanks, it fails to load in visual jforex, i have run in google chrome and firefox without success. I have attached a screenshot of what it looks like. Just keeps saying 'starting' but nothing happens
Image


Attachments:
Capture.PNG [145.29 KiB]
Downloaded 567 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: 4hr strategy help please Post rating: 1   New post Posted: Tue 21 Nov, 2017, 16:36 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
I see,
The platform is stuck at the level of downloading historical data to your computer. it might be a network issue. I presume that you have already installed Java program so I need to check Java logs. TO do so, please activate Java console following these steps:
https://www.java.com/en/download/help/javaconsole.xml

Thanks


 
 Post subject: Re: 4hr strategy help please Post rating: 0   New post Posted: Wed 22 Nov, 2017, 02:34 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Thanks, unfortunately I am getting problems at every point. I have activated the console but nothing appears when I run the strategy. I followed the steps exactly and I have tried in explorer, firefox and chrome.


Image


Attachments:
no console.jpg [340.86 KiB]
Downloaded 543 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: 4hr strategy help please Post rating: 0   New post Posted: Wed 22 Nov, 2017, 03:18 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
I played around with some of the settings in the Java control panel and i got the strategy to run but still no Java console also no trades were taken over a 3 month period
Image


Attachments:
2017-11-22_02-16-55.jpg [311.72 KiB]
Downloaded 553 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: 4hr strategy help please Post rating: 1   New post Posted: Wed 22 Nov, 2017, 11:11 
Visual JForex expert at Dukascopy
User avatar

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

The console is in your background if you click on Java Java app it should be there.
As for no positions submitted this is because conditions are not met for 4H. there os one trade shown in my screenshot around 11 Sep17. can you check it ?


 
 Post subject: Re: 4hr strategy help please Post rating: 0   New post Posted: Wed 22 Nov, 2017, 12:26 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Hi thanks for your patience and support! No luck on getting the console up on my pc but it pops up easily on my laptop. I have attached the java console log from my PC where I still can't get the strategy to run. In terms of the strategy - I saw your september event. What I'm trying to capture is slightly different. Please see image. How can the algorithim be changed to incorporate this please? Also how have you specified that entry is at 50% retrace?

Thanks!

Image


Attachments:
Java Web Start 11.docx [39.33 KiB]
Downloaded 181 times
4HR EXAMPLE.PNG [49.7 KiB]
Downloaded 548 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: 4hr strategy help please Post rating: 0   New post Posted: Wed 22 Nov, 2017, 12:50 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Update the strategy is now running see picture. From the entry, the conditions were met, but looks like stopped out as parameter was to move stop to break even + 1 when 20 pips profit reached, so not sure why it got stopped out for 8.8 pips profit rather than 1?


Image


Attachments:
4hr VJF example.PNG [5.68 KiB]
Downloaded 536 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: 4hr strategy help please Post rating: 1   New post Posted: Wed 22 Nov, 2017, 15:53 
Visual JForex expert at Dukascopy
User avatar

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

This is because the 20 pips of profit is not met yet but let's clarify one thing:
- When your SL is supposed to be placed ? straight at the entry (Stop SELL) or once the order is filled ?
- The current situation is : SL is placed at the entry on the last candle high + 1 pip is that correct ? Then once the order is filled and the position realizes +20 pips the SL moves to which level exactly ? please show this on a chart ...
- Entry: 50% retracement on which 4H candle ? the one that broke above 4H previous bar on your screenshot ?


 
 Post subject: Re: 4hr strategy help please Post rating: 0   New post Posted: Thu 23 Nov, 2017, 01:23 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Hi, please see image below as requested. Please let me know if this is not clear. Is it possible to get some pointers on how to change some parameters once its set up. In particular I would like to:

1. Alter the retracement entry point (i.e. 20%, 30% , 40 % etc.)
2. I would also like to test different targets other than 50 pips
3. I would also like to alter the number of pips after which the stop would move.
4. Use the same strategy but from the buy side

Really appreciate all your help so far, best wishes

Image


Attachments:
4hr explnation.PNG [44.64 KiB]
Downloaded 533 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: 4hr strategy help please Post rating: 0   New post Posted: Fri 24 Nov, 2017, 12:27 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Sorry forgot to add a couple things. In the current algorithim will the trade trigger at the 50% retracement level regardless of when this occurs? For example if the level is reached two days later will it trigger then? Ideally the trade should enter within 24 hours of the confirmation bar, any longer than that should not have a trade executed. Also can we specify that there is no trading at illiquid times (i.e between 10pm and 6am GMT)? Thanks Again :D


 
 Post subject: Re: 4hr strategy help please Post rating: 1   New post Posted: Fri 24 Nov, 2017, 14:41 
Visual JForex expert at Dukascopy
User avatar

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

Here is an draft as per your spec. Please test thoroughly ...


Attachments:
ABaj_V3.vfs [57.82 KiB]
Downloaded 221 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: 4hr strategy help please Post rating: 0   New post Posted: Sun 26 Nov, 2017, 23:46 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Thank you so much! I have been tweaking it and its getting pretty good. I have taken your template and created an opposite strategy for the buy side (i.e. buy when last 4 hour bar breaks below the previous 4hr bar but closes above it). However it won't run (see attached file). The only changes I made aside from reversing the conditions was to enter on the new 4 hr bar rather than wait for a 50% retracement. Can you tell me where I've gone wrong please?

Also:

1. The stop does not move after 20 pips profit. Looking at the formula for the new stop loss box it does not appear to account for a 20 pip move away from entry?
2. If we can get the buy side algorithim working, is it possible to combine them together so that both buy and sell conditions are looked for in the same strategy?

Many thanks


Attachments:
TEST_BUY.vfs [56.76 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: 4hr strategy help please Post rating: 0   New post Posted: Thu 30 Nov, 2017, 11:09 
User avatar

User rating: 0
Joined: Sun 19 Nov, 2017, 16:28
Posts: 12
Location: United KingdomUnited Kingdom
Hi support team - any chance of having a look at my query? Many thanks


 
 Post subject: Re: 4hr strategy help please Post rating: 1   New post Posted: Thu 30 Nov, 2017, 13:25 
Visual JForex expert at Dukascopy
User avatar

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

Please start from the attached version and let me know the issues ...
I'd also recommend to create separate variables for your Entry price / SL / TP per side to avoid any inconsistency or errors ... I'll let you do that ..


Attachments:
ABaj_V4.vfs [65.14 KiB]
Downloaded 212 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.
 

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