|
Limit Time to make an Position |
nhamfx16
|
Post subject: Limit Time to make an Position |
Post rating: 0
|
Posted: Thu 08 Jun, 2017, 06:03
|
|
User rating: 0
Joined: Sat 26 Mar, 2016, 01:21 Posts: 11 Location: Vietnam, Ho Chi Minh
|
Dear all,
I am meeting difficulties to limit time for making an Order, Please help me.
I suppose that I have a stratergy as follows: Period = 1 hour
If "Last Bid Candle _ Candle close" Greater Than UpperBand then Sell 5 Milions, Take Profit 7 pips
If "Last Bid Candle _ Candle close" Less Than LowerBand then Buy 5 Milions, Take Profit 7 pips
3 minutes after profit reach 7 pips and Order closed. But at this time, the conditions still satisfy so that the Stratergy continue making an Order, this Order is in danger (I do not want to continue make next an Order because It is very in danger at this time).
How to limit time to make an Order (example from 0 second to 15 second after begining current candle the stratergy is allowed to make an Oder, from second 16, 17, 18......the stratergy is not allowed to make an Order). Please see the the stratergy attached
Attachments: |
File comment: The Stratergy
Time_Stra.vfs [26.34 KiB]
Downloaded 179 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.
|
|
|
|
|
|
nhamfx16
|
Post subject: Re: Limit Time to make an Position |
Post rating: 0
|
Posted: Fri 09 Jun, 2017, 05:47
|
|
User rating: 0
Joined: Sat 26 Mar, 2016, 01:21 Posts: 11 Location: Vietnam, Ho Chi Minh
|
Thank you very much for your quick feedback.
1- As you know my example stratergy attached last time. Because I use 1 hour Candle, once the conditions is verified, the stratergy will make an Order automatically (Order Buy or Sell). But I suppose that the fisrt Order reach 7pips profit 3 minutes after, then the 1st Order will be closed. At this time the conditions still is verified (Because I use 1 hour Candle), so the Stratergy will continue making the 2st Order automatically, if the 2st Order reach 7pips profit 3 minutes after, then the 2st Order will be closed and the Stratergy will continue making the 3rd Order automatically..........until next new 1 hour Candle.
Here I want that, once the Conditions is verified the Stratergy is allowed making 1 unique Order. Although that Order is clsosed the Stratergy is not allowed making any Oder until finised that Current Candle.
2- In order to do that I think we have to limit time for making an Order in the Current Candle (Example when Last Bid Candle Greater than UpperBand, and begining Current Cande, So within 15 second from begining Current Candle, the stratergy is allow to make an Order, Over 15 second the stratergy is not allow to make any Oder until finishing that Current Candle)
Please Help me
|
|
|
|
|
amine_chourou
|
Post subject: Re: Limit Time to make an Position |
Post rating: 1
|
Posted: Fri 09 Jun, 2017, 12:45
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi, You're welcome, let me clarify some essential concepts; When you say: Quote: 1- As you know my example stratergy attached last time. Because I use 1 hour Candle, once the conditions is verified, the stratergy will make an Order automatically (Order Buy or Sell). But I suppose that the fisrt Order reach 7pips profit 3 minutes after, then the 1st Order will be closed. At this time the conditions still is verified (Because I use 1 hour Candle), so the Stratergy will continue making the 2st Order automatically, if the 2st Order reach 7pips profit 3 minutes after, then the 2st Order will be closed and the Stratergy will continue making the 3rd Order automatically..........until next new 1 hour Candle. this is actually the way how the strategy works now because it is subscribed to 1H candles, so basically the strategy will check your entry conditions exactly when a candle is closed and new candle starts. so there shouldn't be more that a single order per 1H candle, you see ? Quote: Although that Order is clsosed the Stratergy is not allowed making any Oder until finised that Current Candle.
This also agreed: Even when a position is opened and closed within the same candle, there shouldn't be additional positions unless this candle is finished and a new one starts.
|
|
|
|
|
nhamfx16
|
Post subject: Re: Limit Time to make an Position |
Post rating: 0
|
Posted: Thu 22 Jun, 2017, 03:41
|
|
User rating: 0
Joined: Sat 26 Mar, 2016, 01:21 Posts: 11 Location: Vietnam, Ho Chi Minh
|
Thank you very much, your explanation is very clear.
By the way please correct the "Trailing Stop" in my attached stratergy, I try on my demo account but it do not work perfectly.
Best regards
Attachments: |
Stra_7_New.vfs [66.49 KiB]
Downloaded 170 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: Limit Time to make an Position |
Post rating: 1
|
Posted: Thu 22 Jun, 2017, 13:26
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi there,
Your trailing stop doesn't work because the implementation is wrong: There is 2 ways to work with positions: 1/ Create a "position" variable in every open at market block to indertify individually each block, this means that every block have to have a dedicated unique position variable. In your case, it's position15 and position15C which are used with duplication.
2/ Use position viewer block: many users make the same mistake with using the same output in position viewer block AND in open at market. this is a redundancy. When using position viewer with a new output, you save an array of data that belongs to these positions, meaning you save the entire list of positions opened. you can then filter this array and retrieve your LONG / SHORT positions for example.
Attached is the Version 2. I've made a quick test and I see that most of the positions created are made with the first 2 open @ market blocks having the comment "Traded15".
Attachments: |
Stra_7_V2.vfs [60.82 KiB]
Downloaded 156 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.
|
|
|
|
|
|
nhamfx16
|
Post subject: Re: Limit Time to make an Position |
Post rating: 0
|
Posted: Thu 22 Jun, 2017, 14:07
|
|
User rating: 0
Joined: Sat 26 Mar, 2016, 01:21 Posts: 11 Location: Vietnam, Ho Chi Minh
|
Thank you very much for your help, your explanation is very clear and easily understandable.
Best regards,
|
|
|
|
|
nhamfx16
|
Post subject: Re: Limit Time to make an Position |
Post rating: 0
|
Posted: Fri 23 Jun, 2017, 09:35
|
|
User rating: 0
Joined: Sat 26 Mar, 2016, 01:21 Posts: 11 Location: Vietnam, Ho Chi Minh
|
Dear Amine_chourou,
1-I try the above corrected stratergy on my demo account, the "Trailing Stop" worked well, but the stratergy created 3 positions at the same time, I do not know why?
2- I intend use this stratergy to join stratergy contest, but It created more than 1 position at the same time, does It infringe the contest rules?
Best regards
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|