Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
MACDBBLines
Collapse
X
-
I see. Unfortunately this indicator you speak of is not a NinjaTrader indicator so I can't provide support for it since I don't know how this indicator operates and if you can even check for the condition you speak of. You would need to go back to the author of the indicator and ask them.RayNinjaTrader Customer Service
-
thanks Ray for looking at it, for more infor please look at eSignal Central Forum. that was written using the Formula Wizard.
Comment
-
When I was trying to figure out how MACDBBLines worked, I added a few, sparse comments to it that may help.
It's not up to my usual level of commenting, but it still may help.
I've attached a copy for your perusal.Attached Files
Comment
-
Originally posted by KBJ View PostWhen I was trying to figure out how MACDBBLines worked, I added a few, sparse comments to it that may help.
It's not up to my usual level of commenting, but it still may help.
I've attached a copy for your perusal.
Regards
Comment
-
I'm not sure I understand the question.
The comments I was talking about are embedded in the source code. A source code comment in C# (or NinjaScript) begins with "//" and runs to the end of the line.
For instance, the following line shows one of the comments that I added to MACDBBLines.cs:
Code:// Draw a big yellow dot over the zero line intersection.
A comment's only use is for notations by the programmer for later reference by himself/herself or others who are trying to understand the code.
Comment
-
Sorry gary9. I am unfamiliar with how a trader would use the MACDBB to trade so I would not be able to generate a worthwhile sample for its utilization.
Here are some brief examples of how you would call Gumphrie's MACDBBLines indicator though. You will need to figure out workable trading conditions on your own.
Code:if (CrossAbove(MACDBBLines(12, 10, 26, 5, 1).BB_UpperBand, 0, 1)) { // Do something }
Code:MACDBBLines(12, 10, 26, 5, 1).BB_UpperBand
To get their individual values and compare them to something you could do something like
Code:if (MACDBBLines(12, 10, 26, 5, 1).BB_UpperBand[0] > someThresholdValue) { // Do something }
Josh P.NinjaTrader Customer Service
Comment
-
Originally posted by gary9 View Postthanks Ray for looking at it, for more infor please look at eSignal Central Forum. that was written using the Formula Wizard.
http://forum.esignalcentral.com/show...?threadid=7271
Comment
-
Josh or Gumphrie,
How would I code the MACD (dots) for when they were (started) inside the upper and lower bands and then closed above the .BB_UpperBands? to enter a long and then exit the long when it closed back inside the .BB_UpperBands?. Visa versa for a short?
I tried using your examples below but just cant figure out how to code the MACD cross above/below or the greater/less than the BB_UpperBands or BB_LowerBands.
if (CrossAbove(MACDBBLines(12, 10, 26, 5, 1).BB_UpperBand, 0, 1))
{
// Do something
}
OR
if (MACDBBLines(12, 10, 26, 5, 1).BB_UpperBand[0] > someThresholdValue)
{
// Do something
}
I tried some things like:
if (bbMacd[0] > MACDBBLines(12, 10, 26, 5, 1).BB_UpperBand[0])
{
// Do something
}
and cant get anything to compile.
Any help would be apreciated.
Thanks
Comment
-
Originally posted by dwalls View PostI tried some things like:
if (bbMacd[0] > MACDBBLines(12, 10, 26, 5, 1).BB_UpperBand[0])
{
// Do something
}
and cant get anything to compile.
Comment
-
-
Error on generating Strategy
Copy and paste into: NinjaTrader.Strategy
'NinjaTrader.Indicator.MACD' does not contain a definition for 'MACD'
#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
///<summary>
///
///</summary>
[Description("")]
[Gui.Design.DisplayName("bbm")]
publicclass bbm : Strategy
{
#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
#endregion
///<summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
///</summary>
protectedoverridevoid Initialize()
{
CalculateOnBarClose = true;
SetProfitTarget("", CalculationMode.Ticks, 8);
SetStopLoss("", CalculationMode.Ticks, 8, false);
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
double UpperBand = EMA(MACD(10,26,5).Macd,12)[0]
+ StdDev(MACD(10,26,5).Macd,12)[0];
if (MACD(10, 26, 5)[0] > UpperBand)
{
// Do something
EnterLong(DefaultQuantity, "");
}
}
#region Properties
#endregion
}
}
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Today, 06:40 PM
|
0 responses
10 views
0 likes
|
Last Post
by algospoke
Today, 06:40 PM
|
||
Started by maybeimnotrader, Today, 05:46 PM
|
0 responses
8 views
0 likes
|
Last Post Today, 05:46 PM | ||
Started by quantismo, Today, 05:13 PM
|
0 responses
7 views
0 likes
|
Last Post
by quantismo
Today, 05:13 PM
|
||
Started by AttiM, 02-14-2024, 05:20 PM
|
8 responses
169 views
0 likes
|
Last Post
by jeronymite
Today, 05:00 PM
|
||
Started by cre8able, Today, 04:22 PM
|
0 responses
10 views
0 likes
|
Last Post
by cre8able
Today, 04:22 PM
|
Comment