Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What is the difference between

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

    What is the difference between

    if ((conditionA == true) && (conditionB == true))
    {
    }

    AND

    if (conditionA == true)
    {
    if (conditionB == true)
    {
    }
    }

    #2
    Hi kaywai,

    The result in function is identical.

    Using && makes for a more efficient running code, while using nested if's may provide you more flexibility.
    TimNinjaTrader Customer Service

    Comment


      #3
      And a better way is:
      if (conditionA && conditionB)

      Baruch

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by op1031, Yesterday, 05:16 PM
      1 response
      8 views
      0 likes
      Last Post NT-Roland  
      Started by sinpeople, Today, 07:20 AM
      1 response
      3 views
      0 likes
      Last Post NT-Roland  
      Started by Frank1000, Today, 03:05 AM
      1 response
      7 views
      0 likes
      Last Post NT-Roland  
      Started by ntdev, Today, 01:14 AM
      4 responses
      16 views
      0 likes
      Last Post ntdev
      by ntdev
       
      Started by ct, Today, 02:22 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Jason  
      Working...
      X