Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 08-04-2008, 08:18 PM   #1
Tresor

Status: Guest
Posts: n/a
Ignore this user




Ease of Movement Signals

Hello guys,

I was trying to convert RSI midline cross signals (that was kindly coded by Blu-Ray) into Ease of Movement midline cross signals, but I failed. Could someone please help me with this code?

inputs:
Price( avgprice ),
Length( 50 ),
ProfitTarget(150),
StopLoss(100);

variables: MyEOM( 0 ) ;

MyEOM = EaseOfMovement( Price, Length ) - 50;

If MyEOM Crosses above 0 then buy next bar at market;

If MyEOM Crosses below 0 then sellshort next bar at market;


setprofittarget(ProfitTar get);
Setstoploss(StopLoss);



Regards
 
Reply With Quote
Old 08-05-2008, 01:14 PM   #2

Blu-Ray's Avatar

Join Date: Nov 2006
Location: England
Posts: 508
Ignore this user

Thanks: 164
Thanked 288 Times in 105 Posts



Re: Ease of Movement Signals

Tresor

Just modify this line:

MyEOM = EaseOfMovement( Price, Length );

It should now work fine...... I put the " -50 " in the RSI as that indicator has a midline of 50, whereas the EOM's midline is already 0.

Hope this helps

Blu-Ray
__________________

“ Search is the ultimate expression of the power of the individual, using a computer, looking at the world, and finding exactly what they want ” – Eric Schmidt, Google
Blu-Ray is offline  
Reply With Quote
Old 08-05-2008, 02:02 PM   #3
Tresor

Status: Guest
Posts: n/a
Ignore this user




Re: Ease of Movement Signals

Hello Blu-Ray,

I tried this code:

inputs:
Price( avgprice ),
Length( 50 ),
ProfitTarget(150),
StopLoss(100);

variables: MyEOM( 0 ) ;

MyEOM = EaseOfMovement( Price, Length );

If MyEOM Crosses above 0 then buy next bar at market;

If MyEOM Crosses below 0 then sellshort next bar at market;


setprofittarget(ProfitTar get);
Setstoploss(StopLoss);

but still no luck, cannot be compiled

Regards
 
Reply With Quote
Old 08-05-2008, 05:57 PM   #4

Join Date: Feb 2007
Location: US
Posts: 314
Ignore this user

Thanks: 86
Thanked 204 Times in 89 Posts



Re: Ease of Movement Signals

Quote:
Originally Posted by Tresor »
MyEOM = EaseOfMovement( Price, Length );

but still no luck, cannot be compiled
Regards
ESL function EaseofMovement does not take any inputs. You may have copied this from some other platform. Try rewriting your own EaseOfMovement function (name it as _TEaseOfMovement for example) as follows:
Code:
inputs: Price (numericseries), SmoothingLength (numericsimple);

{ EOM = 100 * MFI * MidPointMove; note that this formula is a simpler mathematical 
  equivalent of Richard Arms' original formula }

if BarType >= 2 then { ie, not tick/minute data } 
	_TEaseOfMovement = Average( 100 * MFI( Volume ) * ( ( Price ) - ( Price )[1] ) * .5 , SmoothingLength)
else { if tick/minute data; in the case of minute data, also set the "For volume, 
 use:" field in the Format Symbol dialog to Trade Vol or Tick Count, as desired }
	_TEaseOfMovement = Average( 100 * MFI( Ticks ) * ( ( Price ) - ( Price )[1] ) * .5  , SmoothingLength);
Be sure to change your original strategy signal file line number 9:

MyEOM = _TEaseOfMovement( Price, Length );
thrunner is offline  
Reply With Quote
The Following User Says Thank You to thrunner For This Useful Post:
Old 08-05-2008, 06:23 PM   #5
Tresor

Status: Guest
Posts: n/a
Ignore this user




Re: Ease of Movement Signals

Thank you thrunner

Works perfectly
 
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual RSI + RSI Mid Line Signals Tresor Coding Forum 3 07-28-2008 08:12 PM
What chart to use for price movement in this way? Sunnyside Beginners Forum 9 11-13-2007 09:53 PM
[Warning Signals with Volume] Soultrader Trading Videos 1 03-02-2007 06:55 AM
Learning Price Movement Lisa Technical Analysis 5 09-11-2006 10:21 PM

All times are GMT -4. The time now is 10:03 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.