Dukascopy
 
 
Wiki JStore Search Login

how detect if a line is smaller than itself previous ?
 Post subject: how detect if a line is smaller than itself previous ? Post rating: 0   New post Posted: Sat 12 Oct, 2013, 11:45 

User rating: 0
Joined: Wed 18 Sep, 2013, 18:29
Posts: 7
Location: ItalyItaly
hi all

i try to explain..it is simple but my english not good... here it is:
my objective is to detect if an UPgoing EMA suddenly start go DOWN.
in my idea i should detect if EMA on "last candle" is bigger than previous one (this mean bullish EMA).
when suddenly "last candle" EMA is smaller than previous candle EMA, (this means bearish EMA), in this moment, on candle close i wish detect this reverse.

thanks for every help !

bye!


 
 Post subject: Re: how detect if a line is smaller than itself previous ? Post rating: 0   New post Posted: Mon 14 Oct, 2013, 10:11 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Greetings.

To understand if SMA is going up or down you need to compare last two values of it.

Image

And if you want to find turning-point in SMA you need last three values. And you need to check if SMA have made V shape turn.

Image


Attachments:
Pic2.png [73.84 KiB]
Downloaded 407 times
Pic1.png [52.11 KiB]
Downloaded 398 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: how detect if a line is smaller than itself previous ? Post rating: 0   New post Posted: Mon 14 Oct, 2013, 13:26 

User rating: 0
Joined: Wed 18 Sep, 2013, 18:29
Posts: 7
Location: ItalyItaly
really thanks for your help, it was more than i hoped! :)
a clear explanation, with a working example too...really thanks!
bye!


 
 Post subject: Re: how detect if a line is smaller than itself previous ? Post rating: 0   New post Posted: Thu 17 Oct, 2013, 09:49 
User avatar

User rating: 0
Joined: Wed 24 Oct, 2012, 17:12
Posts: 20
Location: France, Paris
Hi all,

Well good job guys !

Anyway, I notice that your strategy retrieve 30 SMA about last candles AND the current candle (shift = 0).

Why do you need to retrieve SMA concerning a current candle whom is not yet formed ?

Thanks for your answer and good trades !


 
 Post subject: Re: how detect if a line is smaller than itself previous ? Post rating: 0   New post Posted: Thu 17 Oct, 2013, 10:54 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
onCandle event happens when candle is closed.
So Shift=0 will give you a value of candle just closed.
One Tick later it would be new candle.


 

Jump to:  

cron
  © 1998-2025 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