fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    how to display result of a condition in comments

    Questions & Answers
    2
    5
    769
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      holygrailfx last edited by

      Well title says it all I believe..
      I guess I have missed something (again) 😉

      Thanks for the help

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        The result of a condition is that the next block(s) run. Condition = if. If A > B, then do something. No information is saved from those if's. What is your idea?

        1 Reply Last reply Reply Quote 0
        • H
          holygrailfx last edited by

          I was trying to display in Comments the current trend

          for example
          the condition CandleClose(1)>CandleOpen(1) is true

          on the commnet screen I have a message saying CURRENT TREND IS BUY

          it is only cosmetics 😉

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            A condition is something like this:

            if (A > B)
            {
               do something
            }
            

            or

            bool result = (A > B);
            
            if (result == true)
            {
               do something
            }
            

            or

            bool result = false;
            
            if (A > B)
            {
               result = true;
            }
            
            if (result == true)
            {
               do something
            }
            
            1 Reply Last reply Reply Quote 0
            • fxDreema
              fxDreema last edited by

              If you have the Comment block after that Condition, then it is true. But you can have it before, the Comment block could run before the Condition is checked. It depends.

              You can have a Variable that will be set to 0 before the condition and to 1 after. Look at the vertical "Variables" for that Condition block, there are ways to modify Variables in there.

              Another way is, if you are working with the current symbol and timeframe, then if you write this somewhere:

              Close[1] > Open[1]
              

              ... it should return the result of that comparison, which will be true or false

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              Online Users

              T
              M
              C
              A
              A
              H
              E

              12
              Online

              146.8k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors