Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Resistance and Support Strategy

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

    Resistance and Support Strategy

    I've created a Strategy to Exit when Resistance or Support is reached but it does not work. Can you please tell me why?

    private double resistance = 1; // Default setting for Resistance
    private double support = 1; // Default setting for Support
    // Condition set 1
    if (High[0] >= Resistance)
    {
    ExitLong("BuyExitResist", "");
    }
    // Condition set 2
    if (Low[0] <= Support)
    {
    ExitShort("SellExitSupport", "");
    }

    #2
    Ken, what exactly does not work? You would need to check with TraceOrders into closer to see the 'under the hood' order behavior - http://www.ninjatrader.com/support/f...ead.php?t=3627

    Also, the S/R numbers you've got defined would only make sense for really low priced stocks - you to adjust them per instrument then.

    Comment


      #3
      In the Strategy paramaters I have entered a value of 1105.75 (ES) in the Resistance User Defined Inmput paramater when the current price was 1105.00. The current price went thru to 1106.25 but did not set a Sell Order. Why not?

      Comment


        #4
        Was there any position then open from the strategy itself? It would not close out your manually entered orders.

        Comment


          #5
          Yes, there was a manually entered Long position

          Comment


            #6
            Ok, then the outcome is expected - NinjaScript strategies do not manage manually submitted orders.

            Comment


              #7
              OK, I'll put it within another strategy and try that. Is the code with the double the right way to accomplish getting out at a resistance point?
              Also if my strategy is running and I want to overide it manually, what is the best way to do this?

              Comment


                #8
                Ken, it all needs to be in the same strategy, otherwise it will not be picked up. If you want manually manage the exit then if needed, try calling ATM strategy templates for this purpose - http://www.ninjatrader-support.com/H...trategies.html

                Comment


                  #9
                  I have watched my strategy running live and tried to move a profit target lower in the Static Dom only to see it pop right back to where it was. Is there a way to run Semi-Automatic?

                  Comment


                    #10
                    Yes, the semi automatic way would be using ATM's - the strategy will reset the target and stops of course on each bar update otherwise.

                    Comment


                      #11
                      But what is the best way to overide a Ninja Script Strategy, to exit or move a profit target when trading live?

                      Comment


                        #12
                        Ken, the recommend way is calling ATM's for exit management, then you can self manage orders as needed on DOM or ChartTrader - http://www.ninjatrader-support.com/H...trategies.html



                        A coding example is found under the 'SampleAtmStrategy' we install per default with NT.

                        Comment


                          #13
                          Can a Ninja Script Strategy be run from the Static SuperDOM?

                          Comment


                            #14
                            Not directly - you run it either from the chart or strategies tab and then it can call ATM templates defined in the SuperDOM for trade management.

                            Comment


                              #15
                              I don't see any option for running an ATM Strategy as an "action" in the Strategy Wizard. Would this only be possible from the Ninja Script Editor? Is this what you are refering to: running an ATM Strategy when a Ninja Script condition is "true"?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              649 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              370 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              109 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              574 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              576 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X