|
How to have the strategy wait for some time before opening a new position |
nicbrunelli
|
Post subject: How to have the strategy wait for some time before opening a new position |
Post rating: 0
|
Posted: Thu 23 May, 2013, 03:45
|
|
User rating: 0
Joined: Sat 04 May, 2013, 16:08 Posts: 17 Location: ItalyItaly
|
Hello everybody, hello support. I really need some help with this, I can't figure out how to do it. I'm going to explain step by step
-the strategy looks at the beginning of actual candle (hourly) how was the previous candle -if the previous candle meet my requests, a position is opened (pending or market). Stop Loss and Profit are set as PRICE LEVELS. -during the actual candle, the price goes either to my stop or to my target. So the position is closed. -now there are no open positions anymore, and previous candle is still the one that has my characteristics, because actual candle is not over yet -so the strategy opens another order/position, but it stops right away. -again and again, till the actual candle is over.
Now, I am tryin hard to understand how set the strategy to wait until actual candle is over before placing a new order. But how??
In the attached picture is my last try, I'm gonna explain what i think:
-If in last trading event - position is closed -get the time unit of "close time" and set it as a variable - add 1hour (3600000 milliseconds) to the "close time" and set the result as a "newtime" - if last tick bid is equal or more as "newtime", go ahead with the strategy.
the beginning "on tick" is for the indicators, but the orders begin "on candle", because it looks how was previous candle.
Where is my mistake, or how can I get this result?
thank you very much
nic
Attachments: |
cattura1.JPG [166.03 KiB]
Downloaded 497 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.
|
|
|
|
|
|
nicbrunelli
|
Post subject: Re: How to have the strategy wait for some time before opening a new position |
Post rating: 0
|
Posted: Thu 23 May, 2013, 04:19
|
|
User rating: 0
Joined: Sat 04 May, 2013, 16:08 Posts: 17 Location: ItalyItaly
|
OK I got it finally
All I had to do is to put an "if" block after the "on candle" beginning, and set the candle period as hourly.
|
|
|
|
|
doczero
|
Post subject: Re: How to have the strategy wait for some time before opening a new position |
Post rating: 0
|
Posted: Sat 25 May, 2013, 00:57
|
|
User rating: 7
Joined: Wed 04 Jul, 2012, 02:40 Posts: 109 Location: Australia, Melbourne
|
Hi Nic,
Can you share your strategy & picture here to help everyone with this?
Thanks DoC
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|