Hi there,
I have attempted to create a simple strategy that (1) enters with a market trade at time X, (2) with a stop loss = entry price - Y and a take profit = entry + Z and (3) a clear position trade, that clears all positions at time T.
There should only be one position entered a day (enter at X and will always be cleared by T in the same day).
I have created the attached as a simple start. However, when I run the code, and keep the period at 1 tick, I find that the simulator enters multiple positions (albeit at the right time) and exits at take profit levels that are not consistent with my inputs. This problem occurs on essentially all periods. I prefer to keep the parameter at 1 tick, to simulate realistic market conditions.
I have followed the various forum articles regarding entering positions at specific times, but none of them address the problem mentioned above (i.e., excess number of positions entered when using a granular time period parameter).
Apologies if this is a simple question, but I am just getting started.
Thanks in advance!
Attachments: |
Timetest3.vfs [34.86 KiB]
Downloaded 192 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.
|
|