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

Inserting code or quote in message

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

    Inserting code or quote in message

    First question - how do you do that?

    #2
    How do you do what?

    You mean for a forum message?

    When replying to a specific message, use the "Quote" button in the lower right of that specific message. You should do this to get your reply started -- this reveals an editing window on the same web page with the quoted message inside special 'markup' delimiters -- type your reply below this.

    Once you have your reply window started ...
    study the buttons in the toolbar just above your editing window. That is, hover over each button for it's tooltip message.

    You'll want to use the button with a giant '#' for marking code blocks.

    Comment


      #3
      Serialize

      Code:
      [XmlIgnore()]
               [GridCategory("Parameters")]
               public string SoundFileName        
              {
                  get { return soundFileName; }
                  set { soundFileName = value; }
              }
              
              [Browsable(false)]
              public string SoundFileNameSerialize
              {
                  get { return soundFileName.ToString(); }
                  set { soundFileName = (value); }
              }
      Can someone tell me what I am missing here? Default “soundFileName” shows up in the user dialog window. If I type in another Wav file from the proper sound folder file it shows up in the parameter section and sticks with reboot but does not work. The soundFileName previously chosen still sounds.

      I have not been able to find a syntax example for this

      Comment


        #4
        Originally posted by Pete77 View Post
        Code:
        [XmlIgnore()]
                 [GridCategory("Parameters")]
                 public string SoundFileName        
                {
                    get { return soundFileName; }
                    set { soundFileName = value; }
                }
                
                [Browsable(false)]
                public string SoundFileNameSerialize
                {
                    get { return soundFileName.ToString(); }
                    set { soundFileName = (value); }
                }
        Can someone tell me what I am missing here? Default “soundFileName” shows up in the user dialog window. If I type in another Wav file from the proper sound folder file it shows up in the parameter section and sticks with reboot but does not work. The soundFileName previously chosen still sounds.

        I have not been able to find a syntax example for this
        It is a string. So why are you doing this in the first place? Just serialize the string without any decorations.

        How the string gets passed to your code can only be assessed if we can see how you are passing the string to the code. The serialization is a separate issue.
        Last edited by koganam; 08-13-2018, 07:39 AM. Reason: Corrected sentence case.

        Comment


          #5
          Hello Pete77,

          Thank you for your note.

          If you remove the following from your code, as koganam suggested, does the script run as expected?

          Code:
          [XmlIgnore()]
          I look forward to your reply.
          Alan P.NinjaTrader Customer Service

          Comment


            #6
            Thanks Alan, I am still getting previously set default wav file, not the one I have changed to in the user dialog box


            private string soundFileName = "Aert3.WAV";



            [GridCategory("Parameters")]
            public string SoundFileName
            {
            get { return soundFileName; }
            set { soundFileName = value; }
            }

            [Browsable(false)]
            public string SoundFileNameSerialize
            {
            get { return soundFileName.ToString(); }
            set { soundFileName = (value); }
            }
            Last edited by Pete77; 08-13-2018, 11:36 AM.

            Comment


              #7
              Hello,

              Without the full code we're unable to test on our end.

              If you'd like to upload the full code I can take a look and see if anything jumps out. Or if you'd prefer to email a copy, send to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.

              I look forward to your reply.
              Alan P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              44 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              20 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              179 views
              0 likes
              Last Post jeronymite  
              Started by ghoul, Today, 06:02 PM
              0 responses
              9 views
              0 likes
              Last Post ghoul
              by ghoul
               
              Started by DanielSanMartin, Yesterday, 02:37 PM
              2 responses
              13 views
              0 likes
              Last Post DanielSanMartin  
              Working...
              X