NexusFi: Find Your Edge


Home Menu

 





MACD Angle


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one c12345 with 1 posts (0 thanks)
    2. looks_two Fat Tails with 1 posts (2 thanks)
    3. looks_3 Big Mike with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 4,355 views
    2. thumb_up 3 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 1 attachments




 
Search this Thread

MACD Angle

  #1 (permalink)
c12345
PA
 
Posts: 81 since Sep 2009
Thanks Given: 4
Thanks Received: 47

I am looking to determine the math and logic to program a indicator to calculate the Angle of the MACD fast line. Such as to get a value returned as 60% or 30%, etc. etc.

Any ideas or suggestions on how to do this? Some ideas were linear regression, and I've seen some other ideas posted other forums, but nothing really that does this, that I can find....

If anyone has any ideas, on how to do this, I would like to discuss them with you.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Increase in trading performance by 75%
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
17 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
12 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


The big problem with angles is that they depend on both the horizontal and vertical scale of the chart. As both price and indicator panels of the charts use Autoscale for the y-axis, you will get different angles for the same price action depending on the volatility 50 bars ago. I never understood, how anybody could use angles. This is non-sense, unless you swear to never compress or expand neither the x-scale nor the y-scale and never change instruments.

A better concept than angles would be momentum. The chart below shows a momentum with periods 3 (green) and 6 (red) applied to the MACD. Applying an indicator to an indicator is only possible with NT7.



c12345 View Post
I am looking to determine the math and logic to program a indicator to calculate the Angle of the MACD fast line. Such as to get a value returned as 60% or 30%, etc. etc.

Any ideas or suggestions on how to do this? Some ideas were linear regression, and I've seen some other ideas posted other forums, but nothing really that does this, that I can find....

If anyone has any ideas, on how to do this, I would like to discuss them with you.


Attached Thumbnails
Click image for larger version

Name:	Slope of MACD.jpg
Views:	325
Size:	111.6 KB
ID:	15114  
Reply With Quote
Thanked by:
  #4 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,440 since Jun 2009
Thanks Given: 33,212
Thanks Received: 101,599

Here is some code I used before to do this. I just tore it from a indicator, I do not use Ninja anymore for charting so you'll need to make appropriate changes as the code is not plug-n-play. I removed some of the fancier part of the code because it is from an Elite indicator and this is a non-Elite section.

It shows the angle of the line in degrees.

 
Code
                            
if (ShowSlope)

            {
                
double radToDegrees 180/Math.PI;
                
                
double _slope0        = (int)(radToDegrees*(Math.Atan((collective[0]-(collective[1]+collective[2])/2)/1.5/TickSize)));
                
                
Slope.Set(_slope0);
                
                
DrawOnPricePanel    false;
                
DrawTextFixed("Slope""CMA Slope:\n0 = " _slope0.ToString("0") + "°\n1 = " _slope1.ToString("0") + "°\n2 = " _slope2.ToString("0") + "°"TextPosition.BottomRightslopecolor, new Font("Tahoma"8), Color.Empty, Color.Empty, 10);
            } 
Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on June 8, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts