Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

And/OR in Strategy

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

    And/OR in Strategy

    Hi,

    When using the wizard to create a strategy for an alert, are the "sets" using "and" or are they using "or" to compile the strategy?

    That is, if set 1 specifies an alert to go off when 50dma crosses above 200dma and set 2 specifies to give an alert when 50dma crosses below 200dma will I get an alert because the strategy will consider this an "or" (either one of the sets occurs), or will I never get an alert because this is an "and" function, and hence you obviously can't have both happen at the same time?

    One other question: What's the difference between creating a bunch of sets with one condition in each of them them, versus creating those same conditions but all in one set?

    Thanks!

    #2
    Hi there. The individual sets use AND (&&) for comparision. For example, if you have two items in set 1:
    1. if (Close[0] >= 100)
    2. if (Close[0] < 100)
    the set would never be true or execute because there isn't anything that can satisfy both of those conditions at once.

    If you want to get a feel for how the wizard works, you can always click the "view code" button and see what code gets generated.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thanks for the answer.

      One other thing...

      I know that I can save a chart layout template and have that same template load the same way with the same indicators etc... every time I start a new chart w/ that template.

      Is there any way to do this for the strategies as well? Right now, every time I start a new chart using a template I have to manually add my strategy to each and every one; is there a way to save the strategy into the template so it loads with the chart automatically every time?

      Thanks!

      Comment


        #4
        Unfortunately not with NinjaTrader 6.5. This was a key point addressed in NinjaTrader 7:
        Persistence between sessions
        Strategies will now be maintained between NinjaTrader shutdown and restart. On restart, you can multi-select strategies in the Control Center Strategies grid and enable all strategies to run in a single click. You can disable, change parameters and re-enable a strategy. You can now also save a set of parameters as default. You no longer have to re-add strategies every time you restart NinjaTrader.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by janefoster, Yesterday, 11:50 PM
        0 responses
        5 views
        0 likes
        Last Post janefoster  
        Started by kaywai, 07-13-2024, 09:05 PM
        3 responses
        26 views
        0 likes
        Last Post kaywai
        by kaywai
         
        Started by stafe, Yesterday, 01:32 PM
        2 responses
        19 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by Jakub, Yesterday, 11:06 AM
        2 responses
        24 views
        0 likes
        Last Post ashpang
        by ashpang
         
        Started by MatthewLesko, 05-21-2021, 09:37 PM
        4 responses
        167 views
        0 likes
        Last Post Mahmad1323  
        Working...
        X