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

reference strategy within a strategy using Wizard

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

    reference strategy within a strategy using Wizard

    Is it possible to use Wizard Ninja Script builder to call a strategy I already built as part of a step? Respectfully, CastusMo

    #2
    Hello,
    It is not supported to call another strategy within a strategy or an indicator. This is not supported in the strategy wizard or through custom programming.
    If we can be of any other assistance please let us know.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thank for your reply. My goal is to have a strategy work using Wizard to execute "On Bar Close", but then have a stop loss with a strategy that does not wait until the Bar is closed. Is there a way to use Wizard to execute a strategy that does wait for the bar to close before entering the trade, but does not wait for the bar to close as a stop loss?

      Comment


        #4
        Originally posted by CactusMo View Post
        Thank for your reply. My goal is to have a strategy work using Wizard to execute "On Bar Close", but then have a stop loss with a strategy that does not wait until the Bar is closed. Is there a way to use Wizard to execute a strategy that does wait for the bar to close before entering the trade, but does not wait for the bar to close as a stop loss?
        That is the default behavior of Strategies. Stops are executed when they are hit, not when a bar closes.

        Comment


          #5
          I understand it will hit if a certain price is set for a stop loss the strategy will execute without waiting for the bar to close However, if my stop loss is the low of the previous bar, then the strategy default will not execute until the bar is closed below the previous bar. I wold like to have it stop out if the price goes below the previous bar even though the bar has not closed. Is that doable?

          Comment


            #6
            Originally posted by CactusMo View Post
            I understand it will hit if a certain price is set for a stop loss the strategy will execute without waiting for the bar to close However, if my stop loss is the low of the previous bar, then the strategy default will not execute until the bar is closed below the previous bar. I wold like to have it stop out if the price goes below the previous bar even though the bar has not closed. Is that doable?
            Not true. The Stop will be executed when the price is hit. Period! At any time. The previous bar has nothing to do with the close or otherwise of the current bar.

            Comment


              #7
              Stop out at price point before candle close

              Okay. I must be doing something wrong. Please see attached first image of my exit strategy. Second image show system waits for candle to close before exiting. Not show exit on low of 2 bars ago. I must be missing something because I trust your feedback.
              Attached Files

              Comment


                #8
                Hello,
                What Koganam is referring to would be what it would be like when trading in real time. As you are backtesting the fills do occur at the end of the bar. This causes some discrepancies between the two environments. Please see the following link on such discrepencies: http://ninjatrader.com/support/helpG...ime_vs_bac.htm
                You can workaround some of these discrepancies by adding in intrabar granularity. For more information on intrabar granularity please see the following reference sample: http://ninjatrader.com/support/forum...ead.php?t=6652
                Cody B.NinjaTrader Customer Service

                Comment


                  #9
                  exit below previous bar and not wait till close

                  Please see attached image showing live trading where stop does not close below the 2 previous bars. Looks like it waits till current bar closes before exiting. What am I doing wrong.
                  Attached Files

                  Comment


                    #10
                    Hello,
                    Are you running this strategy with CalculateOnBarClose set to true?
                    Cody B.NinjaTrader Customer Service

                    Comment


                      #11
                      Yes, I understand that I have a strategy that is to calculate Onbarclose set to true. If you look, my original inquiry I asked, is there a way to set a strategy that executes OnBarClose, but calls a strategy to exit where OnBarClose is not true? If you look at bo x#4 reply, dated 05-08-2016, 08:19 PM, you will see Ninja representative Senior member koganam stating, "That is the default behavior of Strategies. Stops are executed when they are hit, not when a bar closes." So now back to my original question as stated in box #4: "My goal is to have a strategy work using Wizard to execute "On Bar Close", but then have a stop loss with a strategy that does not wait until the Bar is closed. Is there a way to use Wizard to execute a strategy that does wait for the bar to close before entering the trade, but does not wait for the bar to close as a stop loss?"

                      Comment


                        #12
                        Hello,
                        The reason it appears that the order is taking a bar to fill is because you are submitting your order at the end of the bar. You need to have a pending order before you are wanting to get out that which acts as your stop or run the strategy in CalculateOnBarClose set to false so it submits your ExitLong() order right away.
                        Cody B.NinjaTrader Customer Service

                        Comment


                          #13
                          Thanks Cody B, for your reply. I am sorry for not being more clear in my request. My goal is to have a strategy work using Wizard to execute "On Bar Close", but then have a stop with a strategy that does not wait until the Bar is closed. Is there a way to use Wizard to execute a strategy that does wait for the bar to close before entering the trade, but does not wait for the bar to close as a stop loss? Note: In the Wizard Condition builder, the entire strategy set is either OnBarClose true or false. I don't see where I have the choice of making each Set in the Condition Editor to choose on BarClose or not. Am I wrong?
                          Last edited by CactusMo; 05-10-2016, 05:29 PM.

                          Comment


                            #14
                            Originally posted by CactusMo View Post
                            Thanks Cody B, for your reply. I am sorry for not being more clear in my request. My goal is to have a strategy work using Wizard to execute "On Bar Close", but then have a stop with a strategy that does not wait until the Bar is closed. Is there a way to use Wizard to execute a strategy that does wait for the bar to close before entering the trade, but does not wait for the bar to close as a stop loss? Note: In the Wizard Condition builder, the entire strategy set is either OnBarClose true or false. I don't see where I have the choice of making each Set in the Condition Editor to choose on BarClose or not. Am I wrong?
                            Where are you executing this strategy that you claim is behaving in this manner? Live trading, Market Replay, Historical static chart, Strategy Analyzer, where?

                            Comment


                              #15
                              This is live trading. You can see the image of my trade in my communication box #9 where I attached two images showing the trade execution. Trying to set my strategy to enter with BarOnClose True, but Exit with BarOnClose False. Don't seem to be able to make that work.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by algospoke, 04-17-2024, 06:40 PM
                              3 responses
                              26 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by bmartz, 03-12-2024, 06:12 AM
                              3 responses
                              29 views
                              0 likes
                              Last Post NinjaTrader_Zachary  
                              Started by Aviram Y, Today, 05:29 AM
                              2 responses
                              9 views
                              0 likes
                              Last Post Aviram Y  
                              Started by gentlebenthebear, Today, 01:30 AM
                              1 response
                              8 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by cls71, Today, 04:45 AM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X