Welcome to the Traders Laboratory Forums.
Technical Analysis The technical discussion forum for traders.

Reply
Old 06-08-2010, 04:14 PM   #1

Join Date: Jul 2009
Posts: 39
Ignore this user

Thanks: 36
Thanked 3 Times in 3 Posts

Slope of MACD Calculate Angle

I am looking to determine if its possible to determine the slope or angle of the MACD, fast line on a chart.

Trying to determine if there is a way to determine what this would be, and how to program this into an indicator.
v101 is offline  
Reply With Quote
Old 06-08-2010, 05:19 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: Slope of MACD Calculate Angle

how do you define "slope" ?
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 06-08-2010, 05:21 PM   #3

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: Slope of MACD Calculate Angle

Quote:
Originally Posted by v101 »
I am looking to determine if its possible to determine...
anything is possible...

if you can imagine it,
visualize it,
quantify it,
articulate it...

you can program it.
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 06-27-2010, 05:12 AM   #4

Join Date: Apr 2010
Location: Dhaka
Posts: 2
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Slope of MACD Calculate Angle

if any one program, then share it pls.
k_hr01 is offline  
Reply With Quote
Old 07-02-2010, 08:47 PM   #5

LS_Chad's Avatar

Status: Partner
Join Date: Mar 2007
Location: Atlanta, GA
Posts: 224
Ignore this user

Thanks: 0
Thanked 76 Times in 59 Posts

Re: Slope of MACD Calculate Angle

Slope is best defined as change per bar, IMO, when it comes to the slope of price or technical indicators.

MACD - MACD.1

If you define slope in "degrees", then the slope will change when you zoom the chart, resize the chart, rescale the chart, etc, Even though the change per bar remained constant.
LS_Chad is offline  
Reply With Quote
Old 07-08-2010, 10:27 AM   #6

Join Date: Jul 2009
Posts: 39
Ignore this user

Thanks: 36
Thanked 3 Times in 3 Posts

Re: Slope of MACD Calculate Angle

Thanks for the responses. I have attached a chart, to perhaps get some additional feedback, of what I am trying to accomplish.

We all know that if we adjust any chart the x and y axis of the chart, can be stretched up/down, and we can make any angle look greater or less than it actually is. So with this said, we can use a formula to determine slope of a line:

Standard slope is simply rise over run. 


Converting an angle to percentage terms is:


nSlopePct = Math.tan( nAngle * (Math.PI/180) );



where nAngle is the angle in degrees of the line in question.



If we look at the available options that are displayed with MACD:

MACD Signal Fast Line
MACD Slow Line
MACD Histogram

Based on these available values, I am looking for a way to use these values, to determine the angle or slope of the MACD, say if the MACD is flat, I don't necessarily want to be involved with that market, or if the angle is sharp up, I don't want to enter opposite to this momentum.

Any suggestions on how to use these values to return a value?
Attached Thumbnails
Slope of MACD Calculate Angle-macd1.png  
v101 is offline  
Reply With Quote
Old 07-09-2010, 09:32 AM   #7

Join Date: Dec 2008
Location: athens
Posts: 54
Ignore this user

Thanks: 0
Thanked 4 Times in 3 Posts

Re: Slope of MACD Calculate Angle

an angle is measured in geometry in terms of distance for both axis in two dimensions..

a..if you consider price as distance then how you quantify time or other resolutions?
what you have here in one axis is price and in the other a barnumber..
it is quite unlikely to get what we commonly think as an angle from these 2 dimensions

b. what will be your switch that will reset the calculation( point a from whitch you start calculating to point b...and reset to point a and so on).

**** regarding slope *****
fixed length is a trap because it is an arbitrary assumption,the market doesnt fit its behaviour in a rolling cycle ask john elhers he knows all about it...
almost all his published studies are based on cycles and geometry functions and his
" reputable " mesa system on openrange breakout if i am informed well...

let us know if you come up with something...
andypap is offline  
Reply With Quote
The Following User Says Thank You to andypap For This Useful Post:
Tams (07-09-2010)
Old 07-13-2010, 04:33 AM   #8

Join Date: Jan 2010
Location: Montreal
Posts: 1
Ignore this user

Thanks: 2
Thanked 0 Times in 0 Posts

Re: Slope of MACD Calculate Angle

Hi V101,

Ninjatrader has a fonction called "Slope" to calculate angles i believe,

it shoudn't be too difficult to apply it to the MACD fast line in a custom indicator


cheers,

Totantaz
totantaz is offline  
Reply With Quote

Reply

Tags
macd, slope

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


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