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

RealTime behaving differently than HistoricalTester
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=141&t=54475
Page 1 of 1

Author:  bradrtony [ Mon 21 Nov, 2016, 17:28 ]
Post subject:  RealTime behaving differently than HistoricalTester

Dears,

please check the attached piece, it does what it should on BackTesting (Jforex StrategyTester), but it produces duplicities when running real time (live account), that is producing duplicated pending orders in indefinite amount and randomly (that is not always).

Also, need to mention that such strategy is running in the same time on different instruments / markets.
Appreciate your possible insight and ideally help.

Thanks and be fine,
Antony

Attachments:
toDCsupport_ShiftingStops.vfs [35.2 KiB]
Downloaded 131 times

Author:  amine_chourou [ Tue 22 Nov, 2016, 15:07 ]
Post subject:  Re: RealTime behaving differently than HistoricalTester

Hi,

The right method to subscrive to an instrument is made in the attached example where the use of "Default instrument" is made. This will eliminate the problem of trading on several instruments. Now regarding your multiple orders on the same price, this seems to be a case that is not covered by your entry conditions. Have you tried to check the entry price of the order if already used or not ? (you can use trade event to get the open price of the most recent order and compare it with the one you're willing to open with)

Cheers

Attachments:
toDCsupport_ShiftingStops_V2.vfs [36.36 KiB]
Downloaded 153 times

Author:  bradrtony [ Tue 22 Nov, 2016, 16:01 ]
Post subject:  Re: RealTime behaving differently than HistoricalTester

Thanks Amine for your feedback, two things:

1. if I use default instrument, than I need to use have solo strategy for each traded market (EURUSD strat for EURo market, AUDUSD strat for Aussie, etc. ..). That is I can not trade EURUSD and AUDUSD with one single strategy, that leads to certain limitation, that are critical for me. For example I need to compare EURUSD exposition P/L and AUDUSD exposition p/L, number of positions.

2. can please provide simple example how to work with TRADE EVENT on this particular case?

Big thanks! and be fine.
A.

Author:  bradrtony [ Wed 23 Nov, 2016, 13:21 ]
Post subject:  Re: RealTime behaving differently than HistoricalTester

Just little request:
- accordingly to my knowledge of Jforex, please try to suggest a solution using "order counting", as I did in previous attached example
- than the only trouble is that the strategy creates more than requested amount of pending orders

If that is not possible, whatever help is very welcomed.
I am ready to learn something new (TradeEvent block chain).

Thanks and be fine,
A.

Author:  amine_chourou [ Wed 23 Nov, 2016, 16:37 ]
Post subject:  Re: RealTime behaving differently than HistoricalTester

Hi,

I'm getting back to your initial request:

Quote:
please check the attached piece, it does what it should on BackTesting (Jforex StrategyTester), but it produces duplicates when running real time (live account), that is producing duplicated pending orders in indefinite amount and randomly (that is not always).


I'm not sure if the result obtained form VJF hisotrical tester is the one you're looking for. When I tested your strategy with the original parameters it produces a lot of trades more or less randomly as far as I understood. would you please describe your idea thoroughly ? if you are worried about privacy, you can send it to [email protected] and address the email to me.


Quote:
2. can please provide simple example how to work with TRADE EVENT on this particular case?


Attached is a workaround that uses TradeEvent start point. The idea is to catch the last entry price from trade message and make sure it is not used when the next order will be submitted. I did not test that and we can discuss such use of Trade Event start point further if you wish. I'd like to send you a document that would help understanding this and more. (email required)

Quote:
- accordingly to my knowledge of Jforex, please try to suggest a solution using "order counting", as I did in previous attached example
- than the only trouble is that the strategy creates more than requested amount of pending orders


As I mentioned, understanding your requirements would help a lot in an optimal implementation.


Cheers

Attachments:
toDCsupport_ShiftingStops_TE.vfs [38.8 KiB]
Downloaded 142 times

  Page 1 of 1