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 MarianApalaghiei, Today, 10:49 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        8 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        46 views
        0 likes
        Last Post bill2023  
        Working...
        X