Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

multiple entry/exit signals on different DataSeries

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

    multiple entry/exit signals on different DataSeries

    Hello,

    I have a question on the provided sample code Strategy: Using multiple entry/exit signals simultaneously

    The sample places orders from a 15 min timeframe (BarsInProgress == 2) but the order seems to be placed on the Primary timeframe (BarsInProgress == 0) using the following order
    Code:
    [FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]
     EnterLong(0, 1, [/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515][FONT=Consolas][SIZE=2][COLOR=#a31515]"Enter Long from 15min"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2]);
     [/SIZE][/FONT][/SIZE][/FONT]
    Wouldn't this essentially only send the order on the next closing bar of Primary DataSeries? Can the order be executed on BIP = 2 which would execute the order on the very next tick?

    Additionally the exit logic is generated from the 5 minute timeframe (BarsInProgress == 1) and again places the order on the Primary timeframe. Again having to wait for a bar to close on the Primary DataSeries.

    Am I incorrect in my assessment here? And if so can the Entry and Exit orders be managed from their respective DataSeries and have the orders executed on the very next ticks?

    Thanks,

    #2
    Hello tornadoatc,

    Thanks for your post.

    I was unable to find the line of code in your reference, "Strategy: Using multiple entry/exit signals simultaneously" and suspect that the reference is really "Strategy: Entering on one time frame and exiting on another" (Link: http://ninjatrader.com/support/forum...ead.php?t=5787)

    The description of the example is, "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. "

    Your observation is correct, the entry order is placed on the charts base series and the order would be placed on the next bar close of that series (BIP = 0). Yes, the order could be placed on the 15 minute (BIP=2) series but the example is intended to show entering and exiting on different time frames (than the entry/exit logic). Keep in mind that BIP=0 could be a a faster time frame so the order would be placed sooner than the next close of a 15 minute bar.

    An important part to understand in the example is that the strategy is run with CalculateOnBarClose = true which means that BIP =1 ticks every 5 minutes and BIP=2 ticks every15 minutes.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X