Dukascopy
 
 
Wiki JStore Search Login

Rejected Trades/no trades for a long period
 Post subject: Rejected Trades/no trades for a long period Post rating: 0   New post Posted: Tue 02 May, 2017, 09:36 

User rating: 0
Joined: Mon 17 Jun, 2013, 23:30
Posts: 48
Location: Australia, Melbourne
Dear Good people from support,

I have the attached strategy (continuare of https://www.dukascopy.com/swiss/english ... 41&t=55134) with all desired functionality. Also, I saved the HTML log file inside the Word document to be able to reproduce my test.

During testing it is obvious no trade has been taken during 1st March to 21st March (also 07-27 April) and it appears that when the log file prints:
2017-04-12 21:00:00 Commissions Commissions [0.0]

it is possible a trade rejection in the platform ? Could you please elucidate as to why there are so many rejections and also for such a long period?


Kind Regards
Virgil


Attachments:
Rejected Trades.docx [17.98 KiB]
Downloaded 62 times
PetersSMMA_V1d.java [32.12 KiB]
Downloaded 98 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: Rejected Trades/no trades for a long period Post rating: 0   New post Posted: Wed 03 May, 2017, 11:49 
Visual JForex expert at Dukascopy
User avatar

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

Well, I don't see the rejected trades you're referring to but I found that you're testing your strategy on EURUSD instrument where it is built in Visual JF on GBPUSD. you need to manually set the default instruemnt in JFOREX to GBPUSD :

Image

I've also added the test report showing trades on cable for the period 01-03-2017 till 31-03-2017

I see in the messages that you're updating frequently your SL and TP orders with the same price. I've reduced this redundancy with couple of conditions as you see


Attachments:
InstrHT.JPG [81.32 KiB]
Downloaded 159 times
Rejected Trades_V2.docx [26.72 KiB]
Downloaded 56 times
PetersEMA_V3.jfx [34.26 KiB]
Downloaded 112 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: Rejected Trades/no trades for a long period Post rating: 0   New post Posted: Wed 03 May, 2017, 23:47 

User rating: 0
Joined: Mon 17 Jun, 2013, 23:30
Posts: 48
Location: Australia, Melbourne
Hi Amine,

Thank you for your answer. Thank you for improving it's functionality. It raises some questions though:

1. If I develop the strategy on a defaultInstrument, when used in the Historical Tester, the platform will not replace it, that's why I have to edit the Java file?
2. In your report there are still no trades between 2017-03-01 21:00:00 and 2017-03-13 21:00:00 (and again another 10 days period) and it lists "Commission" in the event columns. Can you please explain why this is the case? Alternatively it makes one thinking that there are charged commissions when nothing happens? On the chart there will be missed adequate entry conditions by the strategy(not marked) during this period.
3. You attached the JFX file(binary), could you please include either the Java or the vjForex file?
4. You are using a different strategy than the one I attached in this case, however I believe the issue is pertinent regardless.

Kind Regards
Virgil


 
 Post subject: Re: Rejected Trades/no trades for a long period Post rating: 0   New post Posted: Thu 04 May, 2017, 15:15 
Visual JForex expert at Dukascopy
User avatar

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

1/ It is slightly more complex: When using Visual Jforex having the default instrument set as per your need, the historical tester takes into account this and will start automatically using this instrument. If you export your strategy to JForex and run the historical tester, by default EURUSD is considered as default instrument and you need to edit that as per my previous screenshot.

2/ Just to clarify : The test made is as following:
- PetersEMA_V3 strategy report for GBP/USD instrument(s) from 2017-03-01 00:00:00 to 2017-03-31 00:00:00
- The commission charged (11.15)is related to the list of the 12 trades made on the test period.
- On the first of march I can see one short position : IVF20170301_06000993956422 0.001 SELL @ 1.23732 opened on 2017-03-01 06:00:10 closed on 2017-03-01 13:32:46
Image
- The strategy did not trade between March 2nd and 13th because of conditions are simply not met.

3/ Sorry, I made a mistake. Attached is the Java version .. I've lost the vfs but I only implemented simple condition to avoid resubmitting the same SL and TP orders with the same price. The strategy trading logic remains the same;

4/ Which issue ? resubmitting the same SL and TP orders with the same price ?


Attachments:
HistTesterJforex.JPG [76.37 KiB]
Downloaded 135 times
PetersEMA_V3.java [35.83 KiB]
Downloaded 86 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: Rejected Trades/no trades for a long period Post rating: 0   New post Posted: Fri 05 May, 2017, 00:57 

User rating: 0
Joined: Mon 17 Jun, 2013, 23:30
Posts: 48
Location: Australia, Melbourne
Hi Antoine,

Thank you very much for your efforts. I believe something got mixed up.

I edit the Java file with SMMA_Period=21 and EMA_Period=13 (since it is an EMA strategy, the smaller period makes the MA faster, so EMA will be faster). However when I run it and measure the indicators for the chart EMA(34) and SMMA(8).

What's even worse, is that the logic does not seem to work anymore, the trades come whenever not when crossing and even if I change the indicators on the chart for the start values, still the logic is not reflected.

Also the message: 23:34:43 Attempt to change stop loss of the order [IVF20170315_1552305005909] with the same price. Old price [1.21829], new price [1.21829]
is displayed several times.

Another thing is that the EventText= Commissions[x.y] does not match the number of orders taken previously, so I am not sure what it means.

I re-run the SMMA_V1d strategy and the MA still have the wrong values, it seems like they are cached somewhere in the program execution space. However it does not have the TSL and SL error messages (same value). The end of run report provides different values from the ones entered at start or the ones from the chart.

Kind Regards
Virgil


 
 Post subject: Re: Rejected Trades/no trades for a long period Post rating: 0   New post Posted: Fri 05 May, 2017, 12:35 
Visual JForex expert at Dukascopy
User avatar

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

Attached is the vfs version that I tested. I've included some notes to clarify.
- As for the indicators periods: you have an assign block that sets back the periods to 13 in the beginning of the strategy
- I've inserted a new condition to avoid the redundancy of SL and TP orders
- testing the attached version in Jforex over last week, I have a commission of 4 cents for one trade which is correct. Latest report attached.


Attachments:
PetersEMA_V5.vfs [78.65 KiB]
Downloaded 88 times
Rejected Trades_V2.docx [32.46 KiB]
Downloaded 58 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:  

  © 1998-2011 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