Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Issue with Donchian indicator
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=141&t=50248
Page 1 of 1

Author:  flyswing [ Tue 22 Oct, 2013, 17:58 ]
Post subject:  Issue with Donchian indicator

Hello,

I face problem when using Donchian indicator.

My strategy =

For Longs positions (Shorts are reversed)

1. Today must make a new 20 day low the lower the better.
2. The previous 20 day low must have occurred at least four trading sessions earlier. This is very important.
3. After the market falls below the prior 20 day low, place an entry buy stop 1 pip above the previous 20 day
low. This buy stop is good for today only.
4. If the buy stop is filled, immediately place an initial good till canceled sell stop-loss one pip under today's low.

To meet these conditions, I use Donchian indicator.
Rule 1 : Donchian with period 19 and shift 0 (CURRENT) crosses Donchian with period 19 and shift 1 (PREVIOUS)
Rule 2 : 2 Donchians indicators T1 and T2.
T1 is the minimum for the last 4 candles
T2 is the minimum for the last 5 and 15 candles
=> T1 must be greater then T2

I play the strategy on Jforex backtester, and I find that some of the trades don't respect the rule 2.

Please find attached, the strategy.

I attach an example of the bug, appeared on EUR/USD the 2013/13/05 at 08h00 GMT.
I use a color theme to identify the differents Donchians indicators :
Black = Donchian period 19 shift 0 (CURRENT)
Red = Donchian period 19 shift 1 (PREVIOUS)
Yellow = Donchian period 4 shift (T1)
Rose = Donchian period 15 shift 5 (T2)

On this picture, please notice that the trade IVF20130705_09595962036191 doesn't meet the rule 2 because :

Yellow = 1.28840
Rose = 1.28880
=> Yellow < Rose, so the rule 2 is not respected.

I think that there is a bug with Donchian indicator.

Thanks for your answer...
Image
Image

Attachments:
Donchian_issue1.png [40.75 KiB]
Downloaded 387 times
Donchian_issue_report.png [57.63 KiB]
Downloaded 371 times
Donchian_issue.vfs [60.04 KiB]
Downloaded 186 times

Author:  amine_chourou [ Wed 23 Oct, 2013, 14:36 ]
Post subject:  Re: Issue with Donchian indicator

Hi There,

I've downloaded and run your strategy but I wasn't able to troubleshoot it because it doesn't open any pending order.
Please advice

PS: Thanks for watching the french webinar !

Author:  flyswing [ Wed 23 Oct, 2013, 15:32 ]
Post subject:  Re: Issue with Donchian indicator

Amine, you are welcome !

Please find attached the working .vfs.

I have tested it on jforex backtester for the following day :

July the 5th, 2013

and it's ok, you will see the issue appears on the 8h00 GMT candle.

I post the jfx too...

Regards

Attachments:
turtles1_3_4_issue.jfx [23.33 KiB]
Downloaded 193 times
turtles1_3_4_issue.vfs [62.1 KiB]
Downloaded 177 times

Author:  amine_chourou [ Thu 24 Oct, 2013, 21:04 ]
Post subject:  Re: Issue with Donchian indicator

Hello,

What I'm currently graphically seeing after testing:
(EURUSD; Period 30mn July 5th 2013 @ 08:00 am GMT)
T1_DC_Low @ 1.28776 > T2_DC_Low 1.28688 (Condition confirmed and okay)
and
Current_DC_Low is equal to Previous_DC_low @ 1.28776 : Which shouldn't met the condition.

But as I said this is a graphical lecture, When I debug your strategy and set a Stop strategy at 8:00 am on this specific day in order to get the exact value of the variables, here is the variables that I get:

T1_DC_Low @1.28905 > T2_DC_Low @1.2888
and
Current_DC_Low @1.28776 < [email protected]
Which totally meet your conditions.

I would trust the second method as it retrieves the exact values at a specifc time stamp. In the other hand, bear in mind that your "shifted" indicators will be calculated on the previous values so graphically speaking when you post-check them, you have to get the appropriate value as per its "shift" timestamps.

Hope this helps

Amine
Image

Attachments:
Snippet.JPG [87.07 KiB]
Downloaded 356 times

  Page 1 of 1