|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
use of trend envelopes indicator |
donimiri
|
Post subject: use of trend envelopes indicator |
Post rating: 0
|
Posted: Wed 02 Nov, 2011, 10:01
|
|
User rating: 0
Joined: Fri 28 Oct, 2011, 15:10 Posts: 5 Location: PL
|
hi,
I'm looking at a strategy which would use trend envelopes indicator (trendEnv). can you show me how to write a code that would open a long position when a Low Band is activated and close a previous position and analogically open a short position when High band is activated? I couldn't find out how this indicator outputs color.
can u help me with this?
also couldn't find any similar indicator on wiki or forum
|
|
|
|
 |
janjjj
|
Post subject: Re: use of trend envelopes indicator |
Post rating: 0
|
Posted: Wed 02 Nov, 2011, 14:47
|
|
User rating: 3
Joined: Thu 28 Jul, 2011, 19:40 Posts: 72 Location: PolandPoland
|
I wrote for you an example of such a strategy.
Attachments: |
trendEnvStrategySample.java [2.5 KiB]
Downloaded 343 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.
|
|
|
|
|
 |
donimiri
|
Post subject: Re: use of trend envelopes indicator |
Post rating: 0
|
Posted: Wed 02 Nov, 2011, 15:25
|
|
User rating: 0
Joined: Fri 28 Oct, 2011, 15:10 Posts: 5 Location: PL
|
dzieki bardzo - reszta po angielsku
thanx - very usefull. However, I still don't quite understand one thing. When I run it trough historical tester, opened positions close after 15pips or so ( see attachments ) . Same thing occurs with different time period and deviation settings. What I am after is rather a strategy which keeps position opened until previously mentioned Bands change from one to another.
could u show me how to make that thing work?
Attachments: |
File comment: ex
snap.jpg [191.65 KiB]
Downloaded 435 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.
|
|
|
|
|
 |
janjjj
|
Post subject: Re: use of trend envelopes indicator |
Post rating: 0
|
Posted: Wed 02 Nov, 2011, 15:56
|
|
User rating: 3
Joined: Thu 28 Jul, 2011, 19:40 Posts: 72 Location: PolandPoland
|
Done 
Attachments: |
trendEnvStrategySample.java [2.83 KiB]
Downloaded 316 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.
|
|
|
|
|
 |
donimiri
|
Post subject: Re: use of trend envelopes indicator |
Post rating: 0
|
Posted: Wed 02 Nov, 2011, 16:56
|
|
User rating: 0
Joined: Fri 28 Oct, 2011, 15:10 Posts: 5 Location: PL
|
well done! cheers man!
but somehow it fells like ST was still relevant. could u show me how to implement it back into the code. As with the second version it would exit and open positions on the start and end of each Band, however it would exit if the price reaches certain predefined level.
appreciate your help! many thanx
|
|
|
|
 |
janjjj
|
Post subject: Re: use of trend envelopes indicator |
Post rating: 0
|
Posted: Wed 02 Nov, 2011, 17:11
|
|
User rating: 3
Joined: Thu 28 Jul, 2011, 19:40 Posts: 72 Location: PolandPoland
|
You must also set the take profit and stop loss at submitOrder.
Attachments: |
trendEnvStrategySample.java [3.13 KiB]
Downloaded 371 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.
|
|
|
|
|
 |
donimiri
|
Post subject: Re: use of trend envelopes indicator |
Post rating: 0
|
Posted: Wed 02 Nov, 2011, 18:26
|
|
User rating: 0
Joined: Fri 28 Oct, 2011, 15:10 Posts: 5 Location: PL
|
|
|
|
 |
peroutrader
|
Post subject: Re: use of trend envelopes indicator |
Post rating: 0
|
Posted: Thu 08 Mar, 2012, 10:30
|
|
User rating: 0
Joined: Thu 23 Feb, 2012, 09:16 Posts: 1 Location: France, lyon
|
I don't understand why It doesn't work for me. I Use a demo account
|
|
|
|
 |
API Support
|
Post subject: Re: use of trend envelopes indicator |
Post rating: 0
|
Posted: Thu 08 Mar, 2012, 10:42
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
peroutrader wrote: I don't understand why It doesn't work for me. I Use a demo account Please elaborate.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|