Dukascopy
 
 
Wiki JStore Search Login

No entry when conditions are met.
 Post subject: No entry when conditions are met. Post rating: 0   New post Posted: Wed 03 Feb, 2016, 00:48 
User avatar

User rating: 0
Joined: Wed 03 Feb, 2016, 00:25
Posts: 8
Location: AustraliaAustralia
Hi there,

I am attempting to get an entry when price moves to a BBand with the attached strategy.

Unfortunately my programming knowledge is limited (Only started on Monday).

I would have expected that an entry would have been made in the highlighted area below.

Image

When I watch the strategy unfold all the boxes (on the short side) are highlighted red up to but not including the Open at Market sell.

I am clearly missing something in order for an order to be executed.

Additionally I am looking to have a 3ATR stop loss for my system. Would the current strategy allow for this or would I need to rework this as well?

Thank you.


Attachments:
audusd15min.jpg [186.83 KiB]
Downloaded 422 times
audusd.vfs [38.59 KiB]
Downloaded 150 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: No entry when conditions are met. Post rating: 0   New post Posted: Thu 04 Feb, 2016, 17:37 
Visual JForex expert at Dukascopy
User avatar

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

Sorry for late answer.

Could please detail your strategy specification and tell us whether the choice of trading with 2 periods is intentional or not (Daily and 15mn)
Your strategy is not trading because your conditions are not met, hence my question regarding a thorough explanation of your idea. A screenshot displaying entry and exit conditions on both sides is welcome.

Thanks


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Fri 05 Feb, 2016, 03:21 
User avatar

User rating: 0
Joined: Wed 03 Feb, 2016, 00:25
Posts: 8
Location: AustraliaAustralia
Hi Amine,

I apologize for the lack of detail.

Current Strategy:
Condition 1. The 30day ma crossing the 200day ma.
Condition 2. Price crossing the 30day ma.
Trigger. Price touching the opposite BB to the trend.
Trailing Stop Loss. 3xATR
Position Size/Lot amount. 1%
Once a position has been opened and the trailing stop loss is in place I want to cease the strategy.

The 2 time frames were deliberate. Essentially, I am attempting to catch the retracement in a trend with the ma crossover defining the trend. The exact parameters for each indicator is yet to be tested and confirmed.

I have been able to correct the issue of orders not being executed. After doing some further testing I found that price=bb was not executing any trades even with the additional conditions not in place. When I changed price >/< bb I found that orders were being executed with out issue.

Further testing is required but I should be good from here.

Thank you.


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Fri 05 Feb, 2016, 13:26 
Visual JForex expert at Dukascopy
User avatar

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

Excellent! I'm happy to hear that you managed to figure out how to adjust your strategy on your own but don't hesitate to send it to me if you have any questions. There is some fine-tuning ideas that enhance the strategy logic such as implementing logical triggers.
I made some slight modification to the structure so that your trailing SL flow is sure to be reached by the strategy code. The SL calculation is also modified : ATR*3*10000 which is expressed in pips as you're using it in pips in your open @market command. in case it is not the SL level that you're expecting, feel free to modify it.

Cheers


Attachments:
audusd_V2.vfs [45.5 KiB]
Downloaded 150 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: No entry when conditions are met. Post rating: 0   New post Posted: Mon 08 Feb, 2016, 05:37 
User avatar

User rating: 0
Joined: Wed 03 Feb, 2016, 00:25
Posts: 8
Location: AustraliaAustralia
Hi Amine,

Thank you for the adjustments for the stop loss. I was yet to test this further. Good idea with the Multiple Actions logic. I was wondering if this would be necessary for this strategy.

I will continue to test this further.

Thank you once again for your assistance.


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Mon 08 Feb, 2016, 15:34 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Enjoy your tests !
Looking forward ...


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Wed 10 Feb, 2016, 02:00 
User avatar

User rating: 0
Joined: Wed 03 Feb, 2016, 00:25
Posts: 8
Location: AustraliaAustralia
Hi Amine,

I have been testing the changes you have suggested with my strategy. I still have some questions about the trailing stop.

When I run a test as per the below example I get quite a number of trades executed (103 to be exact). Given the parameters of the strategy I understand why I get numerous entries, what I don't understand is why I only have one trailing stop.

Image

If I change the parameters so that the strategy only executes one trade, then the trade that does execute does not have a trailing stop.

Image
Image

If I change the strategy to stop once a trade has been executed and a trailing stop is in place then I still get 22 trades (difficult to test if any of these have a trailing stop).

Image
Image
Image

The entry in the original example with the trailing stop is the ideal situation I am looking for (Not the ideal trade). I just need to filter out the other 102 entries.

I am using this strategy as a dynamic ordering system when the market conditions are correct. Not a set and forget system. It is to be used in conjunction with additional analysis. Therefore, if the analysis is incorrect I would prefer that only one trade be executed.

Using the condition Open Positions<1 is not really viable as I may have this strategy running over a number of currencies. If it were somehow possible to have DefaultInstrument Open Positions<1 with a functioning trailing stop, this would work perfectly fine.

I apologise for all of the questions. As stated previously my knowledge in this area is not great.

Thank you.


Attachments:
audusd_v3.vfs [43.76 KiB]
Downloaded 146 times
AUDUSD_StopStratStat.JPG [71.53 KiB]
Downloaded 396 times
AUDUSD_StopStratExample.JPG [91.93 KiB]
Downloaded 410 times
AUDUSD_StopStratStrat.JPG [82.18 KiB]
Downloaded 421 times
AUDUSD_1PositionExample.JPG [101.04 KiB]
Downloaded 391 times
AUDUSD_1positionstrat.JPG [51.11 KiB]
Downloaded 415 times
AUDUSD15min_ShortExample.JPG [106.09 KiB]
Downloaded 379 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: No entry when conditions are met. Post rating: 0   New post Posted: Wed 10 Feb, 2016, 14:26 
Visual JForex expert at Dukascopy
User avatar

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

- I would recommend you to insert an IF block to limit the number of open positions just before the "Open@market" block, you will use 2 of these blocks then. This will allow you to follow up position by position and therefore to see the trailing step moving once at a time.
- For the testing stage, leave the "stop strategy" block disconnected, then once 100% sure of the strategy behavior plug it back.
- Plug the Stop strategy block after the trailing command and not in a parallel way using multiple actions, this will allow the SL move to be achieved and then stopping the strategy afterwards.

Cheers


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Thu 11 Feb, 2016, 07:22 
User avatar

User rating: 0
Joined: Wed 03 Feb, 2016, 00:25
Posts: 8
Location: AustraliaAustralia
Hi Amine,

Thank you once again for your assistance.

Placing the IF Logic Positions Amount <1 just before the Open at market has worked well for testing. However, I was hoping to use this strategy on a number of currency pairs at the same time. If a position was opened up on another pair this would prevent an additional position being opened.

Is it possible to do a check to see if there is a position open on the default instrument?

Thank you.


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Thu 11 Feb, 2016, 13:50 
Visual JForex expert at Dukascopy
User avatar

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

I see what you mean. Currently we can't check open position number per traded currency but we're working on an enhancement in this way to be released in the nearest future.
For now, there could be another solution to limit the number of open position per traded currency using logical triggers. but before going further, would you please tell me how many currency will you trade and will the conditions applied the same for all currencies?

Thanks


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Thu 11 Feb, 2016, 16:21 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Unless you have cross-currency conditions like USDCHF going up --> you trade EURCHF for instance ...
The above can be in any case handled using logical triggers such as the example attached.

Another idea would be to build 1 strategy based on a single currency pair using the logical triggers as in the screenshot and then replicate it for the other currencies and then you'll have as many files as currency pairs and you can run them independently.

Cheers


Attachments:
MultiCurrAndPer_Latest.vfs [51.91 KiB]
Downloaded 153 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: No entry when conditions are met. Post rating: 0   New post Posted: Fri 12 Feb, 2016, 01:35 
User avatar

User rating: 0
Joined: Wed 03 Feb, 2016, 00:25
Posts: 8
Location: AustraliaAustralia
Hi Amine,

Thank you once again for your prompt and informative information.

Building one strategy for each pair is a very viable solution, and probably reduces the likely hood of human error when applying the strategy.

I just want to confirm if I change the instrument to from defaultinstrument to one pair i.e. AUD/USD with the logic If Open Positions Position <1 that this will only be looking for open positions for AUD/USD and other active trades on other pairs will not impact the strategy.

I am currently manually testing a variant of this strategy on 8 pairs. This strategy will enable me to take more accurate trades in less time. If I am successful with the strategy I will be looking to expand it to 10 pairs.

Once again I would like to thank you for your assistance.


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Fri 12 Feb, 2016, 09:30 
Visual JForex expert at Dukascopy
User avatar

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

Quote:
I just want to confirm if I change the instrument to from default instrument to one pair i.e. AUD/USD with the logic If Open Positions Position <1 that this will only be looking for open positions for AUD/USD and other active trades on other pairs will not impact the strategy.


Working with "Open Position" variable will impact any open position in your account regardless of the currency pair. This is one of reasons why we're working on enhancing VJF to handle such constraint. The only choice that remains is working with logical triggers as per the example provided yesterday. If you need to work with more that one position per currency pair, I'll introduce the use of counters associated with trading period, this will let open as much as positions you need (1<=pos<N)

You're welcome !

Cheers


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Mon 15 Feb, 2016, 05:18 
User avatar

User rating: 0
Joined: Wed 03 Feb, 2016, 00:25
Posts: 8
Location: AustraliaAustralia
Hi Amine,

That is disappointing news about the open positions variable. I thank you for the logical triggers but this appears to be far more complicated that this needs to be.

To give you an example:
If I run
Image

When my conditions are met I get a single position short with a stop loss and the strategy stops, as expected, with or without the variable Open Positions <1.

If I run
Image
or
Image

Then a trailing stop is not entered.

Why is it that the trailing stop conditions/variables need to be on a separate action for them to work? If this is a timing issue is it possible to have a wait/hold variable?

If these conditions did work sequentially without an issue I could probably do away with the variable Open Positions <1.

On further testing this morning I have found in one case, even with the variable Open Positions <1, I still had eight positions opened, two I understand, six of these had no trailing stops. This is a significant risk issue.
Image

Is it possible that I am asking more of this software than what it is capable of?

Thanking you once again for your assistance.


Attachments:
audusd_v4.vfs [40.57 KiB]
Downloaded 134 times
example.JPG [213.84 KiB]
Downloaded 389 times
stopstratstoplossvar.JPG [46.57 KiB]
Downloaded 367 times
stopstratstoploss.JPG [33.66 KiB]
Downloaded 327 times
stopstrat.JPG [46.34 KiB]
Downloaded 391 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: No entry when conditions are met. Post rating: 0   New post Posted: Mon 15 Feb, 2016, 15:32 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,
Quote:
Why is it that the trailing stop conditions/variables need to be on a separate action for them to work?

- The custom trailing stop is different from the regular trailing step: The different is that the Normal trailing step block sends a trailing order to Jforex and then the order change and monitoring is handled by Jforex / our servers end. The custom trailing step block is handled by VJF: it activation, triggering, status change is 100% made by VJF/ the strategy itself. This is the main reason why such block needs to be plugged separately and not "blocked" by any other condition to make sure its execution is not stopped at any level (except the condition of trailing step itself)
Quote:
I thank you for the logical triggers but this appears to be far more complicated that this needs to be.

- Working with triggers (logical variables) is not really complicated but need some effort to be understood in the beginning. Once the concept is assimilated it will open the doors for you to many many possibilities: Almost anything can be done using counters and logical triggers

- Open position < 1 or =0 is a way to avoid having a new position created in th next 15mn candle while the previous one is still opened, if you don't mind having that then feel free to remove it.



Quote:
Is it possible that I am asking more of this software than what it is capable of?


Not really, at this stage more can be be achieved with VJF.

Quote:
I still had eight positions opened, two I understand, six of these had no trailing stops. This is a significant risk issue.


1- The below 2 positions are correct as each one is created after the other and each one was opened on a dedicated candle.
2- If you need trailing stop that handle more than a single position at a time, the use of "Position Viewer" block is mandatory as it allow the system to act one multiple positions. The assumption of linking trailing stop block separately is also valid with the use of positions viewer block.



Cheers


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Tue 16 Feb, 2016, 02:39 
User avatar

User rating: 0
Joined: Wed 03 Feb, 2016, 00:25
Posts: 8
Location: AustraliaAustralia
Hi Amine,

I wanted to thank you once again for your patience and information for this novice.

Thank you for explaining the difference between the custom trailing stop and the regular trailing stop. This has helped me out dramatically, and has probably sorted out all of my issues.

I have swapped out the custom trailing stop for the regular trailing stop and placed it directly after the order followed by the stop strategy block. The has given me the ideal entry and protection that I need. I have also removed the Open Positions variable as it was no longer required and restricted the number of pairs that I could work with.

Thank you once again for all of your assistance.


 
 Post subject: Re: No entry when conditions are met. Post rating: 0   New post Posted: Tue 16 Feb, 2016, 11:16 
Visual JForex expert at Dukascopy
User avatar

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

Remember the difference between the regular trailing stop and the custom one: The first allow only a step of 10pips (minimum) and the second block gives the possibility to set trailing steps less than 10 pips. (which is the main reason of its creation)


 

Jump to:  

  © 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