Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

I cannot save an indicator in my template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I cannot save an indicator in my template

    Hi there!

    I have a problem with an indicator, I can put it on my chart but when I save the template the next time I open NT8 the template does not have the indicator, so every time I open a chart I have to add this indicator.

    Code:
    #region Using declarations
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Gui.Tools;
    using NinjaTrader.Data;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.Core.FloatingPoint;
    using NinjaTrader.NinjaScript.DrawingTools;
    #endregion
    //This namespace holds Indicators in this folder and  is required. Do not change it. 
    namespace NinjaTrader.NinjaScript.Indicators.SSTEA M
    {
        public class EWO_SSTEAM3 : Indicator
        {
            private Series<double>  MP;
            private int             Lens;
            private double          Pr;
            private double          OscAG;
            public Series<double> UprLine;
            public Series<double> LwrLine;
                    public double mihl2;
            protected override void OnStateChange()
            {
                if (State == State.DataLoaded)
                {
                    // "this" refers to the NinjaScript object itself. T his syncs the Series object to historical data bar s
                    // MaximumBarsLookBack determines how many values th e Series<double> will have access to
                    MP      = new Series<double>(this,  MaximumBarsLookBack.Infinite);
                    //HL2     = float;
                    UprLine = new Series<double>(this) ;
                    LwrLine = new Series<double>(this) ;
                }
    
                if (State == State.SetDefaults)
                {
                    Description                                  = @"Elliot Wave Oscilator - SSTEAM";
                    Name                                         = "EWO3 - SSTEAM";
                    Calculate                                    = Calculate.OnBarClose;
                    IsOverlay                                    = false;
                    DisplayInDataBox                             = true;
                    DrawOnPricePanel                             = true;
                    DrawHorizontalGridLines                      = true;
                    DrawVerticalGridLines                        = true;
                    PaintPriceMarkers                            = true;
                    ScaleJustification                           = NinjaTrader.Gui.Chart.ScaleJustificati on.Right;
                    OscFast                                      = 5;
                    OscSlow                                      = 35;
                    BOBStrength                                  = 100;
                    //Disable this property if your indicator requires c ustom values that cumulate with each new market da ta event. 
                    //See Help Guide for additional information.
                    IsSuspendedWhileInactive                     = true;
                    AddPlot(new Stroke(Brushes.Green,  9), PlotStyle.Bar, "OscAGUpr");
                    AddPlot(new Stroke(Brushes.Red, 9) , PlotStyle.Bar, "OscAGLwr");
                    AddPlot(Brushes.White, "LineEWOUpr ");
                    AddPlot(Brushes.White, "LineEWOLwr ");
                    AddPlot(new Stroke(Brushes.Lime, 9 ), PlotStyle.Bar, "OscAGUprDiv");
                    AddPlot(new Stroke(Brushes.Maroon,  9), PlotStyle.Bar, "OscAGLwrDiv");
                }
                else if (State == State.Configure)
                {
                }
            }
            protected override void OnBarUpdate()
            {
    
                MP[0]       =   ( High[0] + Low[0] ) / 2;
    
                UprLine[0]  =   0;
                LwrLine[0]  =   0;
                Lens        =   OscFast + OscSlow;
                Pr = 2.0/Lens; 
                if( CurrentBar < OscSlow){
                    OscAG = 0;
                    if (OscAG > 0){
                        OscAGUpr[0] = OscAG;
                        if (OscAGUpr[0] > OscAGUpr[1]){
                            OscAGUprDiv[0] = OscAG;
                        }
    
    
                    }
                    else{
                        OscAGLwr[0] = OscAG;
                        OscAGLwrDiv[0] = OscAG;
                        /*if (OscAGLwr[0] < OscAGLwr[1]){
                            OscAGLwrDiv[0] = OscAG;
                        }   */              
                    }
                }else{
                    OscAG       =   SMA(MP,OscFast)[0] - SMA(MP,OscSlow)[0];
                    if (OscAG > 0){
                        UprLine[0]  = (OscAG*Pr) + (UprLine[1]*(1-Pr));
                        Print( (OscAG*Pr) + (UprLine[1]*(1-Pr)) );
                        LwrLine[0]  = LwrLine[1];
                        OscAGUpr[0] = OscAG;
                            if (OscAGUpr[0] > OscAGUpr[1]){
                            OscAGUprDiv[0] = OscAG;
                        }
                    }else{
                        UprLine[0]      = UprLine[1];
                        LwrLine[0]      = (OscAG*Pr) + (LwrLine[1]*(1-Pr));
                        OscAGLwr[0] = OscAG;
                        if (OscAGLwr[0] > OscAGLwr[1]){
                            OscAGLwrDiv[0] = OscAG;
                        }
                        /*if (OscAGLwr[0] > OscAGLwr[1]){
                            OscAGLwrDiv[0] = OscAG;
                        }   */                  
                    }
                }
    
                LineEWOUpr[0]   =   BOBStrength / 100 * UprLine[0];
                LineEWOLwr[0]   =   BOBStrength / 100 * LwrLine[0];
    
            }
    
    
            #region Properties
            [Range(1, int.MaxValue), NinjaScriptProperty]
            [Display(ResourceType = typeof(Custom.Resource), Na me = "Fast", GroupName = "NinjaScriptParameters",  Order = 0)]
            public int OscFast
            { get; set; }
            [Range(1, int.MaxValue), NinjaScriptProperty]
            [Display(ResourceType = typeof(Custom.Resource), Na me = "Slow", GroupName = "NinjaScriptParameters",  Order = 1)]
            public int OscSlow
            { get; set; }
    
            [Range(1, int.MaxValue), NinjaScriptProperty]
            [Display(ResourceType = typeof(Custom.Resource), Na me = "Strength", GroupName = "NinjaScriptParameter s", Order = 2)]
            public int BOBStrength
            { get; set; }
    
            [Browsable(false)]
            [XmlIgnore]
            public Series<double> OscAG
            {
                get { return Values[0]; }
            }
    
            [Browsable(false)]
            [XmlIgnore]
            public Series<double> OscAGUpr
            {
                get { return Values[0]; }
            }
    
    
    
    
            [Browsable(false)]
            [XmlIgnore]
            public Series<double> OscAGLwr
            {
                get { return Values[1]; }
            }
    
            [Browsable(false)]
            [XmlIgnore]
            public Series<double> LineEWOUpr
            {
                get { return Values[2]; }
            }
    
            [Browsable(false)]
            [XmlIgnore]
            public Series<double> LineEWOLwr
            {
                get { return Values[3]; }
            }
    
    
            [Browsable(false)]
            [XmlIgnore]
            public Series<double> OscAGUprDiv
            {
                get { return Values[4]; }
            }   
    
    
            [Browsable(false)]
            [XmlIgnore]
            public Series<double> OscAGLwrDiv
            {
                get { return Values[5]; }
            }           
    
            #endregion
        }
    }
    #region NinjaScript generated code. Neither change  nor remove.
    namespace NinjaTrader.NinjaScript.Indicators
    {
        public partial class Indicator : NinjaTrader.G ui.NinjaScript.IndicatorRenderBase
        {
            private SSTEAM.EWO_SSTEAM3[] cacheEWO_SSTEAM3;
            public SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(int  oscFast, int oscSlow, int bOBStrength)
            {
                return EWO_SSTEAM3(Input, oscFast, osc Slow, bOBStrength);
            }
            public SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(ISer ies<double> input, int oscFast, int oscSlow, int b OBStrength)
            {
                if (cacheEWO_SSTEAM3 != null)
                    for (int idx = 0; idx < cacheEWO_S STEAM3.Length; idx++)
                        if (cacheEWO_SSTEAM3[idx] != null && cacheEWO_SSTEAM3[idx].OscFast == oscFast && cacheEWO_SSTEAM3[idx].OscSlow == oscSlow && cacheEWO_SSTEAM3[idx].BOBStrength == bOBStrength && cacheEWO_SSTEAM3[idx].EqualsInput(input))
                            return cacheEWO_SSTEAM3[idx];
                return CacheIndicator<SSTEAM.EWO_SSTEA M3>(new SSTEAM.EWO_SSTEAM3(){ OscFast = oscFast, O scSlow = oscSlow, BOBStrength = bOBStrength }, inp ut, ref cacheEWO_SSTEAM3);
            }
        }
    }
    namespace NinjaTrader.NinjaScript.MarketAnalyzerCo lumns
    {
        public partial class MarketAnalyzerColumn : Ma rketAnalyzerColumnBase
        {
            public Indicators.SSTEAM.EWO_SSTEAM3 EWO_S STEAM3(int oscFast, int oscSlow, int bOBStrength)
            {
                return indicator.EWO_SSTEAM3(Input, os cFast, oscSlow, bOBStrength);
            }
            public Indicators.SSTEAM.EWO_SSTEAM3 EWO_S STEAM3(ISeries<double> input , int oscFast, int os cSlow, int bOBStrength)
            {
                return indicator.EWO_SSTEAM3(input, os cFast, oscSlow, bOBStrength);
            }
        }
    }
    namespace NinjaTrader.NinjaScript.Strategies
    {
        public partial class Strategy : NinjaTrader.Gu i.NinjaScript.StrategyRenderBase
        {
            public Indicators.SSTEAM.EWO_SSTEAM3 EWO_S STEAM3(int oscFast, int oscSlow, int bOBStrength)
            {
                return indicator.EWO_SSTEAM3(Input, os cFast, oscSlow, bOBStrength);
            }
            public Indicators.SSTEAM.EWO_SSTEAM3 EWO_S STEAM3(ISeries<double> input , int oscFast, int os cSlow, int bOBStrength)
            {
                return indicator.EWO_SSTEAM3(input, os cFast, oscSlow, bOBStrength);
            }
        }
    }
    #endregion
    thanks in advance if you can help me!

    #2
    Hello TheCatTrader,
    Please find below my observations:-
    1. You're using public series - public Series<double> UprLine; public Series<double> LwrLine; public double mihl2; (above onstatechange) I think these can be private public not required.
    2. In #region properties, you've 2 definitions for Values[0], should remove public Series<double> OscAG as its already double as defined earlier.
    With these changes, I've compiled it & is working fine for me. I can save it to template & load that template in a diff chart.
    Hope it helps!

    Comment


      #3
      Originally posted by s.kinra View Post
      Hello TheCatTrader,
      Please find below my observations:-
      1. You're using public series - public Series<double> UprLine; public Series<double> LwrLine; public double mihl2; (above onstatechange) I think these can be private public not required.
      2. In #region properties, you've 2 definitions for Values[0], should remove public Series<double> OscAG as its already double as defined earlier.
      With these changes, I've compiled it & is working fine for me. I can save it to template & load that template in a diff chart.
      Hope it helps!
      It worked!

      Many thanks

      Comment


        #4
        Hello TheCatTrader,

        s.kinra is providing correct information.

        A few details.

        Objects that are using the public access modifier are generally something that needs to show in the user interface (meaning the Indicators properties window), or needs to be available outside of the indicator class, such as properties made available to a strategy that may be calling the indicator.
        https://ninjatrader.com/support/help...nt8/update.htm
        https://ninjatrader.com/support/help..._practices.htm

        Anything that will just be used within the indicator class and is not part of the UI, such as any variables to store values internally like series, bools, and integers used for logic, should be private.

        Things that are public and are intended to be part of the UI (or need to be public to be accessible outside the class) will be attempted to be saved in any xml files such as templates and workspaces.

        Object types that are easily converted to strings (string, int, double, bool) will automatically be saved.
        Any object types that are not easily converted to strings (series, brushes, custom classes), will need to have the XmlIgnore attribute applied to prevent an error from appearing on the Log tab of the Control Center when attempting to save an xml file such as a template or workspace.
        https://ninjatrader.com/support/help...eattribute.htm

        A second public variable can be made to convert the value of variable using XmlIgnore to a string if this needs to be saved as well.
        Below is a link to the help guide example that does this with a brush.

        https://ninjatrader.com/support/help...lor_inputs.htm

        As well as an example that does this with a TimeSpan.
        https://ninjatrader.com/support/help...tsub=XmlIgnore
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello,

          I have made the above changes, but I can't get it to compile.

          There are some errors "CS0111" in the last lines, between 257 and 299.

          Could someone help me to solve it?

          Thank you very much for your help.


          Code:
          #region Using declarations
          using System;
          using System.Collections.Generic;
          using System.ComponentModel;
          using System.ComponentModel.DataAnnotations;
          using System.Linq;
          using System.Text;
          using System.Threading.Tasks;
          using System.Windows;
          using System.Windows.Input;
          using System.Windows.Media;
          using System.Xml.Serialization;
          using NinjaTrader.Cbi;
          using NinjaTrader.Gui;
          using NinjaTrader.Gui.Chart;
          using NinjaTrader.Gui.SuperDom;
          using NinjaTrader.Gui.Tools;
          using NinjaTrader.Data;
          using NinjaTrader.NinjaScript;
          using NinjaTrader.Core.FloatingPoint;
          using NinjaTrader.NinjaScript.DrawingTools;
          #endregion
          //This namespace holds Indicators in this folder and is required. Do not change it.
          namespace NinjaTrader.NinjaScript.Indicators.SSTEAM
          {
          public class EWO_SSTEAM3 : Indicator
          {
          private Series<double> MP;
          private int Lens;
          private double Pr;
          private double OscAG;
          private Series<double> UprLine;
          private Series<double> LwrLine;
          private double mihl2;
          protected override void OnStateChange()
          {
          if (State == State.DataLoaded)
          {
          // "this" refers to the NinjaScript object itself. T his syncs the Series object to historical data bar s
          // MaximumBarsLookBack determines how many values th e Series<double> will have access to
          MP = new Series<double>(this, MaximumBarsLookBack.Infinite);
          //HL2 = float;
          UprLine = new Series<double>(this) ;
          LwrLine = new Series<double>(this) ;
          }
          
          if (State == State.SetDefaults)
          {
          Description = @"Elliot Wave Oscilator - SSTEAM";
          Name = "EWO3 - SSTEAM";
          Calculate = Calculate.OnBarClose;
          IsOverlay = false;
          DisplayInDataBox = true;
          DrawOnPricePanel = true;
          DrawHorizontalGridLines = true;
          DrawVerticalGridLines = true;
          PaintPriceMarkers = true;
          ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
          OscFast = 5;
          OscSlow = 35;
          BOBStrength = 100;
          //Disable this property if your indicator requires c ustom values that cumulate with each new market da ta event.
          //See Help Guide for additional information.
          IsSuspendedWhileInactive = true;
          AddPlot(new Stroke(Brushes.Green, 9), PlotStyle.Bar, "OscAGUpr");
          AddPlot(new Stroke(Brushes.Red, 9), PlotStyle.Bar, "OscAGLwr");
          AddPlot(Brushes.White, "LineEWOUpr");
          AddPlot(Brushes.White, "LineEWOLwr");
          AddPlot(new Stroke(Brushes.Lime, 9), PlotStyle.Bar, "OscAGUprDiv");
          AddPlot(new Stroke(Brushes.Maroon, 9), PlotStyle.Bar, "OscAGLwrDiv");
          }
          else if (State == State.Configure)
          {
          }
          }
          protected override void OnBarUpdate()
          {
          
          MP[0] = ( High[0] + Low[0] ) / 2;
          
          UprLine[0] = 0;
          LwrLine[0] = 0;
          Lens = OscFast + OscSlow;
          Pr = 2.0/Lens;
          if( CurrentBar < OscSlow){
          OscAG = 0;
          if (OscAG > 0){
          OscAGUpr[0] = OscAG;
          if (OscAGUpr[0] > OscAGUpr[1]){
          OscAGUprDiv[0] = OscAG;
          }
          
          
          }
          else{
          OscAGLwr[0] = OscAG;
          OscAGLwrDiv[0] = OscAG;
          /*if (OscAGLwr[0] < OscAGLwr[1]){
          OscAGLwrDiv[0] = OscAG;
          } */
          }
          }else{
          OscAG = SMA(MP,OscFast)[0] - SMA(MP,OscSlow)[0];
          if (OscAG > 0){
          UprLine[0] = (OscAG*Pr) + (UprLine[1]*(1-Pr));
          Print( (OscAG*Pr) + (UprLine[1]*(1-Pr)) );
          LwrLine[0] = LwrLine[1];
          OscAGUpr[0] = OscAG;
          if (OscAGUpr[0] > OscAGUpr[1]){
          OscAGUprDiv[0] = OscAG;
          }
          }else{
          UprLine[0] = UprLine[1];
          LwrLine[0] = (OscAG*Pr) + (LwrLine[1]*(1-Pr));
          OscAGLwr[0] = OscAG;
          if (OscAGLwr[0] > OscAGLwr[1]){
          OscAGLwrDiv[0] = OscAG;
          }
          /*if (OscAGLwr[0] > OscAGLwr[1]){
          OscAGLwrDiv[0] = OscAG;
          } */
          }
          }
          
          LineEWOUpr[0] = BOBStrength / 100 * UprLine[0];
          LineEWOLwr[0] = BOBStrength / 100 * LwrLine[0];
          
          }
          
          
          #region Properties
          [Range(1, int.MaxValue), NinjaScriptProperty]
          [Display(ResourceType = typeof(Custom.Resource), Name = "Fast", GroupName = "NinjaScriptParameters", Order = 0)]
          public int OscFast
          { get; set; }
          [Range(1, int.MaxValue), NinjaScriptProperty]
          [Display(ResourceType = typeof(Custom.Resource), Name = "Slow", GroupName = "NinjaScriptParameters", Order = 1)]
          public int OscSlow
          { get; set; }
          
          [Range(1, int.MaxValue), NinjaScriptProperty]
          [Display(ResourceType = typeof(Custom.Resource), Name = "Strength", GroupName = "NinjaScriptParameter s", Order = 2)]
          public int BOBStrength
          { get; set; }
          
          // [Browsable(false)]
          // [XmlIgnore]
          // public Series<double> OscAG
          // {
          // get { return Values[0]; }
          // }
          
          [Browsable(false)]
          [XmlIgnore]
          public Series<double> OscAGUpr
          {
          get { return Values[0]; }
          }
          
          
          [Browsable(false)]
          [XmlIgnore]
          public Series<double> OscAGLwr
          {
          get { return Values[1]; }
          }
          
          [Browsable(false)]
          [XmlIgnore]
          public Series<double> LineEWOUpr
          {
          get { return Values[2]; }
          }
          
          [Browsable(false)]
          [XmlIgnore]
          public Series<double> LineEWOLwr
          {
          get { return Values[3]; }
          }
          
          
          [Browsable(false)]
          [XmlIgnore]
          public Series<double> OscAGUprDiv
          {
          get { return Values[4]; }
          }
          
          
          [Browsable(false)]
          [XmlIgnore]
          public Series<double> OscAGLwrDiv
          {
          get { return Values[5]; }
          }
          
          #endregion
          }
          }
          #region NinjaScript generated code. Neither change nor remove.
          namespace NinjaTrader.NinjaScript.Indicators
          {
          public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
          {
          private SSTEAM.EWO_SSTEAM3[] cacheEWO_SSTEAM3;
          public SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(int oscFast, int oscSlow, int bOBStrength)
          {
          return EWO_SSTEAM3(Input, oscFast, oscSlow, bOBStrength);
          }
          public SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(ISeries<double> input, int oscFast, int oscSlow, int bOBStrength)
          {
          if (cacheEWO_SSTEAM3 != null)
          for (int idx = 0; idx < cacheEWO_SSTEAM3.Length; idx++)
          if (cacheEWO_SSTEAM3[idx] != null && cacheEWO_SSTEAM3[idx].OscFast == oscFast && cacheEWO_SSTEAM3[idx].OscSlow == oscSlow && cacheEWO_SSTEAM3[idx].BOBStrength == bOBStrength && cacheEWO_SSTEAM3[idx].EqualsInput(input))
          return cacheEWO_SSTEAM3[idx];
          return CacheIndicator<SSTEAM.EWO_SSTEAM3>(new SSTEAM.EWO_SSTEAM3(){ OscFast = oscFast, OscSlow = oscSlow, BOBStrength = bOBStrength }, input, ref cacheEWO_SSTEAM3);
          }
          }
          }
          namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
          {
          public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
          {
          public Indicators.SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(int oscFast, int oscSlow, int bOBStrength)
          {
          return indicator.EWO_SSTEAM3(Input, oscFast, oscSlow, bOBStrength);
          }
          public Indicators.SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(ISeries<double> input , int oscFast, int oscSlow, int bOBStrength)
          {
          return indicator.EWO_SSTEAM3(input, oscFast, oscSlow, bOBStrength);
          }
          }
          }
          namespace NinjaTrader.NinjaScript.Strategies
          {
          public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
          {
          public Indicators.SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(int oscFast, int oscSlow, int bOBStrength)
          {
          return indicator.EWO_SSTEAM3(Input, oscFast, oscSlow, bOBStrength);
          }
          public Indicators.SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(ISeries<double> input , int oscFast, int oscSlow, int bOBStrength)
          {
          return indicator.EWO_SSTEAM3(input, oscFast, oscSlow, bOBStrength);
          }
          }
          }
          #endregion
          
          #region NinjaScript generated code. Neither change nor remove.
          
          namespace NinjaTrader.NinjaScript.Indicators
          {
          public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
          {
          private SSTEAM.EWO_SSTEAM3[] cacheEWO_SSTEAM3;
          public SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(int oscFast, int oscSlow, int bOBStrength)
          {
          return EWO_SSTEAM3(Input, oscFast, oscSlow, bOBStrength);
          }
          
          public SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(ISeries<double> input, int oscFast, int oscSlow, int bOBStrength)
          {
          if (cacheEWO_SSTEAM3 != null)
          for (int idx = 0; idx < cacheEWO_SSTEAM3.Length; idx++)
          if (cacheEWO_SSTEAM3[idx] != null && cacheEWO_SSTEAM3[idx].OscFast == oscFast && cacheEWO_SSTEAM3[idx].OscSlow == oscSlow && cacheEWO_SSTEAM3[idx].BOBStrength == bOBStrength && cacheEWO_SSTEAM3[idx].EqualsInput(input))
          return cacheEWO_SSTEAM3[idx];
          return CacheIndicator<SSTEAM.EWO_SSTEAM3>(new SSTEAM.EWO_SSTEAM3(){ OscFast = oscFast, OscSlow = oscSlow, BOBStrength = bOBStrength }, input, ref cacheEWO_SSTEAM3);
          }
          }
          }
          
          namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
          {
          public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
          {
          public Indicators.SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(int oscFast, int oscSlow, int bOBStrength)
          {
          return indicator.EWO_SSTEAM3(Input, oscFast, oscSlow, bOBStrength);
          }
          
          public Indicators.SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(ISeries<double> input , int oscFast, int oscSlow, int bOBStrength)
          {
          return indicator.EWO_SSTEAM3(input, oscFast, oscSlow, bOBStrength);
          }
          }
          }
          
          namespace NinjaTrader.NinjaScript.Strategies
          {
          public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
          {
          public Indicators.SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(int oscFast, int oscSlow, int bOBStrength)
          {
          return indicator.EWO_SSTEAM3(Input, oscFast, oscSlow, bOBStrength);
          }
          
          public Indicators.SSTEAM.EWO_SSTEAM3 EWO_SSTEAM3(ISeries<double> input , int oscFast, int oscSlow, int bOBStrength)
          {
          return indicator.EWO_SSTEAM3(input, oscFast, oscSlow, bOBStrength);
          }
          }
          }
          
          #endregion

          Comment


            #6
            Hello Mestor,

            What is the full error message? (Ctrl + c to copy Ctrl + v to paste, or provide a screenshot)
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              EWO_SSTEAM3.cs El tipo 'NinjaTrader.NinjaScript.Indicators.Indicator' ya contiene una definición para 'cacheEWO_SSTEAM3' CS0102 257 32
              EWO_SSTEAM3.cs El tipo 'NinjaTrader.NinjaScript.Indicators.Indicator' ya define un miembro denominado 'EWO_SSTEAM3' con los mismos tipos de parámetros CS0111 258 29
              EWO_SSTEAM3.cs El tipo 'NinjaTrader.NinjaScript.Indicators.Indicator' ya define un miembro denominado 'EWO_SSTEAM3' con los mismos tipos de parámetros CS0111 263 29
              EWO_SSTEAM3.cs El tipo 'NinjaTrader.NinjaScript.MarketAnalyzerColumns.Mar ketAnalyzerColumn' ya define un miembro denominado 'EWO_SSTEAM3' con los mismos tipos de parámetros CS0111 278 40
              EWO_SSTEAM3.cs El tipo 'NinjaTrader.NinjaScript.MarketAnalyzerColumns.Mar ketAnalyzerColumn' ya define un miembro denominado 'EWO_SSTEAM3' con los mismos tipos de parámetros CS0111 283 40
              EWO_SSTEAM3.cs El tipo 'NinjaTrader.NinjaScript.Strategies.Strategy' ya define un miembro denominado 'EWO_SSTEAM3' con los mismos tipos de parámetros CS0111 294 40
              EWO_SSTEAM3.cs El tipo 'NinjaTrader.NinjaScript.Strategies.Strategy' ya define un miembro denominado 'EWO_SSTEAM3' con los mismos tipos de parámetros CS0111 299 40

              Comment


                #8
                Hello Mestor,

                The error appears to be stating that EWO_SSTEAM3 has been duplicated and there are two of these classes using the same name, which is not allowed in C#.

                It may be that you have an indicator and a market analyzer column that have the same name.

                Check all of the indicators and all of the market analyzer columns and see if any of them are using the same class name. If you find two scripts using the same class name, change one of them so the class names are different and not duplicated.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Thank you very much for your help
                  I understand the base of the error but I am not able to solve it.
                  I have tried NT8 installed from zero on another computer and the error is the same.
                  I will continue to investigate
                  Best regards

                  Comment


                    #10
                    Hello Mestor,

                    To solve it, you would need to find the scripts that have duplicate class names.

                    In the NinjaScript Editor, look in the Indicators folder. How many indicators do you see with the name EWO_SSTEAM3?
                    In the Market Analyzer Columns folder, how many MarketAnalyerColumn scripts do you see with the name EWO_SSTEAM3?
                    Same for Strategies.

                    May we have a screenshot of each folder (scrolled to E) to assist?
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Attach screenshot

                      Comment


                        #12
                        Hello Mestor,

                        I'm not seeing EWO_SSTEAM3 at all in any of these screenshots.

                        Was this imported from a .zip file through Tools -> Import -> NinjaScript Addon, or was this manually placed in the file system?

                        May I have you send an email to scriptingsupport [at] ninjatrader [dot] com so we may schedule a call for me to search the file system on your behalf?
                        In the email, please include a link to this forum thread.
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Skifree, Today, 03:41 AM
                        1 response
                        2 views
                        0 likes
                        Last Post Skifree
                        by Skifree
                         
                        Started by usazencort, Today, 01:16 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post usazencort  
                        Started by kaywai, 09-01-2023, 08:44 PM
                        5 responses
                        603 views
                        0 likes
                        Last Post NinjaTrader_Jason  
                        Started by xiinteractive, 04-09-2024, 08:08 AM
                        6 responses
                        23 views
                        0 likes
                        Last Post xiinteractive  
                        Started by Pattontje, Yesterday, 02:10 PM
                        2 responses
                        23 views
                        0 likes
                        Last Post Pattontje  
                        Working...
                        X