Dukascopy
 
 
Wiki JStore Search Login

EMA Angle
 Post subject: EMA Angle Post rating: 0   New post Posted: Wed 22 Nov, 2017, 19:12 
User avatar

User rating: 1
Joined: Sun 27 Apr, 2014, 02:32
Posts: 28
Location: Switzerland, Zürich
Hi there,

Is it possible to set the angle of a EMA?

For example in the attached strategy..

I would like the trade to be pushed only if between candle shift7 and candle shift10
the angle of EMA8 is at least 30 degrees.

If it's less than 30 degrees no trade is pushed. If it's 30' or higher the trade is triggered.

Can you please show me how to implement such a "filter".

Cheers.

Oli
Image


Attachments:
EMA8EMA21Test1.vfs [62.92 KiB]
Downloaded 196 times
EMA 30 degree angle.png [8.52 KiB]
Downloaded 368 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: EMA Angle Post rating: 0   New post Posted: Wed 22 Nov, 2017, 20:37 
User avatar

User rating: 5
Joined: Thu 04 Aug, 2016, 04:51
Posts: 61
Location: CanadaCanada
Hello Oli,

By using the "Calculation Expression" and "IF" components for trigonometric formulas, a precise result can be achieved. :geek:


Cheers!


 
 Post subject: Re: EMA Angle Post rating: 1   New post Posted: Thu 23 Nov, 2017, 14:46 
Visual JForex expert at Dukascopy
User avatar

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

trigonometric functions are indeed available in calculation block expression but I did not used that for such purpose because the need of angle calculation itself is not necessary in my opinion.
Look at the following:


Image
and
Image

Both displaying the same triangle same pair and same EMA. I've just shrunken the price scale and the figure has clearly changed.
I believe the idea of angle calculation could be substituted by calculation if the distance between candles. In your case I would analyze charts where I see such 30° angle and measure the height distance in pips between candle 7 and 10 for instance ..something like this :

Image


Attachments:
30.JPG [31.79 KiB]
Downloaded 608 times
45.JPG [33.5 KiB]
Downloaded 363 times
Points.png [12.6 KiB]
Downloaded 350 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: EMA Angle Post rating: 0   New post Posted: Fri 24 Nov, 2017, 18:10 
User avatar

User rating: 1
Joined: Sun 27 Apr, 2014, 02:32
Posts: 28
Location: Switzerland, Zürich
Ok guys thank you for the information. :)

Another question:

Is it possible to have the trade triggered only if:

- The next higher Time Frame's EMA(s) are pointing in the same direction?

This would add some confluence to trend following strategies..

Cheers

Oli


 
 Post subject: Re: EMA Angle Post rating: 1   New post Posted: Sat 25 Nov, 2017, 18:24 
User avatar

User rating: 5
Joined: Thu 04 Aug, 2016, 04:51
Posts: 61
Location: CanadaCanada
Greetings,

First off, after reading Mr. Chourou's post above, I totally concur with him about using Trigonometry can complicate things (as shown on his screenshots too), while just a simple Algebraic formula of Distance and Time is not only the simplest way but also the most efficient to be used as the calculation logic in your strategy.

Now as for your recent question about Moving Averages and keeping a track of their trend, the most effective way to go about it is by modifying the "Shift" integer when collecting data from any indicator in your strategy. As you may see from the following screenshot of a very simple strategy based on the Simple Moving Average Indicator; there are two candles being analyzed - the Current 10M Candle and the 10M candle before it by including the number 1 into the Shift integer. This method can be used for tracking or checking the Moving Averages over a longer course of past candle periods by adding more indicator components in your strategy and modifying their Shift values.

Image

Based on my own experience with Visual JForex so far, I will share with you that I have overcame most of the challenging issues that I once faced and as well gained a lot of new knowledge by going through the previous forum threads here, especially the strategy examples that Mr.Chourou has attached on any topic.



Cheers!


 

Jump to:  

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