The formula for Arms' ease of movement is as follows:
[((H + L)/2) - ((Hp + Lp)/2)] divided by ((v)/ H - L))
Where:
H = Current periods high price
L = Current periods low price
Hp = the previous periods high price
Lp = the previous periods low price
V = current periods volume
yes its french sorry :-)
I have that to if it can help :
001 // Arms Ease of Movement Indicator
002 // Last changed on 2009-05-05
003 // Part of Forex Strategy Builder v2.8.3.7+
004 // Website http://forexsb.com/
005 // Copyright (c) 2006 - 2009 Miroslav Popov - All rights reserved.
006 // This code or any part of it cannot be used in other applications without a permission.
007
008 using System;
009 using System.Drawing;
010
011 namespace Forex_Strategy_Builder
012 {
013 /// <summary>
014 /// Arms Ease of Movement Indicator
015 /// </summary>
016 public class Ease_of_Movement : Indicator
017 {
018 /// <summary>
019 /// Sets the default indicator parameters for the designated slot type
020 /// </summary>
021 public Ease_of_Movement(SlotTypes slotType)
022 {
023 // General properties
024 IndicatorName = "Ease of Movement";
025 PossibleSlots = SlotTypes.OpenFilter | SlotTypes.CloseFilter;
026 SeparatedChart = true;
027
028 // Setting up the indicator parameters
029 IndParam = new IndicatorParam();
030 IndParam.IndicatorName = IndicatorName;
031 IndParam.SlotType = slotType;
032
033 // The ComboBox parameters
034 IndParam.ListParam[0].Caption = "Logic";
035 IndParam.ListParam[0].ItemList = new string[]
036 {
037 "The Ease of Movement rises",
038 "The Ease of Movement falls",
039 "The Ease of Movement changes its direction upward",
040 "The Ease of Movement changes its direction downward"
041 };
042 IndParam.ListParam[0].Index = 0;
043 IndParam.ListParam[0].Text = IndParam.ListParam[0].ItemList[IndParam.ListParam[0].Index];
044 IndParam.ListParam[0].Enabled = true;
045 IndParam.ListParam[0].ToolTip = "Logic of application of the indicator.";
046
047 IndParam.ListParam[1].Caption = "Smoothing method";
048 IndParam.ListParam[1].ItemList = Enum.GetNames(typeof(MAMethod));
049 IndParam.ListParam[1].Index = (int)MAMethod.Simple;
050 IndParam.ListParam[1].Text = IndParam.ListParam[1].ItemList[IndParam.ListParam[1].Index];
051 IndParam.ListParam[1].Enabled = true;
052 IndParam.ListParam[1].ToolTip = "The method of smoothing.";
053
054 // The NumericUpDown parameters
055 IndParam.NumParam[0].Caption = "Period";
056 IndParam.NumParam[0].Value = 13;
057 IndParam.NumParam[0].Min = 1;
058 IndParam.NumParam[0].Max = 100;
059 IndParam.NumParam[0].Enabled = true;
060 IndParam.NumParam[0].ToolTip = "The smoothing period.";
061
062 IndParam.NumParam[1].Caption = "Volume divisor";
063 IndParam.NumParam[1].Value = 10000;
064 IndParam.NumParam[1].Min = 1;
065 IndParam.NumParam[1].Max = 100000;
066 IndParam.NumParam[1].Enabled = true;
067 IndParam.NumParam[1].ToolTip = "This number is used to scale the volume.";
068
069 // The CheckBox parameters
070 IndParam.CheckParam[0].Caption = "Use previous bar value";
071 IndParam.CheckParam[0].Checked = PrepareUsePrevBarValueCheckBox(slotType);
072 IndParam.CheckParam[0].Enabled = true;
073 IndParam.CheckParam[0].ToolTip = "Use the indicator value from the previous bar.";
074
075 return;
076 }
077
078 /// <summary>
079 /// Calculates the indicator's components
080 /// </summary>
081 public override void Calculate(SlotTypes slotType)
082 {
083 // Reading the parameters
084 MAMethod maMethod = (MAMethod)IndParam.ListParam[1].Index;
085 int iPeriod = (int)IndParam.NumParam[0].Value;
086 int iDivisor = (int)IndParam.NumParam[1].Value;
087 int iPrvs = IndParam.CheckParam[0].Checked ? 1 : 0;
088
089 // Calculation
090 int iFirstBar = iPeriod + 2;
091
092 double[] adAEOM = new double[Bars];
093
094 for (int iBar = 1; iBar < Bars; iBar++)
095 {
096 adAEOM[iBar] = iDivisor * (High[iBar] - Low[iBar]) * ((High[iBar] + Low[iBar]) / 2 - (High[iBar - 1] -
097 Low[iBar - 1]) / 2) / Math.Max(Volume[iBar], 1);
098 }
099
100 adAEOM = MovingAverage(iPeriod, 0, maMethod, adAEOM);
101
102 // Saving the components
103 Component = new IndicatorComp[3];
104
105 Component[0] = new IndicatorComp();
106 Component[0].CompName = "Ease of Movement";
107 Component[0].DataType = IndComponentType.IndicatorValue;
108 Component[0].ChartType = IndChartType.Line;
109 Component[0].ChartColor = Color.LightSeaGreen;
110 Component[0].FirstBar = iFirstBar;
111 Component[0].Value = adAEOM;
112
113 Component[1] = new IndicatorComp();
114 Component[1].ChartType = IndChartType.NoChart;
115 Component[1].FirstBar = iFirstBar;
116 Component[1].Value = new double[Bars];
117
118 Component[2] = new IndicatorComp();
119 Component[2].ChartType = IndChartType.NoChart;
120 Component[2].FirstBar = iFirstBar;
121 Component[2].Value = new double[Bars];
122
123 // Sets the Component's type
124 if (slotType == SlotTypes.OpenFilter)
125 {
126 Component[1].DataType = IndComponentType.AllowOpenLong;
127 Component[1].CompName = "Is long entry allowed";
128 Component[2].DataType = IndComponentType.AllowOpenShort;
129 Component[2].CompName = "Is short entry allowed";
130 }
131 else if (slotType == SlotTypes.CloseFilter)
132 {
133 Component[1].DataType = IndComponentType.ForceCloseLong;
134 Component[1].CompName = "Close out long position";
135 Component[2].DataType = IndComponentType.ForceCloseShort;
136 Component[2].CompName = "Close out short position";
137 }
138
139 // Calculation of the logic
140 IndicatorLogic indLogic = IndicatorLogic.It_does_not_act_as_a_filter;
141
142 switch (IndParam.ListParam[0].Text)
143 {
144 case "The Ease of Movement rises":
145 indLogic = IndicatorLogic.The_indicator_rises;
146 break;
147
148 case "The Ease of Movement falls":
149 indLogic = IndicatorLogic.The_indicator_falls;
150 break;
151
152 case "The Ease of Movement changes its direction upward":
153 indLogic = IndicatorLogic.The_indicator_changes_its_direction_upward;
154 break;
155
156 case "The Ease of Movement changes its direction downward":
157 indLogic = IndicatorLogic.The_indicator_changes_its_direction_downward;
158 break;
159
160 default:
161 break;
162 }
163
164 OscillatorLogic(iFirstBar, iPrvs, adAEOM, 0, 0, ref Component[1], ref Component[2], indLogic);
165
166 return;
167 }
168
169 /// <summary>
170 /// Sets the indicator logic description
171 /// </summary>
172 public override void SetDescription(SlotTypes slotType)
173 {
174 EntryFilterLongDescription = "the " + ToString() + " ";
175 EntryFilterShortDescription = "the " + ToString() + " ";
176 ExitFilterLongDescription = "the " + ToString() + " ";
177 ExitFilterShortDescription = "the " + ToString() + " ";
178
179 switch (IndParam.ListParam[0].Text)
180 {
181 case "The Ease of Movement rises":
182 EntryFilterLongDescription += "rises";
183 EntryFilterShortDescription += "falls";
184 ExitFilterLongDescription += "rises";
185 ExitFilterShortDescription += "falls";
186 break;
187
188 case "The Ease of Movement falls":
189 EntryFilterLongDescription += "falls";
190 EntryFilterShortDescription += "rises";
191 ExitFilterLongDescription += "falls";
192 ExitFilterShortDescription += "rises";
193 break;
194
195 case "The Ease of Movement changes its direction upward":
196 EntryFilterLongDescription += "changes its direction upward";
197 EntryFilterShortDescription += "changes its direction downward";
198 ExitFilterLongDescription += "changes its direction upward";
199 ExitFilterShortDescription += "changes its direction downward";
200 break;
201
202 case "The Ease of Movement changes its direction downward":
203 EntryFilterLongDescription += "changes its direction downward";
204 EntryFilterShortDescription += "changes its direction upward";
205 ExitFilterLongDescription += "changes its direction downward";
206 ExitFilterShortDescription += "changes its direction upward";
207 break;
208
209 default:
210 break;
211 }
212
213 return;
214 }
215
216 /// <summary>
217 /// Indicator to string
218 /// </summary>
219 public override string ToString()
220 {
221 string sString = IndicatorName +
222 (IndParam.CheckParam[0].Checked ? "* (" : " (") +
223 IndParam.ListParam[1].Text + ", " + // Method
224 IndParam.NumParam[0].ValueToString + ", " + // Period
225 IndParam.NumParam[1].ValueToString + ")"; // Divisor
226
227 return sString;
228 }
229 }
230 }
no it's different, a very usefull one and i don't find it in MT4 :-(
I got that to, but find on the net and don't know if its good ..:
/********************************************************************
Title: Arms' Ease of Movement Plot for eSignal 7.x
By: Chris D. Kryza (Divergence Software, Inc.)
Email: c.kryza@gte.net
Incept: 05/12/2003
Version: 1.0.0
=====================================================================
Fix History:
05/12/2003 - Initial Release
1.0.0
=====================================================================
Project Description:
Arms Ease of Movement script. Plots two exponential averages of the
EMV which can be changed by using Edit Studies. The first average
defaults to 5 bars and the second average defaults to 13 bars.
If you come across any fixes or have any ideas on how to spruce it up, I
would appreciate it if you would let me know (c.kryza@gte.net).
Dislaimer: For educational purposes only! Obviously, no guarantees
whatsoever and use at your own risk.
**********************************************************************/
//Global Variables
var grID = 0;
var aEMA1 = new Array();
var aEMA2 = new Array();
var nEMA1 = 0;
var nEMA2 = 0;
var nCoeff1 = 0;
var nCoeff2 = 0;
//== PreMain function required by eSignal to set things up
function preMain() {
var x;
setPriceStudy(false);
setStudyTitle("Ease of Movement");
setCursorLabelName("EMV1", 0);
setCursorLabelName("EMV2", 1);
setDefaultBarFgColor( Color.blue, 0 );
setDefaultBarFgColor( Color.red, 1 );
addBand( 0, PS_SOLID, 1, Color.black, -99999 );
//setComputeOnClose();
grID = 0;
for (x=0; x<20; x++) {
aEMA1[x] = 0.0;
aEMA2[x] = 0.0;
}
}
//== Main processing function
function main( frPeriod1, frPeriod2 ) {
var x;
var nMidMove;
var nBoxRatio;
var nEMV;
if (frPeriod1==null) {
frPeriod1 = 5;
}
if (frPeriod2==null) {
frPeriod2 = 13;
}
//BARSTATE_ALLBARS means that study is just loading, generally
//you would just return during this phase
if (getBarState() == BARSTATE_ALLBARS) {
nCoeff1 = 2 / (frPeriod1+1);
nCoeff2 = 2 / (frPeriod2+1);
return null;
}
if (getBarState() == BARSTATE_NEWBAR) {
aEMA1.pop();
aEMA1.unshift( nEMA1 );
aEMA2.pop();
aEMA2.unshift( nEMA2 );
}
nMidMove = ((high()-low())/2) - ((high(-1)-low(-1))/2);
nBoxRatio = (volume()/10000) / (high()-low());
nEMV = nMidMove / nBoxRatio;
nEMA1 = ( nEMV * nCoeff1 ) + ( aEMA1[0] * ( 1.0-nCoeff1 ) );
nEMA2 = ( nEMV * nCoeff2 ) + ( aEMA2[0] * ( 1.0-nCoeff2 ) );
if (!isNaN( nEMA1 ) ) {
return new Array( nEMA1, nEMA2 );
}
}
/*************************************************
SUPPORT FUNCTIONS
**************************************************/
//== gID function assigns unique identifier to graphic/text routines
function gID() {
grID ++;
return( grID );
}
//== displayError function displays an error to the user
function displayError( ErrStr ) {
drawTextRelative(20, 50, ErrStr, Color.maroon, Color.lightgrey, Text.FRAME | Text.ONTOP | Text.RELATIVETOLEFT | Text.RELATIVETOBOTTOM, null, 16, gID());
}
//== SortMe function sorts an array in ascending order
function SortMe( arg1, arg2 ) {
if (arg1<arg2) {
return( -1 )
}
else {
return( 1 );
}
}
//==fmt will truncate the degrees value for display purposes.
function fmt( value ) {
var tmp;
tmp = value;
value = Math.abs( value );
value = Math.round( value );
if (tmp<0) value = 0-value;
return( value );
}
//==rnd will round to N digits.
function rnd(value, N) {
var n;
var mult=1;
for(n=0;n<N;n++) mult*=10;
value*=mult;
return Math.round( value,N)/mult;
}
//== Frac functions returns the fractional portion of a real number
function Frac( iVal ) {
var x = Math.floor( iVal );
return( iVal - x );
}
This indicator does not exist on MT4 ? some body could code it please ! it s a very good one even for a EA
EMV = [((H + B)/2) - ((Hp + Bp)/2)] / (V/( H - B)) * 10 000
H = Plus haut de la période courante ( semaine, séance)
B = Plus bas de la période courante
Hp = Plus haut de la période précédente
Bp = Plus bas de la période précédente
V = Volume de la période courante
EMV(t) = moyenne mobile sur les 14 dernières séances
Tu peux toujours essayer celui-ci.
you can try this code
Tu peux toujours essayer celui-ci.
you can try this code
Merci beaucoup Romrob ! :-)
Is EMI like EMV ? I've tried and it dont seems to be different but thank you
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
This indicator does not exist on MT4 ? some body could code it please ! it s a very good one even for a EA
EMV = [((H + B)/2) - ((Hp + Bp)/2)] / (V/( H - B)) * 10 000
H = Plus haut de la période courante ( semaine, séance)
B = Plus bas de la période courante
Hp = Plus haut de la période précédente
Bp = Plus bas de la période précédente
V = Volume de la période courante
EMV(t) = moyenne mobile sur les 14 dernières séances