Dukascopy
 
 
Wiki JStore Search Login

Difference between 'Historical testing' and 'Demo Live data'
 Post subject: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Mon 02 Nov, 2015, 16:46 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Dears,

I am experiencing different results between historical and demo testing.

Any idea?

Thanks,
Antony


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Mon 02 Nov, 2015, 17:43 
Visual JForex expert at Dukascopy
User avatar

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

Can you please elaborate on that ?

Historical tester of VJF and Historical tester of JForex ? same run-time parameters ? Real time tests as well ?? could you please attach the strategy in question

Thanks


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Mon 02 Nov, 2015, 18:04 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Hi Amine,

thanks for heads up :)

- historical testing on Visual (all good)
- historical testing on Jforex (not tested)
- demo on Jforex (errors)
- live on Jforex (errors)

Questions welcome,
A.


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Tue 03 Nov, 2015, 09:38 
Visual JForex expert at Dukascopy
User avatar

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

What are the errors ? any vfs file ?

Thx


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Tue 03 Nov, 2015, 14:06 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Thanks for your attention, at the moment it looks that it is all about my overlooked 'coding mistakes'.


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Wed 04 Nov, 2015, 17:11 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Well, finally just one error, that is:
- sometimes (lets say in one case out of seven) the entry pending order is duplicated)
- have no idea why this is happening
- most confusing is that it is not happening everytime

Thanks for possible hep or idea what to do.

Appreciate,
Antony


Attachments:
DC_BuySell_V1.vfs [84.33 KiB]
Downloaded 101 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: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Thu 05 Nov, 2015, 15:48 
Visual JForex expert at Dukascopy
User avatar

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

The error comes from the following blocks (on both BUY and SELL sides):

Image

The IF block at the right side comparing last tick time > expiry time doesn't add any information as it is always the case.
If I associate the conditions having All position and pending position variables (the 2 IF blocks in the left side of the pic) then I come to the following statements:
Out of the first IF: there is a case where you have 2 pending orders (One Buy Stop plus its linked SL order) There is a case where 1 pending order is submitted and a case where you can have 1 position + 1 SL (in case a Stop BUY gets filled) --> SO out of this condition you go and compare tick time Vs Expiry time (always true) and then comes the second IF to check if there is no pending positions at all ??!!! this case never happens in other words.
back to the first IF: the "equal' is the only valid exit when associated with the second IF which result in order creation

If you're looking to update the expiry time ONCE the pending order is placed AND not yet filled then it is another story


I don't get what are you willing to achieve using these 3 blocks, can you please explain ?

Thanks in advance


Attachments:
Error.JPG [109.11 KiB]
Downloaded 429 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: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Thu 05 Nov, 2015, 17:42 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Hi Amine, I am happy to explain:

FIRST IF BLOCK is a question, if there is any position (pending or filled) at all (comparing allPositions to ZERO)
- if the answer is GREATER THAN ZERO (means there are some (pending or filled) positions)... than .... goto SECOND IF BLOCK
- if the answer is EQUAL, that means no position at all (pending or filled) .... than .... goto THIRD IF BLOCK

SECOND IF BLOCK
- last tick time IS GREATER than ExpiryTime .. means there is NOT any pending order with grater Expiration THAN current LastTick
(thus this block is used for single purpose, that is to AVOID opening pending order once the previous was not filled or expired)

THIRD IF BLOCK
... so we can get into this block by two ways
a) directly from FIRST IF BLOCK (that is when no positions exist)
b) through SECOND IF BLOCK, but only if there is not any pending order)
... at least I hope so


So let me clarify what is the intension:

- to AVOID opening new pending order before the expiration of the previous pending order (does not matter if the previous pending order got filled)

example:
at 10:00min no positions at all
at 10:05min first pending order is created with Expiration 60 sec (say from 10:05:00sec to 10:05:59sec)
... the intension of these three IF BLOCKS is not to open any new pending order before 10.06.00sec)


Appreciate your help!
Antony


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Fri 06 Nov, 2015, 10:53 
Visual JForex expert at Dukascopy
User avatar

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

Assuming the following statement:
Quote:
- to AVOID opening new pending order before the expiration of the previous pending order (does not matter if the previous pending order got filled)

and the example provided, you can do that using pending position variable.
I modified your strtaegy in the attached example as per the above and I also modified the way the expiration is plugged because I noticed that there was one case where the order did not get the right validity and I'm suspecting the use of Tick price plugged to onCandle is not updating properly.
There is also another error related to LowestAsk / Highest Ask prices where they don't get a start value...

Cheers


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Fri 06 Nov, 2015, 11:07 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
With the strategy attached ...


Attachments:
DC_BuySell_V3.vfs [84.18 KiB]
Downloaded 111 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: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Fri 06 Nov, 2015, 11:19 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Regarding "LowestAsk / Highest Ask prices where they don't get a start value..."
- I did find more useful and probably more simple way to proceed with BIDs only and to implement spread calculation for the 'BUY SIDE''

Update soon, big thanks and have a good weekend,
A.


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Fri 06 Nov, 2015, 11:45 
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:
Assuming that you agree to open order regardless of previous orders that got filled you also agree to have many positions opened (long and short).


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Fri 06 Nov, 2015, 11:50 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Hi Amine,

one thing is missing, and that is this scenario:

example:

10:00:00 no orders at all
10:01:00 new pendingOrder1 placed
10:01:30 pendingOrder1 got filled

.. and now new pending order can be placed, but it should not be before pendingOrder1 expiration, that is before 10:02:00

What do you think?


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Fri 06 Nov, 2015, 12:01 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
amine_chourou wrote:
One more detail:
Assuming that you agree to open order regardless of previous orders that got filled you also agree to have many positions opened (long and short).


that is right, but not before pendingOrder1 expiration (of my example above)


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Fri 06 Nov, 2015, 15:32 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Yes, And the strategy attached should handle the above as well.


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Fri 06 Nov, 2015, 15:55 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Based on my Jforex historical testing, it is not. It is still (time to time) open two orders in one moment.

In my opinion, it is because new pending order can be opened whenever there is no other pending order. BUT, the is no filter not to be opening new pending order for 60 sec from last placement (of pending order).


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Mon 09 Nov, 2015, 10:23 
Visual JForex expert at Dukascopy
User avatar

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

Can you show an example including date and time of the trades /orders showing the following:
Quote:
Based on my Jforex historical testing, it is not. It is still (time to time) open two orders in one moment.


Quote:
In my opinion, it is because new pending order can be opened whenever there is no other pending order

It should not, otherwise it is a bug if the above is confirmed.

Quote:
BUT, the is no filter not to be opening new pending order for 60 sec from last placement (of pending order).

There is no need for that as it is still an order in "open" status till it expires and then it will switch to "cancelled"

Thanks


 
 Post subject: Re: Difference between 'Historical testing' and 'Demo Live data' Post rating: 0   New post Posted: Mon 09 Nov, 2015, 21:59 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
I did uncover the trouble :).

Your help / blocks correction was sufficient, but based on more complicated strategy / and more options how to get entry signal / it was possible that two different signals got through the gate almost at the same time. Thus, even despite the filter to open max one pending order, two have been opened, because the second signal got through the gate BEFORE the first signal was executed into pending order placement.

A.


 

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