Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cretate person error message

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

    Cretate person error message

    Hi,

    1)
    I tried to search the forum, but I could not find anything.
    I have three parameters that can be entered by the user: A, B and C. They must be A <B <C. If the user enters wrong values I want one of two things:
    - that in the strategy analyzer does not accept values other than A <B <C, or
    - that an "Error" banner opens, which warns the user that he made a mistake

    2)
    How can I display an error banner that blocks the strategy?

    Thanks Alberto

    #2
    Hello Apo84,

    Thank you for your note.

    It would be simplest to put logic at the beginning of OnBarUpdate that checks the values of the three inputs against each other, and if A is greater than B or C, or if B is greater than C or so on, then display a message and return out of OnBarUpdate.

    I'm attaching a simple example strategy that demonstrates. It will place orders only if the parameters are in ascending order of value. If they are not, it will display a message telling the user to check the parameters using Draw.TextFixed.

    Please let us know if we may be of further assistance to you.
    Attached Files

    Comment


      #3
      Thanks, for the answer.

      I want to display an error banner that blocking the strategy. Because I want it to appear on a banner.
      Thanks Alberto

      Comment


        #4
        I need to know how to create warning or error popups etc ...
        I attach an example
        Attached Files

        Comment


          #5
          Hello Apo84,

          Thank you for your reply.

          That's going to be more complicated than simply printing a message telling the user to check the parameters.

          In general there is not a specific NinjaScript command for a popup, this would just be a C# general item. Also we generally don't suggest using popups as this blocks you from clicking the user interface until you click OK on the message, if that is the action you are seeking you could utilize this information: https://www.dotnetperls.com/messagebox-show

          You could populate the string with any information you wanted such as telling the user to fix the parameters.

          Please let us know if we may be of further assistance to you.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          71 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          143 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          76 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          47 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          51 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X