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

destroys NinjaTrader with a bad instruction

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

    destroys NinjaTrader with a bad instruction

    i write an instruction in my indicator that has destroyed NinjaTrader


    I created a strategy that calls me an indicator that calls an external enum ...
    The same strategy I call the same external Enum ..
    I fill all and
    Result: NinjaTrader locked .. to delete and reinstall after cleaning the documents directory


    ex:
    Indicator : Enum

    publicenum PriceType
    {
    Tick,
    Value
    }
    *****************************
    Indicator GO
    {
    ......
    i use Enum
    .......
    }


    Strategy Go1
    {
    ......
    Add(GO);
    d3=GO.value; (is an example)
    .....
    # region
    [Description("Settaggio Parametri Divergence")]
    [GridCategory("Divergenze Setting")]
    public enum Methods
    {
    get { return Methods; }
    set { Methods = value; }
    }
    #endregion
    }

    OK...in the last step i recall Enum(which had already been called in the indicator) e when i compile ...it block all forever

    Because it behaves like this?
    or should I create another emum

    #2
    See koganams post. That might help

    Comment


      #3
      Hello turbofib,

      There should be no issue calling a public enum from a strategy and an Indicator. I believe the issue is going to due to the Region area in the strategy.

      Code:
      public enum [COLOR="red"]Methods[/COLOR]
      {
      get { return [COLOR="red"]Methods[/COLOR]; }
      set { [COLOR="Red"]Methods [/COLOR]= value; }
      }
      You will not want to return a method to itself when declaring the variable. You would either want to call a different variable or the private version of the variable that uses a lower case first letter in most cases.

      For example:

      Code:
      public enum Methods
      {
      get { return methods; }
      set { methods = value; }
      }
      JCNinjaTrader Customer Service

      Comment


        #4
        is ok now... I did not notice the error...

        but if you happen to me 'this careless mistake .. there is no way to recover the whole NinjaTrader instead of reinstalling?

        Comment


          #5
          Hello turbofib,

          This code should not have caused anything that you would have to reinstall NinjaTrader. You may have had to force close NinjaTrader due to an endless loop using the Task Manager but I would not expect it to cause a reinstallation.

          Did you try to close NinjaTrader using the Task Manager?
          Find help and how-to articles for Windows operating systems. Get support for Windows and learn about installation, updates, privacy, security and more.
          JCNinjaTrader Customer Service

          Comment


            #6
            i try it... and the process is closed..But there is a problem...
            when after I start the ninjatrader ..i don't see it..but windows say me that it's running...and if i reset windows gives me the same result....i don't see a ninjatrader...
            strange but true..

            I had to use the restore windows to an earlier point

            Comment


              #7
              Hello turbofib,

              If that happens again, could you send me the log and trace files for that day so that I may look into this.

              You will find the log file on your PC in the (My) Documents > NinjaTrader 7 > Log folder.
              * The log file will be named "log.YYYYMMDD.txt"

              You will find the trace file on your PC in the (My) Documents > NinjaTrader 7 > Trace folder.
              * The trace file will be named "trace.YYYYMMDD.txt"


              You may send them to "support [at] ninjatrader [dot] com" with reference to this thread in the body of the email and "ATTN: JC" in the subject line.
              JCNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, Today, 06:40 PM
              0 responses
              9 views
              0 likes
              Last Post algospoke  
              Started by maybeimnotrader, Today, 05:46 PM
              0 responses
              7 views
              0 likes
              Last Post maybeimnotrader  
              Started by quantismo, Today, 05:13 PM
              0 responses
              7 views
              0 likes
              Last Post quantismo  
              Started by AttiM, 02-14-2024, 05:20 PM
              8 responses
              168 views
              0 likes
              Last Post jeronymite  
              Started by cre8able, Today, 04:22 PM
              0 responses
              10 views
              0 likes
              Last Post cre8able  
              Working...
              X