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

Exit order logic on tick, primary series at 5 min

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

    Exit order logic on tick, primary series at 5 min

    I'm running some strategies right now on 5 min bars, and I'd like to use low time frame tick/seconds for exit logic. Is it possible to calculate all charts and most logic at 5min as primary and run higher granularity for exit orders or will orders automatically submit to primary series?

    #2
    Hello Skifree,

    Thank you for your post.

    It is possible to specify what series you would like to submit your orders to by specifying the barsInProgressIndex.

    For example, using ExitLong():

    ExitLong(int barsInProgressIndex, int quantity, string signalName, string fromEntrySignal)



    We also have a sample script demonstrating submitting orders to a secondary bar object:



    Please let us know if you have any further questions.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      I'm having trouble making the work. I've found a good strategy, which uses 5 min bars and 5 min RSI, but the losses are larger than I intend, so the path to take is to have a high granularity primary (15 second) to submit orders to and from. This seems to work, but how would I backtest using the 5min RSI? When I try to use a secondary 5min dataseries (basic but custom indicator using RSI), the chart always displays the calculations at the same series as primary. How would my main chart be series 1 (enter/exit functions) and rsi (entry conditions) be series 2 - or is this not possible with the product?

      Comment


        #4
        one note is that your feedback conflicts with other support feedback, like this https://forum.ninjatrader.com/forum/...ti-time-frames

        That suggests that only primary series can handle executions, not secondary?

        Comment


          #5
          Hello Skifree,

          If the strategy is not working as intended, you will need to debug using prints and TraceOrders.



          The primary series is the one the strategy is applied to (selected in the Strategy's properties). The secondary series or any additional series would be the ones added into your strategy via AddDataSeries().

          It is possible to submit orders to different bars objects. From the Help Guide:

          "You can submit orders to different bars objects. This allows you the flexibility of submitting orders to different timeframes. You can watch for trade conditions across different time frames and place orders on whichever one you want. This is useful for strategies that require more finesse in the exit than the entry. You can now enter trades on longer time frames and then monitor and exit your trade on a more granular time frame."

          Gaby V.NinjaTrader Customer Service

          Comment


            #6
            I eventually figured it out, it works well. I assume that orders submitted on one timeframe are eligible for a counter trade by another party on a different timeframe?

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by yertle, Today, 12:24 PM
            0 responses
            3 views
            0 likes
            Last Post yertle
            by yertle
             
            Started by reekotubbs, Yesterday, 01:09 PM
            3 responses
            27 views
            0 likes
            Last Post reekotubbs  
            Started by Blaze212, 07-07-2024, 08:58 PM
            2 responses
            20 views
            0 likes
            Last Post Blaze212  
            Started by medicmiked, Today, 11:56 AM
            0 responses
            2 views
            0 likes
            Last Post medicmiked  
            Started by miaolivi9, Today, 06:59 AM
            0 responses
            9 views
            0 likes
            Last Post miaolivi9  
            Working...
            X