• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

takeprofit and stopprofit

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

    takeprofit and stopprofit

    i ask a question

    it's possible to create strategy only for takeProfit and stopProfit?
    (not the complete trade into a single signal)


    (i would like make a strategy with signal entryposition and Stop loss.....and another with takeProfit and StopProfit)


    So in my chart i apply 2 strategy.....

    #2
    Hello turbofib,

    Thank you for your post.

    It is possible to create a strategy that would look for positions on the instrument and account and then submit orders based on the position.

    However, this requires the Unmanaged Order Approach and also requires and understanding that the strategy position will not be the account position and will likely always be different.

    For information on the Unmanaged Order Approach please visit the following link: http://ninjatrader.com/support/helpG...d_approach.htm

    You would also need to look into PositionAccount: http://ninjatrader.com/support/helpG...ionaccount.htm

    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      excuse me..but i don't understand..

      with Managed Order Approach it's possibile to do this :


      Strategy1:
      protected override void OnBarUpdate()

      if (Position.MarketPosition==MarketPosition.Flat)

      {
      if (signal ) EnterLong();
      if (signal2) EnterShort();
      }


      Strategy2:
      protected override void OnBarUpdate()

      if (Position.MarketPosition!=MarketPosition.Flat && SignalExit)

      {
      ExitLong();
      ExitShort();
      }
      It's possible to do this ?
      or i must to use Unmanaged Order Approach

      Comment


        #4
        Hello turbofib,

        Thank you for your response.

        It would not be possible to just use Exit methods as they only exit a position the strategy holds. If the position is manually entered then the strategy cannot exit that position with the exit methods.

        You can use the Unmanaged Order Approach to submit exit orders without concern on the position of the strategy.

        Please let me know if you have any questions.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_PatrickH View Post
          Hello turbofib,


          It would not be possible to just use Exit methods as they only exit a position the strategy holds. If the position is manually entered then the strategy cannot exit that position with the exit methods.
          in my strategy1 the position is entered manually?



          So if I have an exit strategy, which I use in all my trade,in managed Order Approach i always have to copy it to the original strategy, is that correct?

          Comment


            #6
            Originally posted by turbofib View Post
            in my strategy1 the position is entered manually?
            No this would be entered from the strategy. I did not understand you full use case, but now it makes sense.

            Originally posted by turbofib View Post
            So if I have an exit strategy, which I use in all my trade,in managed Order Approach i always have to copy it to the original strategy, is that correct?
            Your exit logic needs to be in the strategy. Unless you plan to develop one strategy to solely exit every strategy entry you make, which would still require what I mentioned on Unmanaged Order Approach.
            Patrick H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              No this would be entered from the strategy. I did not understand you full use case, but now it makes sense.


              Your exit logic needs to be in the strategy. Unless you plan to develop one strategy to solely exit every strategy entry you make, which would still require what I mentioned on Unmanaged Order Approach.
              another question....
              If i use Unmanaged Order Approach and i've 2 strategy ....how can i test it in strategy analyzer that accept only 1 strategy?

              Comment


                #8
                Hello turbofib,

                Thank you for your response.

                There is no means to have this concept backtested. You would need to implement the exit logic in the strategy itself rather than have it call another.

                Please let me know if you have any questions.
                Patrick H.NinjaTrader Customer Service

                Comment


                  #9
                  you mean :

                  StrategyEnter

                  {

                  use here StrategyExit;

                  }

                  i call strategy exit into strategyEntry ?


                  is correct?

                  Comment


                    #10
                    Hello turbofib,

                    Thank you for your response.

                    The exit logic would need to be in your entry strategy, yes. It should be placed logically in the code to ensure it can work to detect the open position of the strategy and exit appropriately. If you would like us to look into the code further to give you more details please attach the strategies to your response or send them over to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' in the subject line and a reference to this thread in the body of the email.

                    You can export your strategy by going to Tools > Export > NinjaScript Add On > Add > select your strategy > OK > Export > name the file 'NTsupport' > Save. The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript.
                    Patrick H.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Patrick

                      i send you a testing strategy (ProvaSignal and provaExit)

                      Can you combine it using 2 strategy ?...i don't understand how to do it

                      i want to use 2 strategy ... 1 strategy to generate signal long or short and another strategy to generate profit loss or profit target
                      I sent email in you address thanks you..

                      Comment


                        #12
                        Hello turbofib,

                        Thank you for your patience.

                        I have responded to you via email.
                        Patrick H.NinjaTrader Customer Service

                        Comment


                          #13
                          excuse me..
                          i seen you script....you don't understand what i want to do

                          i would to code strategy that call another strategy into code.. See #9 (using Unmanaged Approach)


                          Ok...i give you an example with Multichart..

                          https://gyazo.com/ab5f7482fbf1ebae56f7f8b82079e1e2

                          i want to do similar
                          Last edited by turbofib; 03-29-2017, 06:26 AM.

                          Comment


                            #14
                            Hello turbofib,

                            Thank you for your response.

                            I understand your inquiry, however my response may not be clear. There is no means to have a strategy for entry and a strategy for exit both backtested in the Strategy Analyzer. As I provided in my response in email, the two strategies need to become one just as the strategy I provided you.

                            NinjaTrader and other charting/analytical platforms may not function in the same way.

                            Please let me know if you have any questions.
                            Patrick H.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by D Trader, Yesterday, 09:43 AM
                            1 response
                            8 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by cassiano_sanches, 07-10-2020, 07:37 PM
                            1 response
                            14 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by terminatorT1000, 07-10-2020, 06:40 PM
                            2 responses
                            27 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by Giudiver, 07-10-2020, 04:29 PM
                            2 responses
                            16 views
                            0 likes
                            Last Post Giudiver  
                            Started by rtwave, Today, 04:11 PM
                            0 responses
                            4 views
                            0 likes
                            Last Post rtwave
                            by rtwave
                             
                            Working...
                            X