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

#endregion directive expected

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

    #endregion directive expected

    Hi, Ninjatrader technical support team.
    I was trying to build a simple indicator that contains 2 EMA and add a cloud between them. When I hit compile it shows error "#endregion directive expected", I add "#endregion" by the very end of my code and hit compile again, and the #endregion that I just added disappears and shows the same error again. The code I put down below. Please help me out. Thanks.

    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;

    namespace NinjaTrader.NinjaScript.Indicators
    {
    public class JlinesCloudIndicator : Indicator
    {
    private EMA ema1;
    private EMA ema2;
    private Cloud cloud;

    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = "My Cloud Indicator";
    Name = "Jlines Cloud";
    Calculate = Calculate.OnBarClose;
    IsOverlay = true;
    DisplayInDataBox = true;
    DrawOnPricePanel = true;
    DrawHorizontalGridLines = true;
    DrawVerticalGridLines = true;
    PaintPriceMarkers = true;
    ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
    //Disable this property if your indicator requires custom values that cumulate with each new market data event.
    //See Help Guide for additional information.
    IsSuspendedWhileInactive = true;
    Period1 = 72;
    Period2 = 89;
    CloudColor = Brushes.LimeGreen;

    ema1 = EMA(Close, Period1);
    ema2 = EMA(Close, Period2);
    cloud = Cloud(ema1, ema2);
    }
    else if (State == State.Configure)
    {
    AddChartIndicator(cloud);
    }
    }

    protected override void OnBarUpdate()
    {
    }

    region Properties
    [NinjaScriptProperty]
    [Range(1, int.MaxValue)]
    [Display(Name="Period1", Order=1, GroupName="Parameters")]
    public int Period1
    { get; set; }

    [NinjaScriptProperty]
    [Range(1, int.MaxValue)]
    [Display(Name="Period2", Order=2, GroupName="Parameters")]
    public int Period2
    { get; set; }

    [NinjaScriptProperty]
    [XmlIgnore]
    [Display(Name="CloudColor", Order=3, GroupName="Parameters")]
    public Brush CloudColor
    { get; set; }
    #endregion
    }
    }

    region NinjaScript generated code. Neither change nor remove.

    namespace NinjaTrader.NinjaScript.Indicators
    {
    public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
    {
    private JlinesCloudIndicator[] cacheJlinesCloudIndicator;
    public JlinesCloudIndicator JlinesCloudIndicator(int period1, int period2, Brush cloudColor)
    {
    return JlinesCloudIndicator(Input, period1, period2, cloudColor);
    }

    public JlinesCloudIndicator JlinesCloudIndicator(ISeries<double> input, int period1, int period2, Brush cloudColor)
    {
    if (cacheJlinesCloudIndicator != null)
    for (int idx = 0; idx < cacheJlinesCloudIndicator.Length; idx++)
    if (cacheJlinesCloudIndicator[idx] != null && cacheJlinesCloudIndicator[idx].Period1 == period1 && cacheJlinesCloudIndicator[idx].Period2 == period2 && cacheJlinesCloudIndicator[idx].CloudColor == cloudColor && cacheJlinesCloudIndicator[idx].EqualsInput(input))
    return cacheJlinesCloudIndicator[idx];
    return CacheIndicator<JlinesCloudIndicator>(new JlinesCloudIndicator(){ Period1 = period1, Period2 = period2, CloudColor = cloudColor }, input, ref cacheJlinesCloudIndicator);
    }
    }
    }

    namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
    {
    public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
    {
    public Indicators.JlinesCloudIndicator JlinesCloudIndicator(int period1, int period2, Brush cloudColor)
    {
    return indicator.JlinesCloudIndicator(Input, period1, period2, cloudColor);
    }

    public Indicators.JlinesCloudIndicator JlinesCloudIndicator(ISeries<double> input , int period1, int period2, Brush cloudColor)
    {
    return indicator.JlinesCloudIndicator(input, period1, period2, cloudColor);
    }
    }
    }

    namespace NinjaTrader.NinjaScript.Strategies
    {
    public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
    {
    public Indicators.JlinesCloudIndicator JlinesCloudIndicator(int period1, int period2, Brush cloudColor)
    {
    return indicator.JlinesCloudIndicator(Input, period1, period2, cloudColor);
    }

    public Indicators.JlinesCloudIndicator JlinesCloudIndicator(ISeries<double> input , int period1, int period2, Brush cloudColor)
    {
    return indicator.JlinesCloudIndicator(input, period1, period2, cloudColor);
    }
    }
    }

    #endregion

    #2
    Hello, thanks for writing in. You need an #endregion afer the using delcarations:

    HTML 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
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hey Chris L. I had the same exact issue yesterday and posted it here but I wasn't able to get the resolution...can you take a look and see if you can help, please?


      region Variables
      private ToolStrip toolStripForm = null;
      private ToolStripButton Engage_Button = null;
      private int ct = 0;
      private int Bias = -1;
      const int NONE = -1;
      const int SHORT = 0;
      const int LONG = 1;
      private Color upColor = Color.Green;
      private Color downColor = Color.Red;
      private Color neutralColor = Color.DimGray;

      private bool border_On = true; // left or right

      private int vsma = 255;
      private int upOpaclevel = 254;
      private int downOpaclevel = 254;
      private int widthStrip = 10;

      #endregion
      protected override void OnStateChange()
      {
      if (State == State.SetDefaults)
      {
      Description = @"LeftMarginStripe";
      Name = "LeftMarginStripe";
      Calculate = Calculate.OnBarClose;
      IsOverlay = true;
      DisplayInDataBox = true;
      DrawOnPricePanel = true;
      DrawHorizontalGridLines = true;
      DrawVerticalGridLines = true;
      PaintPriceMarkers = true;
      ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
      //Disable this property if your indicator requires custom values that cumulate with each new market data event.
      //See Help Guide for additional information.
      IsSuspendedWhileInactive = true;
      UpBrush = Brushes.Honeydew;
      DownBrush = Brushes.MistyRose;


      }
      region Tool Bar Control
      }
      protected override void OnBarUpdate()
      {

      }


      region Tool Bar Control
      protected override void OnStartUp()
      {

      if (toolStripForm==null)
      {
      if (border_On)
      toolStripForm= new ToolStrip() {Dock=DockStyle.Right, Name="ToolStripFormeSenderReceiever", Visible=true};
      else if (!border_On)
      toolStripForm= new ToolStrip() {Dock=DockStyle.Left, Name="ToolStripFormeSenderReceiever", Visible=true};

      toolStripForm.AutoSize = false;
      toolStripForm.CanOverflow = false;
      ChartControl.Controls.Add(toolStripForm);

      this.toolStripForm.BackColor = Color.Gray;
      this.toolStripForm.Width = widthStrip;
      Engage_Button = new ToolStripButton("Switch");
      Engage_Button.Enabled = true;
      Engage_Button.Name = "Switch";
      Engage_Button.Text = "";
      Engage_Button.Click += button1_Click;
      Engage_Button.AutoSize = false;
      toolStripForm.Items.Add(Engage_Button);

      toolStripForm.Resize += toolStripForm_Resize;
      toolStripForm_Resize(null,null);
      }
      return;
      }

      private void toolStripForm_Resize(object sender, System.EventArgs e)
      {
      this.Engage_Button.Height = 50;
      this.Engage_Button.Width = 15 ;
      this.Engage_Button.Invalidate();
      }

      private void button1_Click(object sender, EventArgs e)
      {
      ct = ct + 1;

      switch (ct)
      {
      case 1:
      this.toolStripForm.BackBrushColor = Brushes.Black;
      break;
      case 2:
      this.toolStripForm.BackBrushColor = Brushes.DarkOrange;
      break;
      case 3:
      {
      ct = 0;
      this.toolStripForm.BackBrushColor = Brushes.Gray;
      }
      break;
      }
      return;
      }
      #endregion
      /// <summary>
      ///
      /// </summary>


      protected void Calculate_Bias()
      {
      if (Rising(SMA(BarsArray[0],vsma)))
      {Bias = LONG;return;}

      if (Falling(SMA(BarsArray[0],vsma)))
      {Bias = SHORT;return;}

      Bias = NONE;
      return;
      }

      /// Called on each bar update event (incoming tick)
      /// </summary>
      protected override void OnBarUpdate()
      {
      // Use this method for calculating your indicator values. Assign a value to each
      // plot below by replacing 'Close[0]' with your own formula.

      if(BarsInProgress != 0) {return;}
      if (CurrentBars[0] < BarsRequired) {return;}
      if(Historical) {return;}

      Calculate_Bias();

      {
      switch (Bias)
      {
      case NONE:
      {
      this.toolStripForm.BackBrush = neutralBrushes;
      }
      break;

      case LONG:
      {
      this.toolStripForm.BackBrushColor = Brushes.FromArgb(upOpaclevel, upBrushes); //BrushesColor

      }
      break;

      case SHORT:
      {
      this.toolStripForm.BackBrushColor = Brushes.FromArgb(downOpaclevel, downBrushes); //BrushesColor;

      }
      break;

      }

      }

      }

      // This is called to shut down the form
      region Termination
      protected override void OnTermination()
      {
      if ( toolStripForm != null )
      {
      toolStripForm.Resize -= toolStripForm_Resize;
      if ( Engage_Button != null )
      toolStripForm.Items.Remove(Engage_Button);
      toolStripForm.Dispose();
      toolStripForm = null;
      Engage_Button = null;

      }
      }
      #endregion
      region Properties
      // Create our user definable color input
      [XmlIgnore()]
      [ Description ("Color for Up.")]
      [GridCategory("Stripe")]
      public Brush UpBrush
      { get; set; }

      // Serialize our Color object
      [Browsable(false)]
      public string UpBrushSerialize
      {
      get { return Serialize.BrushToString(UpBrush); }
      set { UpBrush = Serialize.StringToBrush(value); }
      }

      [XmlIgnore()]
      [ Description ("Color for Down.")]
      [GridCategory("Stripe")]
      public Brush DownBrush
      { get; set; }

      [Browsable(false)]
      public string DownBrushSerialize
      {
      get { return Serialize.BrushToString(DownBrush); }
      set { DownBrush = Serialize.StringToBrush(value); }
      }

      [XmlIgnore()]
      [ Description ("Color for Neutral.")]
      [GridCategory("Stripe")]
      public Brush NeutralBrush
      { get; set; }

      [Browsable(false)]
      public string DownBrushSerialize
      {
      get { return Serialize.BrushToString(NeutralBrush); }
      set { NeutralBrush = Serialize.StringToBrush(value); }
      }


      /// </summary>
      [Description("Chosen value of SMA.")]
      [Category("Parameters")]
      public int Vsma
      {
      get { return vsma; }
      set { vsma = Math.Max(1, value); }
      }

      [Description("True: Right sided stripe. False: Left sided stripe.")]
      [GridCategory("Stripe")]
      public bool Border_On
      {
      get { return border_On; }
      set { border_On = value; }
      }

      /// </summary>
      [Description("Width of stripe.")]
      [GridCategory("Parameters")]
      public int WidthStrip
      {
      get { return widthStrip; }
      set { widthStrip = Math.Max(1, value); }
      }
      /// </summary>
      [Description("Opacity Level for Up. 1-254.")]
      [GridCategory("Stripe")]
      public int UpOpaclevel
      {
      get { return upOpaclevel; }
      set { upOpaclevel = Math.Max(1, value); }
      }

      /// </summary>
      [Description("Opacity Level for Down. 1-254.")]
      [GridCategory("Stripe")]
      public int DownOpaclevel
      {
      get { return downOpaclevel; }
      set { downOpaclevel = Math.Max(1, value); }
      }
      #endregion
      }
      }​​

      Comment


        #4
        Hello, thanks for the follow up. You need an #endregion statement anywhere you have opened up a region

        It looks like its missing in region Tool Bar Control​​
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Chris L. Thanks, Yes I did try that and it didn't work, I even went and commented out all the regions and that didn't help at all. I don't know what else to do.

          Comment


            #6
            Hello, thanks for the follow-up. You will need to debug your script. There is a syntax error that needs to be fixed, that's the only solution to this issue. Consider creating a new script and copy/pasting the logic into the new script and deleting the old one.
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChrisL View Post
              Hello, thanks for writing in. You need an #endregion afer the using delcarations:

              HTML 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
              Thank you very much, Chris.
              This error is been solved but the other error pops up.

              the type or namespace name "cloud" could not be found(are you missing a using directive or an assembly reference?) Click image for larger version

Name:	12124124324234.png
Views:	228
Size:	201.4 KB
ID:	1229835

              Comment


                #8
                Hello, thanks for the follow up. This means that there is no indicator or any class named Cloud in your installation. If you have this installed as a DLL, you can right click the NinjaScript Editor and go to References>Add to add new references.

                Kind regards,

                -ChrisL
                Chris L.NinjaTrader Customer Service

                Comment


                  #9
                  Chris L. I did as you suggested and even removed all the region endregion and now it says... Extern alias declarations using, assembly/module attributes, or namespaces/type declaration expected here is what I did can you take a look, please
                  Click image for larger version

Name:	image.png
Views:	277
Size:	3.3 KB
ID:	1229876
                  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.
                  {
                  public class LeftRightMargin : Indicator
                  {
                  private ToolStrip toolStripForm = null;
                  private ToolStripButton Engage_Button = null;
                  private int ct = 0;
                  private int Bias = -1;
                  const int NONE = -1;
                  const int SHORT = 0;
                  const int LONG = 1;
                  private bool border_On = true; // left or right
                  private int vSMA = 255;
                  private int upOpaclevel = 254;
                  private int downOpaclevel = 254;
                  private int widthStrip = 10;

                  protected override void OnStateChange()
                  {
                  if (State == State.SetDefaults)
                  {
                  Description = @"LeftRightMargin";
                  Name = "LeftRightMargin";
                  Calculate = Calculate.OnBarClose;
                  IsOverlay = false;
                  DisplayInDataBox = true;
                  DrawOnPricePanel = true;
                  DrawHorizontalGridLines = true;
                  DrawVerticalGridLines = true;
                  PaintPriceMarkers = true;
                  ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
                  //Disable this property if your indicator requires custom values that cumulate with each new market data event.
                  //See Help Guide for additional information.
                  IsSuspendedWhileInactive = true;
                  UpBrush = Brushes.Green;
                  DownBrush = Brushes.Red;
                  NeutralBrush = Brushes.DimGray;

                  }
                  else if (State == State.Configure)
                  {
                  }
                  }

                  protected override void OnBarUpdate()
                  {

                  //Add your custom indicator logic here.
                  if (toolStripForm==null)
                  {
                  if (border_On)
                  toolStripForm= new ToolStrip() {Dock=DockStyle.Right, Name="ToolStripFormeSenderReceiever", Visible=true};
                  else if (!border_On)
                  toolStripForm= new ToolStrip() {Dock=DockStyle.Left, Name="ToolStripFormeSenderReceiever", Visible=true};

                  toolStripForm.AutoSize = false;
                  toolStripForm.CanOverflow = false;
                  ChartControl.Controls.Add(toolStripForm);

                  this.toolStripForm.BackColor = Brushes.Gray;
                  this.toolStripForm.Width = widthStrip;
                  Engage_Button = new ToolStripButton("Switch");
                  Engage_Button.Enabled = true;
                  Engage_Button.Name = "Switch";
                  Engage_Button.Text = "";
                  Engage_Button.Click += button1_Click;
                  Engage_Button.AutoSize = false;
                  toolStripForm.Items.Add(Engage_Button);

                  toolStripForm.Resize += toolStripForm_Resize;
                  toolStripForm_Resize(null,null);
                  }
                  return;
                  }

                  private void toolStripForm_Resize(object sender, System.EventArgs e)
                  {
                  this.Engage_Button.Height = 50;
                  this.Engage_Button.Width = 15 ;
                  this.Engage_Button.Invalidate();
                  }

                  private void button1_Click(object sender, EventArgs e)
                  {
                  ct = ct + 1;

                  switch (ct)
                  {
                  case 1:
                  this.toolStripForm.BackBrushColor = Brushes.Black;
                  break;
                  case 2:
                  this.toolStripForm.BackBrushColor = Brushes.DarkOrange;
                  break;
                  case 3:
                  {
                  ct = 0;
                  this.toolStripForm.BackBrushColor = Brushes.Gray;
                  }
                  break;
                  }
                  return;
                  }

                  protected void Calculate_Bias()
                  {
                  if (Rising(LinReg(BarsArray[0],vsma)))
                  {Bias = LONG;return;}

                  if (Falling(LinReg(BarsArray[0],vsma)))
                  {Bias = SHORT;return;}

                  Bias = NONE;
                  return;

                  if(BarsInProgress != 0) {return;}
                  if (CurrentBars[0] < BarsRequired) {return;}
                  if(Historical) {return;}

                  Calculate_Bias();

                  {
                  switch (Bias)
                  {
                  case NONE:
                  {
                  this.toolStripForm.BackBrush = NeutralBrushes;
                  }
                  break;

                  case LONG:
                  {
                  this.toolStripForm.BackBrushColor = Brushes.FromArgb(upOpaclevel, UpBrushes); //BrushesColor

                  }
                  break;

                  case SHORT:
                  {
                  this.toolStripForm.BackBrushColor = Brushes.FromArgb(downOpaclevel, DownBrushes); //BrushesColor;

                  }
                  break;

                  }

                  }

                  }

                  protected override void OnTermination()
                  {
                  if ( toolStripForm != null )
                  {
                  toolStripForm.Resize -= toolStripForm_Resize;
                  if ( Engage_Button != null )
                  toolStripForm.Items.Remove(Engage_Button);
                  toolStripForm.Dispose();
                  toolStripForm = null;
                  Engage_Button = null;

                  }
                  }

                  region Properties
                  // Create our user definable color input
                  [XmlIgnore()]
                  [ Description ("Color for Up.")]
                  [GridCategory("Stripe")]
                  public Brush UpBrush
                  { get; set; }

                  // Serialize our Color object
                  [Browsable(false)]
                  public string UpBrushSerialize
                  {
                  get { return Serialize.BrushToString(UpBrush); }
                  set { UpBrush = Serialize.StringToBrush(value); }
                  }

                  [XmlIgnore()]
                  [ Description ("Color for Down.")]
                  [GridCategory("Stripe")]
                  public Brush DownBrush
                  { get; set; }

                  [Browsable(false)]
                  public string DownBrushSerialize
                  {
                  get { return Serialize.BrushToString(DownBrush); }
                  set { DownBrush = Serialize.StringToBrush(value); }
                  }

                  [XmlIgnore()]
                  [ Description ("Color for Neutral.")]
                  [GridCategory("Stripe")]
                  public Brush NeutralBrush
                  { get; set; }

                  [Browsable(false)]
                  public string NeutralBrushSerialize
                  {
                  get { return Serialize.BrushToString(NeutralBrush); }
                  set { NeutralBrush = Serialize.StringToBrush(value); }
                  }


                  /// </summary>
                  [Description("Chosen value of vSMA.")]
                  [Category("Parameters")]
                  public int vSMA
                  {
                  get { return vsma; }
                  set { vlinreg = Math.Max(1, value); }
                  }

                  [Description("True: Right sided stripe. False: Left sided stripe.")]
                  [GridCategory("Stripe")]
                  public bool Border_On
                  {
                  get { return border_On; }
                  set { border_On = value; }
                  }

                  /// </summary>
                  [Description("Width of stripe.")]
                  [GridCategory("Parameters")]
                  public int WidthStrip
                  {
                  get { return widthStrip; }
                  set { widthStrip = Math.Max(1, value); }
                  }
                  /// </summary>
                  [Description("Opacity Level for Up. 1-254.")]
                  [GridCategory("Stripe")]
                  public int UpOpaclevel
                  {
                  get { return upOpaclevel; }
                  set { upOpaclevel = Math.Max(1, value); }
                  }

                  /// </summary>
                  [Description("Opacity Level for Down. 1-254.")]
                  [GridCategory("Stripe")]
                  public int DownOpaclevel
                  {
                  get { return downOpaclevel; }
                  set { downOpaclevel = Math.Max(1, value); }
                  }
                  #endregion
                  }
                  }
                  }
                  }​

                  Comment


                    #10
                    Hi JustinaM, It would be better to Export your script and post it here instead of pasting it into the text block. Please see here for instructions on exporting. Once you have exported it, please upload the .zip here.


                    Chris L.NinjaTrader Customer Service

                    Comment


                      #11
                      Chris L. It gave me two more Type or namespace definition, or end-of-file expected for Linw 277 and 278 but it's nothing there

                      Comment


                        #12
                        Ah, so sorry for the oversight Justina. Of course, we can not export anything if there are compile error. Please just go into Documents\NinjaTrader 8\bin\Custom\Indicators and file the corresponding .cs file. Please attach the .cs file and I will have a look at it for you.
                        Chris L.NinjaTrader Customer Service

                        Comment


                          #13
                          Good Moring ChrisL, I have attached the file LeftRightMargin.cs

                          Comment


                            #14
                            Hello, there were extra brackets in this code file so I removed them. The error you are getting in your screenshot is from "MyCustomIndicator" so this script might not be an issue anymore but that indicator might be an issue still.

                            Attached Files
                            Chris L.NinjaTrader Customer Service

                            Comment


                              #15
                              Thanks ChrisL, I just uploaded the files you sent but it has even more errors and won't compile for me. I don't understand what any of the errors are really I'm new at coding. What do you suggest at this point I really appreciate the effort you are giving to resolve this matter for me but if it's best to abort the indicator I will, I don't want to overcomplicate your workload. I just like the indicator when I was on NT7

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Brevo, Today, 01:45 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post Brevo
                              by Brevo
                               
                              Started by aussugardefender, Today, 01:07 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post aussugardefender  
                              Started by pvincent, 06-23-2022, 12:53 PM
                              14 responses
                              238 views
                              0 likes
                              Last Post Nyman
                              by Nyman
                               
                              Started by TraderG23, 12-08-2023, 07:56 AM
                              9 responses
                              384 views
                              1 like
                              Last Post Gavini
                              by Gavini
                               
                              Started by oviejo, Today, 12:28 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post oviejo
                              by oviejo
                               
                              Working...
                              X