Dukascopy
 
 
Wiki JStore Search Login

alternate take profit
 Post subject: alternate take profit Post rating: 0   New post Posted: Sun 11 Dec, 2016, 00:13 
User avatar

User rating: 0
Joined: Sun 24 Jul, 2016, 20:03
Posts: 6
Location: Canada,
Hi

Is it possible to close a trade once the slope of the EMA reaches 0? I am considering using this as an alternative to the take profit function

Regards


 
 Post subject: Re: alternate take profit Post rating: 0   New post Posted: Mon 12 Dec, 2016, 16:08 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

What's the currency pair that you're using ? Do you have an example of strategy?


 
 Post subject: Re: alternate take profit Post rating: 0   New post Posted: Sat 17 Dec, 2016, 22:05 
User avatar

User rating: 0
Joined: Sun 24 Jul, 2016, 20:03
Posts: 6
Location: Canada,
Hi

thanks for the prompt reply amine... I am using the EUR/USD. I don't have an example since I couldn't figure out how to get it to exit the strategy once it got close :/


 
 Post subject: Re: alternate take profit Post rating: 0   New post Posted: Sun 18 Dec, 2016, 12:50 
User avatar

User rating: 0
Joined: Sun 24 Jul, 2016, 20:03
Posts: 6
Location: Canada,
Sorry I misunderstood you... I attached an example of a trade.

The idea would be to sell when it reaches the red arrow since at the moment the change in the EMA 50 is 0 (it's value is 1.0594 for 2 consecutive periods). Basically, I'm looking for the program to exit when the derivative of EMA 50 is 0 over a certain period of time (maybe 2 for the time being).

Does that make sense?


 
 Post subject: Re: alternate take profit Post rating: 0   New post Posted: Sun 18 Dec, 2016, 12:52 
User avatar

User rating: 0
Joined: Sun 24 Jul, 2016, 20:03
Posts: 6
Location: Canada,
Image


Attachments:
File comment: example picture
www.tradingview.png [55.7 KiB]
Downloaded 266 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.
 
 Post subject: Re: alternate take profit Post rating: 0   New post Posted: Sun 18 Dec, 2016, 13:32 
User avatar

User rating: 6
Joined: Wed 05 Mar, 2014, 12:00
Posts: 116
Location: Ukraine, Odessa
Every your idea make sense!

Need only to find a positive statistics!

Regarding to your strategy. If I understood correctly the EMA equal 0 if difference between current value of ema and previous is equal 0 ( EMA50(1)-EMA50(2)=0). So you have to take values of the certain number of previous EMA and using IF block to check if they equal to each other. IF EMA(1)=EMA(2)...=EMA(n) -that is your ZERO value of EMA!
See an example:

Image


Attachments:
EMA.png [100.5 KiB]
Downloaded 249 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.
 
 Post subject: Re: alternate take profit Post rating: 0   New post Posted: Sun 18 Dec, 2016, 16:36 
User avatar

User rating: 0
Joined: Sun 24 Jul, 2016, 20:03
Posts: 6
Location: Canada,
Thank you! Your idea is so simple and great

My only question now is: once it enters a position, will it continuously check the "if equal" block?


 
 Post subject: Re: alternate take profit Post rating: 0   New post Posted: Mon 19 Dec, 2016, 10:03 
User avatar

User rating: 6
Joined: Wed 05 Mar, 2014, 12:00
Posts: 116
Location: Ukraine, Odessa
It will check The If block every candle if you meet the requirement:
Image

Last Candle.Period must be equal to yor Strategy period or defaultPeriod.

for more info please get a Visual Jforex Guide https://www.dukascopy.com/vfhelper/docu ... _locale=EN


Attachments:
EMA.png [56.5 KiB]
Downloaded 250 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.
 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com