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)
I have an issue that I would like a solution for that I can't seem to get to the bottom of on my own. I found Sharky's classroom and have been an avid pupil since. I am attempting to compile a strategy based on the Double MA Paint Holy Grail V2 suggested by Sharky. I understand that he isn't a proponent of automated trading, but none the less I would like to see if I can incorporate this tactic into my strategy. My problem arises when I attempt to compile a strategy while referencing the Double MA Paint Holy Grail V2. Anytime I incorporate the Double MA Paint Holy Grail V2 I receive the "error on generating strategy" error from the compiler. I am using the built in strategy builder to attempt this, as I am not too comfortable with C# yet. I will take any suggestions you have on manually editing the code, I'm just not disciplined enough to build it from scratch. You can see attached a screen shot of the debugger and what it says is wrong. I would just like to be able to compile a strategy that references this indicator. Thank you to anybody who spends their valuable time on this problem with me.
Code from Compiler:
#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.Gui.Chart;
using NinjaTrader.Strategy;
#endregion
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// Enter the description of your strategy here
/// </summary>
[Description("Enter the description of your strategy here")]
public class MyCustomStrategy : 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>
protected override void Initialize()
{
Add(DoubleMAPaintHolyGrailV2(55, NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+DMAType.WMA, 55, NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+DMAType.WMA));
Add(DoubleMAPaintHolyGrailV2(55, NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+DMAType.WMA, 55, NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+DMAType.WMA));
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (DoubleMAPaintHolyGrailV2(55, NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+DMAType.WMA, 55, NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+DMAType.WMA).Signal[0] == 1)
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (DoubleMAPaintHolyGrailV2(55, NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+DMAType.WMA, 55, NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+DMAType.WMA).Signal[0] == -1)
{
EnterShort(DefaultQuantity, "");
}
}
#region Properties
#endregion
}
}
Can you help answer these questions from other members on NexusFi?