NexusFi: Find Your Edge


Home Menu

 





Holy Grail Compilation Error


Discussion in NinjaTrader

Updated
    1. trending_up 3,072 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 2 attachments




 
Search this Thread
  #1 (permalink)
HartRend
Indiana
 
Posts: 7 since Feb 2011
Thanks Given: 5
Thanks Received: 2

Hello Traders,

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
}
}


Attached Thumbnails
Click image for larger version

Name:	DbugError.JPG
Views:	251
Size:	59.1 KB
ID:	31019  
Attached Images
 
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
SEC Chairman Calls for New Golden Age of SEC-CFTC Regula …
Traders Hideout
More Than Capable: Hegseths War Warning Validates $114M …
Prediction Markets & Event Contracts
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Iran War Prediction Markets: Ceasefire 16%, Ground Invas …
Prediction Markets & Event Contracts
Iran Ceasefire Surges to 19.5% on US 15-Point Plan -- 82 …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #3 (permalink)
 fluxsmith 
Santa Maria
 
Experience: Advanced
Platform: NinjaTrader, ThinkOrSwim
Broker: Mirus/Zen-Fire
Trading: ES
Posts: 290 since May 2010
Thanks Given: 97
Thanks Received: 323


Ninja's strategy builder is broken with deeply nested enumerations.

Replace:
NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg+ DMAType.WMA

With:
NinjaTrader.Indicator.DoubleMA_internal_SharkyPkg.DMAType.WMA


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
HartRend
Indiana
 
Posts: 7 since Feb 2011
Thanks Given: 5
Thanks Received: 2

FluxSmith,

Good Karma is coming your way!
It worked, and I've learned something new about NT and C#.
Your expertise is much appreciated.
Thanks !


Reply With Quote




Last Updated on February 15, 2011


© 2026 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 - Downloads - Top
no new posts