Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Updated September 6, 2012
Top Posters
looks_one
alright
with 4 posts (0 thanks)
looks_two
marker
with 3 posts (0 thanks)
looks_3
futurestrader1
with 3 posts (0 thanks)
looks_4
eDanny
with 2 posts (7 thanks)
Best Posters
looks_one
eDanny
with 3.5 thanks per post
looks_two
Markus
with 2 thanks per post
looks_3
cory
with 1 thanks per post
looks_4
max-td
with 0.5 thanks per post
trending_up
9,595 views
thumb_up
12 thanks given
group
8 followers
forum
21 posts
attach_file
6 attachments
June 30th, 2010, 02:23 AM
Frankfurt
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927
hello marker,
welcome to BigMikeTrading - forum !
if you have questions, please provide as much explaination of your topic as you can. if folks dont understand what you mean you will get no answers.
so the best way is to post a screenshot of chart with the indicator and explain it with some more words.
sorry, but with questions like :
where is the line ?
OR
please i need 4 colors !
noone really knows what people are talking about.
hope that makes sense.
looking forward to hear from you !
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
July 2nd, 2010, 09:44 PM
Texas
Posts: 113 since Jun 2010
I'm just wondering how to get the ccs file into ninja trader ? Anyone Anyone?
July 2nd, 2010, 10:53 PM
virginia
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090
we get this question one a month
July 3rd, 2010, 12:16 AM
Bellingham, WA
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: 6E, CL
Posts: 491 since Aug 2009
Thanks Given: 747
Thanks Received: 259
July 4th, 2010, 02:00 AM
New York City, USA
Experience: Advanced
Platform: NinjaTrader
Trading: ES, CL, 6E
Posts: 149 since Jun 2010
Thanks Given: 81
Thanks Received: 42
Here is what i want...
Based on a MACD with only the AVERAGE line plotting as the line and the histogram bars.
This one has a neutral plot on the histogram...i don't know how.
easy visible signals on the line is nice to have from green to red based on the zero line.
July 5th, 2010, 09:52 AM
East Rochester, NY
Experience: Intermediate
Platform: NT
Posts: 329 since Jul 2009
Thanks Given: 18
Thanks Received: 425
...on for size.
futurestrader1
Here is what i want...
Based on a MACD with only the AVERAGE line plotting as the line and the histogram bars.
This one has a neutral plot on the histogram...i don't know how.
easy visible signals on the line is nice to have from green to red based on the zero line.
Attached Files
Elite Membership required to download: MACD_Z.zip
July 5th, 2010, 11:25 AM
New York City, USA
Experience: Advanced
Platform: NinjaTrader
Trading: ES, CL, 6E
Posts: 149 since Jun 2010
Thanks Given: 81
Thanks Received: 42
Thanks eDanny....this is really great!
July 5th, 2010, 12:05 PM
Frankfurt am Main
Posts: 38 since May 2010
Thanks Given: 6
Thanks Received: 33
Here's the MACD that paints bars when above or below zero line
Attached Files
Elite Membership required to download: MacdZeroLineColorBar.zip
July 8th, 2010, 04:51 PM
New York City, USA
Experience: Advanced
Platform: NinjaTrader
Trading: ES, CL, 6E
Posts: 149 since Jun 2010
Thanks Given: 81
Thanks Received: 42
eDanny
Thanks.... I've been finding that the AVERAGE line, which you supplied above is great but the actual MACD signal line can work even better.
Can you please code it for the Signal line.... or if someone could reply with the code adjustment.
Code
//
//
#region Using declarations
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.ComponentModel;
using System.Xml.Serialization;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
/// <summary>
/// The MACD_Z is a trend following momentum indicator.
/// </summary>
[Description("The MACD_Z is a trend following momentum indicator.")]
public class MACD_Z : Indicator
{
#region Variables
private int fast = 5;
private int slow = 15;
private int smooth = 10;
private MACD Z;
#endregion
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(new Pen(Color.Green, 2), PlotStyle.Line, "Z_Hi"));
Add(new Plot(new Pen(Color.Red, 2), PlotStyle.Line, "Z_Lo"));
Add(new Plot(new Pen(Color.Green, 3), PlotStyle.Bar, "Z_Rising"));
Add(new Plot(new Pen(Color.Red, 3), PlotStyle.Bar, "Z_Falling"));
Add(new Plot(new Pen(Color.DimGray, 3), PlotStyle.Bar, "Z_Neutral"));
CalculateOnBarClose = false;
}
public override string ToString()
{return Name;}
/// <summary>
/// Calculates the indicator value(s) at the current index.
/// </summary>
protected override void OnBarUpdate()
{
if (CurrentBar == 0)
{
Z = MACD(Close, fast, slow, smooth);
Plots[0].Min = 0;
Plots[1].Max = 0;
}
else
{
ZHi.Set(Z.Avg[0]); ZLo.Set(Z.Avg[0]);
if(ZHi[0] > 0 && Z.Diff[0] > 0)
ZR.Set(Z.Diff[0]);
else
if(ZLo[0] < 0 && Z.Diff[0] < 0)
ZF.Set(Z.Diff[0]);
else
ZN.Set(Z.Diff[0]);
}
}
#region Properties
/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries ZHi
{
get { return Values[0]; }
}
/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries ZLo
{
get { return Values[1]; }
}
/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries ZR
{
get { return Values[2]; }
}
/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries ZF
{
get { return Values[3]; }
}
/// <summary>
/// </summary>
[Browsable(false)]
[XmlIgnore()]
public DataSeries ZN
{
get { return Values[4]; }
}
/// <summary>
/// </summary>
[Description("Number of bars, fast")]
[Category("Parameters")]
public int Fast
{
get { return fast; }
set { fast = Math.Max(1, value); }
}
/// <summary>
/// </summary>
[Description("Number of bars, slow")]
[Category("Parameters")]
public int Slow
{
get { return slow; }
set { slow = Math.Max(1, value); }
}
/// <summary>
/// </summary>
[Description("Number of bars, smoothing")]
[Category("Parameters")]
public int Smooth
{
get { return smooth; }
set { smooth = Math.Max(1, value); }
}
#endregion
}
}
#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
public partial class Indicator : IndicatorBase
{
private MACD_Z[] cacheMACD_Z = null;
private static MACD_Z checkMACD_Z = new MACD_Z();
/// <summary>
/// The MACD_Z is a trend following momentum indicator.
/// </summary>
/// <returns></returns>
public MACD_Z MACD_Z(int fast, int slow, int smooth)
{
return MACD_Z(Input, fast, slow, smooth);
}
/// <summary>
/// The MACD_Z is a trend following momentum indicator.
/// </summary>
/// <returns></returns>
public MACD_Z MACD_Z(Data.IDataSeries input, int fast, int slow, int smooth)
{
checkMACD_Z.Fast = fast;
fast = checkMACD_Z.Fast;
checkMACD_Z.Slow = slow;
slow = checkMACD_Z.Slow;
checkMACD_Z.Smooth = smooth;
smooth = checkMACD_Z.Smooth;
if (cacheMACD_Z != null)
for (int idx = 0; idx < cacheMACD_Z.Length; idx++)
if (cacheMACD_Z[idx].Fast == fast && cacheMACD_Z[idx].Slow == slow && cacheMACD_Z[idx].Smooth == smooth && cacheMACD_Z[idx].EqualsInput(input))
return cacheMACD_Z[idx];
MACD_Z indicator = new MACD_Z();
indicator.BarsRequired = BarsRequired;
indicator.CalculateOnBarClose = CalculateOnBarClose;
indicator.Input = input;
indicator.Fast = fast;
indicator.Slow = slow;
indicator.Smooth = smooth;
indicator.SetUp();
MACD_Z[] tmp = new MACD_Z[cacheMACD_Z == null ? 1 : cacheMACD_Z.Length + 1];
if (cacheMACD_Z != null)
cacheMACD_Z.CopyTo(tmp, 0);
tmp[tmp.Length - 1] = indicator;
cacheMACD_Z = tmp;
Indicators.Add(indicator);
return indicator;
}
}
}
// This namespace holds all market analyzer column definitions and is required. Do not change it.
namespace NinjaTrader.MarketAnalyzer
{
public partial class Column : ColumnBase
{
/// <summary>
/// The MACD_Z is a trend following momentum indicator.
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.MACD_Z MACD_Z(int fast, int slow, int smooth)
{
return _indicator.MACD_Z(Input, fast, slow, smooth);
}
/// <summary>
/// The MACD_Z is a trend following momentum indicator.
/// </summary>
/// <returns></returns>
public Indicator.MACD_Z MACD_Z(Data.IDataSeries input, int fast, int slow, int smooth)
{
return _indicator.MACD_Z(input, fast, slow, smooth);
}
}
}
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
public partial class Strategy : StrategyBase
{
/// <summary>
/// The MACD_Z is a trend following momentum indicator.
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.MACD_Z MACD_Z(int fast, int slow, int smooth)
{
return _indicator.MACD_Z(Input, fast, slow, smooth);
}
/// <summary>
/// The MACD_Z is a trend following momentum indicator.
/// </summary>
/// <returns></returns>
public Indicator.MACD_Z MACD_Z(Data.IDataSeries input, int fast, int slow, int smooth)
{
if (InInitialize && input == null)
throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");
return _indicator.MACD_Z(input, fast, slow, smooth);
}
}
}
#endregion
July 9th, 2010, 09:23 PM
Las Vegas, NV
Experience: None
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: CL
Posts: 102 since Jun 2010
Thanks Given: 115
Thanks Received: 105
I agree, this looks good and it would be better if it had the option to plot both the signal and average lines or just one of them. Thanks again, I'm not a coder, but would think it would be simple to do. Thanks!
Last Updated on September 6, 2012