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

SetParabolicStop() at a different timeframe/data series

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

    SetParabolicStop() at a different timeframe/data series

    Is there any workaround the syntax?


    Can I set SetParabolicStop() at a different timeframe/data series?
    SetParabolicStop(BarsArray[2], 0.02, 0.2, 0.02)[0];

    like that of Parabolic SAR?


    #2
    Hello johnnybegoode,

    Thanks for your post.

    In the Help guide link you referenced, the relative note would be, "Should you have multiple Bars objects of the same instrument while using SetParabolicStop() in your strategy, you should only submit orders for this instrument to the first Bars context of that instrument. This is to ensure your order logic is processed correctly and any necessary order amendments are done properly."

    So for the multiple time frame, no it would have to be the first data series (typically chart bars).

    The same note can be found in all of the Set methods.

    You could create your own Parabolic stop that operates of the time frame you choose and you can submit your exit order to the same "BarsInprogress" as the entry order. For an example of a multi-timeframe strategy entry/exit, please see https://ninjatrader.com/support/help..._frame_and.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello johnnybegoode,

      Thanks for your post.

      In the Help guide link you referenced, the relative note would be, "Should you have multiple Bars objects of the same instrument while using SetParabolicStop() in your strategy, you should only submit orders for this instrument to the first Bars context of that instrument. This is to ensure your order logic is processed correctly and any necessary order amendments are done properly."

      So for the multiple time frame, no it would have to be the first data series (typically chart bars).

      The same note can be found in all of the Set methods.

      You could create your own Parabolic stop that operates of the time frame you choose and you can submit your exit order to the same "BarsInprogress" as the entry order. For an example of a multi-timeframe strategy entry/exit, please see https://ninjatrader.com/support/help..._frame_and.htm
      It´s possible to use this sintax? to operate with parabolic stop in a non primary series?

      protected override void OnBarUpdate()
      {
      if (BarsInProgress == 1)
      {
      SetParabolicStop("long", CalculationMode.Ticks, 10, true, 0.2, 0.02, 0.2);
      }

      Comment


        #4
        Hello memonic,

        Thanks for your post.

        If the data of BarsInprogress 1 met the requirements of "you should only submit orders for this instrument to the first Bars context of that instrument.". then yes.

        If the data BarsInProgress 1 is a different time frame from the chart bars and of the same instrument, then no.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_PaulH View Post
          Hello memonic,

          Thanks for your post.

          If the data of BarsInprogress 1 met the requirements of "you should only submit orders for this instrument to the first Bars context of that instrument.". then yes.

          If the data BarsInProgress 1 is a different time frame from the chart bars and of the same instrument, then no.
          yes, is different time frame.
          is there any way to submit a parabolic stop with non primary dataseries?
          regards

          Comment


            #6
            Hello memonic,

            Thanks for your reply.

            Yes, you would have to create your own stop by checking the value of current price to the value of the parabolic stop on the higher time frame and then simply use an exit order such as ExitLong() or ExitShort() when the current price reaches the parabolic stop value. I would recommend using the strategy run with Calculate.OnEachTick or Calculate.OnPriceChange in order to get a responsive stop as otherwise if you wait for bar close the exit level may be more than you wish. You could test each of these and see what works best for you.
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Aviram Y, Today, 05:29 AM
            0 responses
            1 view
            0 likes
            Last Post Aviram Y  
            Started by quantismo, 04-17-2024, 05:13 PM
            3 responses
            25 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by ScottWalsh, 04-16-2024, 04:29 PM
            7 responses
            34 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by cls71, Today, 04:45 AM
            0 responses
            6 views
            0 likes
            Last Post cls71
            by cls71
             
            Started by mjairg, 07-20-2023, 11:57 PM
            3 responses
            216 views
            1 like
            Last Post PaulMohn  
            Working...
            X