|
amine_chourou
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Mon 11 Jul, 2016, 10:32
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
Here is an example as per your description. The idea is to use Get historical candle and use shifts values. every shift refer to a particular candle and then you compare open and close prices of the appropriate candles. In this example you can see that it handles 3 candles red/green followed by 1 candle Red/green and then a trade is submitted accordingly/
Cheers
Attachments: |
ExampleForTesting.vfs [33.71 KiB]
Downloaded 123 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.
|
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Tue 12 Jul, 2016, 07:15
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
thanks for your example. If i want to get more candle like 5 candle shall i add more shift or add more candle. Shall number of shift = number of candle.
|
|
|
|
|
amine_chourou
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Tue 12 Jul, 2016, 10:35
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
for a reasonable mount of candles, yes you can use as much as blocks as you need. If you need like 50 then the method will change and either you use the block get historical candles or you increase the trading period that you use and lookback for lower number of candles.
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 05:37
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
thank you very much I will try it out
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 06:41
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
how to add a trailing stop after open a new position.
|
|
|
|
|
amine_chourou
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 10:27
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
Once the position is opened (State = Filled) you can add the block "Trailing stop" block. make sure the trailing stop is not blocked by any condition so that the strategy will follow the step'd price accordingly Cheers
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 12:19
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
Thanks. I got it.
Is it possible to open a new position immediate after order close. example open buy close at stop loss then immediate open sell, open sell close at stop loss then immediate open buy. Attach is the sample in document.
Attachments: |
Doc1.doc [37 KiB]
Downloaded 74 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: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 13:22
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
Yes indeed, You have toi do the following: If you need a position de be opened immediately after the previous position close with loss then: - Check if the previous position is closed with SL : IF order is closed and IF P&L is negative - If you are trading on candle basis (with a given candle period as displayed in your doc) then the immediate opening should be plugged into "On tick" start point. Why ? because if you plug it on candle then position will be opened at the next candle open price, therefore it is not "immediate". to do so: Better to filter out the number of open positions and then use open at market at the opposite side.
Cheers
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 14:46
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
hi
Do you mean the whole strategy has to plugged into "on tick" start point or just the immediate opening "Check if the previous position is closed with SL : IF order is closed and IF P&L is negative" plugged into "on tick" start point.
|
|
|
|
|
amine_chourou
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 14:51
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
No, just the part related to the immediate opening. Or, simply use the trade event start point: this method is based on messages received, so once the position is closed with loss (i.e SL triggered) open an opposite one. I would recommend you this method actually.
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 15:55
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
hi
Is this what you mean as show in document.
Where to get the SL variable.
Attachments: |
Doc1.doc [75 KiB]
Downloaded 70 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: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 16:21
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
Not exactly, please check the attached strategy. (once the file downloaded, in Visual Jforex go to File > import and export if you wish to send an example)
Attachments: |
TradeOnMessage.vfs [21.74 KiB]
Downloaded 112 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.
|
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 13 Jul, 2016, 17:07
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
hi
I have done the example but it seem to open 2 position instead of 1 position after the stop loss.
Attachments: |
Doc1.doc [100.5 KiB]
Downloaded 68 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: Why my strategy has so many order |
Post rating: 0
|
Posted: Thu 14 Jul, 2016, 08:12
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
As far as I see it behaves correctly: Short position (6) closed with a loss then long position opened afterwards (7). The long one was closed with SL as well so it triggered another short one (8)
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Thu 14 Jul, 2016, 15:34
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
hi
Is it possible like after 6 and 7 closed 8 will not open.
|
|
|
|
|
amine_chourou
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Thu 14 Jul, 2016, 16:07
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Yes, in this case you would need to tell the system to execute this action only once. This can be done using a logical variable usually but can be indeed made using any other type. So you create a new variable and you give it a start value then once the "recovery" position is sent, you change the value of this variable. I've changed that in the attached example and you cans see the new "Go" variable that starts with the value true then switched to false afterwards. such logic can be applied to any other idea if you wish.
Attachments: |
TradeOnMessage_V2.vfs [23.66 KiB]
Downloaded 127 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.
|
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Mon 25 Jul, 2016, 15:43
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
Thanks. I will try it out. Is it possible to recognize inverted hammer, shooting star.
|
|
|
|
|
amine_chourou
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Mon 25 Jul, 2016, 16:13
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi, Well it depends how you define these patterns, check the following post where a 'pin bar' is described. you can reverse the logic to get your pattern. Make sure to define the candle's body size, the tail and the proportion of each part with regards to the other. https://www.dukascopy.com/swiss/english ... ern#p85454Cheers
|
|
|
|
|
tanbk
|
Post subject: Re: Why my strategy has so many order |
Post rating: 0
|
Posted: Wed 27 Jul, 2016, 07:59
|
|
User rating: 0
Joined: Mon 11 Jul, 2016, 04:28 Posts: 14 Location: SingaporeSingapore
|
hi
Thanks for your sample on tradeonmessage_V2. It did execute the action once as show in attachment. Is it possible during the next negative position it can open new position again but will stop at this new position and repeat the same action whenever there is negative position.
Attachments: |
Doc2.doc [57 KiB]
Downloaded 73 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.
|
|
|
|
|
|
|
Pages: [
1, 2
»
]
|
|
|
|
|