Go Back   NinjaTrader Support Forum > NinjaTrader 7 > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 05-23-2009, 05:51 PM   #1
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 676
Thanks: 0
Thanked 3 times in 3 posts
Default MACD ZeroLag w/Colors

Hello all,

I've uploaded a new indicator to the file sharing section. This is based on the ZeroLag MACD version already out there -- I just added some visuals that make it easier to see what is happening at a glance.

The zero line will be colored based on if the MACD line is above or below the average line, and if the overall trend is up or down.

In the below screen shots, the bottom panel is this MACD indicator:





You can download it here:
http://www.ninjatrader-support2.com/...id=198&catid=1

The other indicator "Mike Trend" is a work in progress, subscribe to my blog to get it and all the details.

Mike
ctrlbrk is offline  
Reply With Quote
Old 05-24-2009, 02:03 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,242
Thanks: 495
Thanked 1,866 times in 1,796 posts
Default

Thanks for sharing the modifications Mike!
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 05-25-2009, 12:03 AM   #3
primoto
Member
 
Join Date: Jul 2008
Posts: 30
Thanks: 3
Thanked 1 time in 1 post
Default

Hello,

I have a problem with the zerolagMACD of different type,
as you can see in the picture i send with this post.

So when i choose "calculate on bar close" to "false", the zero lag macd
indicator is going to zero .

Maybe someone can again help me .
Thanks
Attached Images
File Type: jpg ZerolagMacd2.jpg (62.9 KB, 398 views)
primoto is offline  
Reply With Quote
Old 05-25-2009, 05:55 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,242
Thanks: 495
Thanked 1,866 times in 1,796 posts
Default

Do you see an error in the Log tab of the Control Center when this happens primoto?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 05-25-2009, 06:52 AM   #5
primoto
Member
 
Join Date: Jul 2008
Posts: 30
Thanks: 3
Thanked 1 time in 1 post
Default Hi Bertrand, i have this in the log

########## Default Automated trading disabled ########## Default Vendor assembly 'KamaPivotRange' version='1.0.0.1' loaded. ########## Default Vendor assembly 'D3Spotter' version='1.0.0.1' loaded. ########## Default Current license: Type=SimulationOnly State=Verified StartDate=1/01/2005 EndDate=1/12/2099 Collective2 Dtn ESignal External OpenTick Provider2 Replay Simulator Yahoo Gain FFastFill Hosted InteractiveBrokers MBTrading Patsystems Provider1 Provider4 Tda TrackData TradingTechnologies AdvancedStrategyManagement AutomatedTrading BasicEntry Charting SuperDom ########## Default Session Break (Version 6.5.1000.9) ########## Default Verifying license at primary server... ########## Default Automated trading disabled ########## Default Vendor assembly 'KamaPivotRange' version='1.0.0.1' loaded. ########## Default Vendor assembly 'D3Spotter' version='1.0.0.1' loaded. ########## Default Current license: Type=SimulationOnly State=Verified StartDate=1/01/2005 EndDate=1/12/2099 Collective2 Dtn ESignal External OpenTick Provider2 Replay Simulator Yahoo Gain FFastFill Hosted InteractiveBrokers MBTrading Patsystems Provider1 Provider4 Tda TrackData TradingTechnologies AdvancedStrategyManagement AutomatedTrading BasicEntry Charting SuperDom ########## Default Session Break (Version 6.5.1000.9) ########## Default Verifying license at primary server...
primoto is offline  
Reply With Quote
Old 05-25-2009, 07:03 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,242
Thanks: 495
Thanked 1,866 times in 1,796 posts
Default

Primoto, this would need custom code modifications (removing the CalculateOnBarClose line in the ZeroLagEMA), so you might want to contact the original author and ask if it can be worked in.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 05-25-2009, 01:43 PM   #7
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 676
Thanks: 0
Thanked 3 times in 3 posts
Default

primoto,

This is a limitation of the ZeroLagEMA indicator which I did not write. This limitation occurs on anything using it, not just my MACD.

I will check to see if the fix is as simple as Bertrand states, that would be nice.

Mike
ctrlbrk is offline  
Reply With Quote
Old 05-26-2009, 09:23 AM   #8
primoto
Member
 
Join Date: Jul 2008
Posts: 30
Thanks: 3
Thanked 1 time in 1 post
Default

It 'ok, doing what Bertrand and sefstrat recommend is working.
Thanks for the info .
Have a nice day
primoto is offline  
Reply With Quote
Old 05-29-2009, 03:14 PM   #9
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 676
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello all,

Here is an updated version:

a) Fixed ZeroLagEMA onbarclose = false problem.
b) Added ADXVMA filter
c) Added Threshold filter (price must cross zero + threshold to trigger)
d) Changed logic, will now plot "up" if MACD + Threshold > ADX
e) Added Acceleration logic, can now keep "ratio" of 12,26,9 but speed up proportionally if desired



I also updated the zip in the file sharing section.

Mike
Attached Files
File Type: zip MACD_ZeroLag_Colors_BigMike_ctrlbrk_v204.zip (8.5 KB, 1108 views)
Last edited by ctrlbrk; 06-01-2009 at 06:52 PM.
ctrlbrk is offline  
Reply With Quote
The following user says thank you to ctrlbrk for this post:
Old 05-30-2009, 02:13 PM   #10
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 676
Thanks: 0
Thanked 3 times in 3 posts
Default

All,

Some people reported the zero line colors were still not working. So, I asked for professional help and Roonius fixed it. Thanks Roonius!

I also updated the file sharing section once again.

Mike
Last edited by ctrlbrk; 06-01-2009 at 06:52 PM.
ctrlbrk is offline  
Reply With Quote
Old 05-31-2009, 10:08 PM   #11
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 676
Thanks: 0
Thanked 3 times in 3 posts
Default

If you are still having problems with the zero line yellow dots, change the threshold to 0 instead of 0.1. Thanks once again to Roonius for point this out.

Mike
ctrlbrk is offline  
Reply With Quote
Old 06-01-2009, 06:51 PM   #12
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 676
Thanks: 0
Thanked 3 times in 3 posts
Default

Here is the new file with "0" threshold by default, to fix the yellow dot issue when looking at certain instruments.

I have updated the file sharing section.

I have also removed the prior versions above to avoid confusion.

Mike
Attached Files
File Type: zip MACD_ZeroLag_Colors_BigMike_ctrlbrk_v204.zip (8.5 KB, 638 views)
ctrlbrk is offline  
Reply With Quote
Old 06-08-2009, 06:36 PM   #13
Edwin
Junior Member
 
Join Date: Sep 2008
Posts: 9
Thanks: 0
Thanked 0 times in 0 posts
Default Tips on how to use the indicator

Hi,

I'm new to this threshold filter and adx thing... I hope I don't sound dumb but can someone explain how to enter and exit a trade based on the signals generated by this MACD? Especially taking into consideration the adx and price line - where is it on the Macd?


Quote:
Originally Posted by ctrlbrk View Post
Hello all,

Here is an updated version:

a) Fixed ZeroLagEMA onbarclose = false problem.
b) Added ADXVMA filter
c) Added Threshold filter (price must cross zero + threshold to trigger)
d) Changed logic, will now plot "up" if MACD + Threshold > ADX
e) Added Acceleration logic, can now keep "ratio" of 12,26,9 but speed up proportionally if desired



I also updated the zip in the file sharing section.

Mike
Edwin is offline  
Reply With Quote
Old 06-08-2009, 11:08 PM   #14
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 676
Thanks: 0
Thanked 3 times in 3 posts
Default

Edwin,

There is nothing wrong with asking questions!

My version of the MACD is different than the traditional MACD. For me, the ADXVMA line is helpful in determining trend. Per blog posts I've read, some found it helpful, others disliked it. My advice is that only you can be the judge of what works or doesn't work for you.

Personally I do not use a MACD in my trading, but many people are very successful at it.

The general concept of my MACD is to look at the zero line. Blue is long, Red is short, yellow is no-trade or "caution".

However, in the typical use of MACD you play off the divergence of the two EMA's, you can find more out there by looking on Google or here is a link:
http://www.investopedia.com/articles...ACDdiverge.asp

Mike
ctrlbrk is offline  
Reply With Quote
Old 07-11-2009, 03:42 PM   #15
kornipal
Junior Member
 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default How to use MACD ZeroLag indicator?

Can you explain me how to enter trades based on MACD Zerolag indicator?
Is it required to use with any other indicators?

I am new to futures.

Thank You in advance.

Kornipal
kornipal is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MACD with up down arrows on MACD signal line crosses moonriver Indicator Development 1 12-03-2008 11:34 AM
up/down different colors for macd hist zq655 Platform Technical Support 5 01-28-2008 08:16 PM
bar colors pgabriel Platform Technical Support 1 11-29-2007 12:12 PM
Custom Plot colors & Thresholds & Price marker colors higler General Development 5 06-22-2007 07:47 AM
Using MACD.avg vs. MACD Jim-Boulder Strategy Development 1 05-23-2007 07:41 AM


All times are GMT -6. The time now is 06:34 AM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.