ALWAYS verify with the live Ninjascript reference available on the web at https://developer.ninjatrader.com/docs/desktop before making final edits. This third file confirms a recurrence of CS0246 compiler errors in VWAP_Pro.cs, specifically related to undefined types like ModeType and AnchorModeType. πŸ” CS0246 - "The type or namespace name 'X' could not be found" Line Column Missing Type 371 28 ModeType 371 43 AnchorModeType 391 39 ModeType 391 54 AnchorModeType 376 51 ModeType βœ… How to Fix It πŸ”§ 1. Define Missing Enums (Recommended Fix) It seems that ModeType and AnchorModeType are custom enums that were expected to exist in the code but were never declared. Create a separate file or include this in the same VWAP_Pro.cs file near the top: public enum ModeType { Standard, Aggressive, Conservative } public enum AnchorModeType { SessionStart, FixedTime, Custom } You’ll need to customize the enum values (Standard, Aggressive, etc.) to match your strategy logic. These names are placeholders based on typical VWAP settings. πŸ”§ 2. OR Add Missing using Directives If these types exist in another NinjaTrader script or add-on you've imported before, ensure you include the right namespace: using NinjaTrader.NinjaScript.AddOns.MyVWAPEnums; // Example But since these errors suggest the types are completely undefined, it's much more likely they are simply not declared anywhere. πŸ”§ 3. Verify File Inclusion in NinjaTrader If these enums are defined in another file (e.g., VWAPTypes.cs), make sure: It's saved in the same directory as VWAP_Pro.cs It's added to the NinjaScript Editor, not just sitting in the file system You can add it using: Tools > NinjaScript Editor > Right-click > Add > Existing Item... 🧼 Suggested Organization If these enums are used across multiple indicators/strategies, you should centralize them: VWAP_Enums.cs namespace NinjaTrader.NinjaScript.VWAP { public enum ModeType { Standard, Aggressive, Conservative } public enum AnchorModeType { SessionStart, FixedTime, Custom } } Then use: using NinjaTrader.NinjaScript.VWAP; These are occurring in VWAP_Pro.cs, mainly on lines 132–134: Line Error Message (Truncated) 132 Argument 2: cannot convert from 'int' to 'NinjaTrader.Gui.Tools.SimpleFont' 132 Argument 3: cannot convert from 'NinjaTrader.Gui.Tools.SimpleFont' to 'System.Windows.Media.Brush' 133 Same as above 134 Same as above πŸ”§ Interpretation: It looks like a method (likely a drawing method like Draw.Text() or Draw.TextFixed()) is being called with the wrong argument types β€” specifically: An int is being passed where a SimpleFont is expected. A SimpleFont is being passed where a Brush is expected. This suggests that arguments are out of order or misassigned. βœ… Proper Fix Let’s consider the proper usage of Draw.Text() in NinjaTrader 8: Draw.Text(NinjaScriptBase owner, string tag, bool isAutoScale, string text, int barsAgo, double y, Brush textBrush, SimpleFont font, TextAlignment alignment, Brush outlineBrush, int outlineWidth); Or for simpler usage: Draw.Text(this, "tag1", "Hello", 0, Close[0], Brushes.White); Your issue likely looks like this: Draw.Text(this, "tag1", true, "Label", 0, 100, 12, someFont, ...); Where 12 (int) is mistakenly passed as a font or brush, causing the error. πŸ”§ Corrected Example: Assuming you want to draw text with a specific font and color: SimpleFont font = new SimpleFont("Arial", 12); Draw.Text(this, "tag1", true, "VWAP Label", 0, Close[0], Brushes.White, font, TextAlignment.Center, Brushes.Black, 1); Brushes.White β†’ text color font β†’ SimpleFont object TextAlignment.Center β†’ alignment Brushes.Black β†’ outline brush 1 β†’ outline width βœ… Steps to Fix: Replace the integer (e.g., 12) with a SimpleFont: new SimpleFont("Arial", 12) Ensure arguments are in the correct order: Double-check the method signature from the NinjaTrader 8 Help Guide . Use Brushes for colors, not fonts. Summary of Errors: Line Column Missing Type 403 39 ModeType 403 54 AnchorModeType 408 63 ModeType 408 78 AnchorModeType 367 28 ModeType βœ… Fixes: These types β€” ModeType and AnchorModeType β€” are not recognized. Here are the likely causes and solutions: πŸ” 1. Missing using Directive These types might be defined in a different namespace. If they are from a custom or NinjaTrader add-on: Fix: Add the appropriate using statement at the top of your file. Example: using NinjaTrader.NinjaScript.AddOns.VWAP; Adjust according to where ModeType and AnchorModeType are defined. πŸ” 2. Missing Class Definitions If they are not in any existing libraries, they might be custom enum types that should be defined in your project but are missing. Fix: Add enum declarations like these (if applicable): public enum ModeType { Standard, Aggressive, Conservative } public enum AnchorModeType { SessionStart, FixedTime, Custom } Only do this if you know what the enum values should be. These names are placeholders β€” you should match them with how your indicator/strategy is designed.