Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Reversals

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

    #16
    Hello,

    It would be difficult to provide any answer on this based on just the description and small amount of logic shown.

    In general you can control the flow of logic using if statements and conditions, a bool variable could likely be used to determine if the First has or has not become true which could be used to control the second condition and so on.

    It would all depend on the context of the script in its current state on what you would need to do.

    If you are simply trying to make condition 2 not work unless condition 1 has been fulfilled, or condition 3 if condition 2 has been fulfilled, likely you would need to add more bool properties for this type of logic. You could set a bool to true once a condition is true, and include that bool in the later conditions. If it was not set the condition has not yet happened.

    It may also be beneficial to create a empty testing script to just test controlling conditions. You can also find more information on control flow here: http://www.techotopia.com/index.php/...th_if_and_else

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #17
      Jesse. Thank you and thanks for the reference. Quite helpful.

      sandman

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Waxavi, Today, 02:10 AM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      12 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Waxavi, Today, 02:00 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by alifarahani, Today, 09:40 AM
      5 responses
      23 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by gentlebenthebear, Today, 01:30 AM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X