Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

from Nt7 to Nt8

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

    from Nt7 to Nt8

    Hello, I would like to change this code from NT7 to NT8, can you help me?
    Thank you



    private string stringtoAlert = "Alert2.wav";
    private string fromEmailAddress = @"[email protected]";
    private string toEmailAddress = @"[email protected]";
    private bool emailPartFilled = false;


    if(emailPartFilled)
    {
    emailPartFilled = true;
    SendMail(fromEmailAddress, toEmailAddress, "NinjaTrader Confirmation", "Trend aligned");
    }


    }
    [Description("Send email when is TRUE")]
    [GridCategory("Parameters-Other")]
    [Gui.Design.DisplayName("5.EMAIL send?")]
    public bool EmailPartFilled
    {
    get { return emailPartFilled; }
    set { emailPartFilled = value; }
    }

    #2
    Hello punkiy2111,

    Thank you for your post.

    Here are some resources that will help you convert this code to NinjaTrader 8.

    First, here is our section of the help guide that goes over Code Breaking Changes:

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

    Here's our help guide section on SendMail:

    https://ninjatrader.com/support/help...8/sendmail.htm

    And here's our section on how to structure Parameters:

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

    This should help you in being able to convert this code to NinjaTrader 8.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello punkiy2111,

      Thanks for opening the thread.

      I would first suggest setting up the Email Share Service in the Control Center under Tools > Options > General. Note that when setting up an email share service, you will need to set up an app password with your email provider and use that app password to log in. Generally email services will let you assign an App password once 2 factor authentication is set up.

      I have linked some publicly available articles that describe this for Gmail.

      Set up 2 Step authentication with Gmail: https://www.google.com/accounts/SmsAuthConfig
      Set up an App password: https://security.google.com/settings...y/apppasswords

      From there I would suggest testing the email share service and then to test it in a NinjaScript.

      For the conversion process, your code looks compliant except for the user defined input. You can right click on the Indicators folder in the NinjaScript Editor and select New Indicator to open a wizard that can generate the syntax for user inputs, or you can reference the help guide article below.

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

      I would also like to point out our Code Breaking Changes page of the Help Guide which can be used as a guide when converting scripts from NinjaTrader 7 to NinjaTrader 8.

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

      We look forward to assisting.
      JimNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sdauteuil, Today, 12:00 PM
      0 responses
      4 views
      0 likes
      Last Post sdauteuil  
      Started by georges61, Today, 11:35 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by outcodenick, Today, 11:48 AM
      0 responses
      1 view
      0 likes
      Last Post outcodenick  
      Started by EquityTrader, Today, 11:37 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by Atomic, Today, 11:27 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X