Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Regex.Replace Code Breaker for NT8

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

    Regex.Replace Code Breaker for NT8

    Dear Support,

    I am stuck in converting the following NT7 code line to NT8. I am not finding any code breaking documentation support for Regex.Replace. What is the equivalent to the in the following line for NT8.

    The code is supposed to search for a text and replace it for another text.

    Code:
     				tikFmt = Regex.Replace(TickSize.ToString(),"([\\d])","0");
    Many thanks.

    #2
    Hello aligator,

    Please see the following example,

    In a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.


    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlanP View Post
      Hello aligator,

      Please see the following example,

      In a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.


      Please let us know if you need further assistance.
      Thanks Alan,

      Regex.Replace Method does not seem to be supported Ninjatrader 8 ( Supported only in: NET. 3.5, 3.0, 2.0, 1.1, 1.0).

      Thanks.

      Comment


        #4
        Hello aligator,

        Did you add the following using statement?

        Code:
        using System.Text.RegularExpressions;
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_AlanP View Post
          Hello aligator,

          Did you add the following using statement?

          Code:
          using System.Text.RegularExpressions;
          Thanks Alan,

          That was the missing declaration.

          Cheers to that.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by kujista, Today, 06:23 AM
          2 responses
          6 views
          0 likes
          Last Post kujista
          by kujista
           
          Started by f.saeidi, Today, 08:03 AM
          0 responses
          4 views
          0 likes
          Last Post f.saeidi  
          Started by cre8able, 04-17-2024, 04:16 PM
          7 responses
          64 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by Aviram Y, 08-09-2023, 09:04 AM
          11 responses
          299 views
          0 likes
          Last Post arjandezeeuw  
          Started by Christopher Leggit, 02-15-2024, 09:00 AM
          3 responses
          47 views
          0 likes
          Last Post rdtdale
          by rdtdale
           
          Working...
          X