|
Please some help and advice on my first test strategy |
DEMO2atWCq
|
Post subject: Please some help and advice on my first test strategy |
Post rating: 0
|
Posted: Fri 13 May, 2016, 10:43
|
|
User rating: 0
Joined: Tue 10 May, 2016, 19:00 Posts: 2 Location: Italy,
|
Goodmorning Amine, I heve tried to set up my first simple strategy on VJF as a pure test, and already (  ) stuck on a couple of issues... here is the screenshot of the whole strategy:  Shortly, the DEFAULT values set are Instrument: eur/usd Period: 4h Indicator: SMA 30 traded amount: 0.1 Slippage: 0 Stop loss: 8 pips Take Profit: 4 pips Shortly, my goal is to open 1 single position nearly (with such a small STOP LOSS and TAKE PROFIT values) on every 4 hours candle for the time considered (past WEEK), closing it quite quickly with 8 pips S/L or 4 pips T/P After running the backtest, from the report I have found 2 main problems: 1) the system seems to ignore my goal to CLOSE a position, either + or -, with the default set values of Stop loss and Take Profit (8 and 4). The position remains opened sometimes for several candles, with a profit or loss values of really higher amounts 8in pips). Really can't see where did I make the mistake... 2) In the Graphic part of the backtest report, all of the candles in the time considered (1week) disappear.... that makes any visual analysis really tricky... IS THIS REGULAR/OK? Looking from the demo videos on VJF, looks like the regular candles should be there instead. Will add a few more pics hoping they can show things even better: FIRST two screenshots of RUNTIME PARAMETERS and GLOBAL VARIABLES I have set, then 2 more screenshots from the BACKTEST REPORT Many, many thanks in advance for any support!  
|
|
|
|
 |
DEMO2atWCq
|
Post subject: Re: Please some help and advice on my first test strategy |
Post rating: 0
|
Posted: Fri 13 May, 2016, 10:47
|
|
User rating: 0
Joined: Tue 10 May, 2016, 19:00 Posts: 2 Location: Italy,
|
DEMO2atWCq wrote: Goodmorning Amine, I heve tried to set up my first simple strategy on VJF as a pure test, and already (  ) stuck on a couple of issues... here is the screenshot of the whole strategy:  Shortly, the DEFAULT values set are Instrument: eur/usd Period: 4h Indicator: SMA 30 traded amount: 0.1 Slippage: 0 Stop loss: 8 pips Take Profit: 4 pips Shortly, my goal is to open 1 single position nearly (with such a small STOP LOSS and TAKE PROFIT values) on every 4 hours candle for the time considered (past WEEK), closing it quite quickly with 8 pips S/L or 4 pips T/P After running the backtest, from the report I have found 2 main problems: 1) the system seems to ignore my goal to CLOSE a position, either + or -, with the default set values of Stop loss and Take Profit (8 and 4). The position remains opened sometimes for several candles, with a profit or loss values of really higher amounts 8in pips). Really can't see where did I make the mistake... 2) In the Graphic part of the backtest report, all of the candles in the time considered (1week) disappear.... that makes any visual analysis really tricky... IS THIS REGULAR/OK? Looking from the demo videos on VJF, looks like the regular candles should be there instead. Will add a few more pics hoping they can show things even better: FIRST two screenshots of RUNTIME PARAMETERS and GLOBAL VARIABLES I have set, then 2 more screenshots from the BACKTEST REPORT Many, many thanks in advance for any support!    
Attachments: |
strategy backtest report- setting of RUNTIME PARAMETERS.jpg [170.78 KiB]
Downloaded 359 times
|
strategy backtest report- setting of GLOBAL VARIABLES- ALL DEFAULT VALUES-.jpg [100.46 KiB]
Downloaded 360 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.
|
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Please some help and advice on my first test strategy |
Post rating: 0
|
Posted: Fri 13 May, 2016, 13:30
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi, Your initial requirement: Quote: my goal is to open 1 single position nearly (with such a small STOP LOSS and TAKE PROFIT values) on every 4 hours candle for the time considered (past WEEK), closing it quite quickly with 8 pips S/L or 4 pips T/P I'll try to explain things point by point: 1/ From the screenshots I see that you changed the interpolation settings (Runtime parameters in the screenshot 4) to 4 hours interpolated by tick on open: This means the historical tester (the data retrieved )will consider only the open price of every 4 hours candle. This will change the result of the test because you are modifying the real past data and as I said, the interpolation settings can be changed only in case of long period tests and for big and complex strategies which is not the case for you so better to leave it at "Tick". 2/ You will see when you change this to tick, there is still some trades opened on a given candle and closed later in further candles: Why ? If you look at the candle where this trade is opened, you'll see that neither the SL nor the TP conditions are met, so the trade is kept opened till the exit conditions are met. 3/ Now, from your requirement you said: on every 4 hours candle. This is not developed in your strategy, why ? Because you're not telling about the above case where TP and SL are not touched in the same 4H candle and the strategy needs then to wait till these level are reached in the future. If you want to exit the trade at the end of every candle we should add some additional conditions. These conditions are basically made in the attached file with some notes. Hope this helps. Cheers
Attachments: |
media30_V2.vfs [32.69 KiB]
Downloaded 146 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.
|
|
|
|
|
 |
Daniele001
|
Post subject: Re: Please some help and advice on my first test strategy |
Post rating: 0
|
Posted: Fri 13 May, 2016, 14:00
|
|
User rating: 0
Joined: Fri 13 May, 2016, 11:00 Posts: 2 Location: ItalyItaly
|
As usual, thanks a lot for your kindest reply and the time you dedicted me. Will download the file then, and will study it during the weekend, paying also good attention to your other suggestions. Will send a feedback on Monday. Many thanks again!!
|
|
|
|
 |
Daniele001
|
Post subject: Re: Please some help and advice on my first test strategy |
Post rating: 0
|
Posted: Wed 18 May, 2016, 12:28
|
|
User rating: 0
Joined: Fri 13 May, 2016, 11:00 Posts: 2 Location: ItalyItaly
|
amine_chourou wrote: Hi, Your initial requirement: Quote: my goal is to open 1 single position nearly (with such a small STOP LOSS and TAKE PROFIT values) on every 4 hours candle for the time considered (past WEEK), closing it quite quickly with 8 pips S/L or 4 pips T/P I'll try to explain things point by point: 1/ From the screenshots I see that you changed the interpolation settings (Runtime parameters in the screenshot 4) to 4 hours interpolated by tick on open: This means the historical tester (the data retrieved )will consider only the open price of every 4 hours candle. This will change the result of the test because you are modifying the real past data and as I said, the interpolation settings can be changed only in case of long period tests and for big and complex strategies which is not the case for you so better to leave it at "Tick". Hello Amine, sorry for my delayed update, formerly meant to be on Monday. I have studied all of your tips and suggestions, and found them really useful... now things seems to work much better, in that the backtest now is proceeding the given inputs in a way that matches my "wishes". Definitely leaving RUNTIME PARAMETERS set on "Tick" makes the job, allowing the system to read my data inputs as I meant. Also the bars are shown completely formed, and SL /TP values applied correctly. Thanks a lot again. If you do not mind, would now love to take advantage once more from your advices in order to learn more on the subject: what if I need now to backtest the same simple (for now) strategy, but for longer period tests? Which should be the correct inputs to be given to "RUNTIME PARAMETERS" to allow a "fast" backtesting, even for longer period tests? Supposing for example that I would like to test the very same simple strategy described above, with a default period always set at 4h, or even 1 day: leaving the interpolation settings on "TICK", until I set the Range within "LAST WEEK", the results come after a reasonable time. Results need much, much longer once I set parameters from "LAST MONTH" or longer. Is there any way to speed up backtesting, by setting different inputs? What if, wishing to backest for a range set for ex. at "LAST 6 MONTHS", I do change the interpolation setting PERIOD to 4h (or 1Day, whatever matches the defultperiod set on building my strategy) instead? I have already seen how this does not work once I leave "interpolated by TICK ON OPEN" (in the example shown above system does not "read" my instructions as I have meant them, and bars are drawn just as horizontal lines). Guess will be the same for "TICK ON CLOSE". What if I use "4 TICKS ON OHLC" or "CUBIC SPLINE"? Differently, If that's not the way, could you give me any other advice? Many thanks in advance!! Daniele
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Please some help and advice on my first test strategy |
Post rating: 0
|
Posted: Wed 18 May, 2016, 14:16
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi, There is two ways to test your strategy and I recommend to do both of them: 1/ In Visual Jforex platform: this is a quick way to test the strategy in short-to-medium term and then work out the strategy till the expected behaviour is met. To speed up the strategy, we implemented interpolation settings which, as I briefly explained in my previous reply, are couple of settings made to bypass certain tick prices that will not be used by the strategy. How do you know that a given tick price is not used by the strategy ? by looking to the strategy conditions: If you're using only candle close price in your conditions, it is useless to test the strategy by going through every single tick price within a candle it would be much more faster to "customize" historical tester by letting only candle close price to be checked --> The length of the test will be much more faster. Interpolation work this way: it only uses the 2 first parameters available in "Run time parameters" window which are: "Period" and "interpolated by" : If you select ticks, then no optimization is applied and the test in run as the normal market does. Say you set this to 15mn and interpolated by "4 ticks on OHLC" the system will use only OHLC prices (Open High, Low and Close) to build your 15mn candle. Same for the other options. Cubic spline is an algorithmic way to optimize the candle's prices (You may need to Google this to find more) 2/ In Jforex platform : you need to export your strategy to Jforex platform and test it there: the Historical tester is more powerful when it comes to processing speed for long term tests. More information about how to export your strategy to Jforex in this document: https://www.dukascopy.com/swiss/english ... hp?id=7999
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|