Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access last entry price, limit number of trades

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

    Access last entry price, limit number of trades

    Hi,
    My system trades intraday. I would like to add 3 conditions:

    1. Trade only after 10 AM EST.
    2. Trade maximum 3 times in a session.
    3. On the second and third trade, enter only if the price is higher than the last trade that day.

    Can you please show me how to write those conditions?

    Thanks a lot.

    #2
    Hello GoGetIt,

    Thanks for the post.

    1. Trade only after 10 AM EST.
    This sample here can help with time filters in your strategy.

    2. Trade maximum 3 times in a session.
    You can use an int counter each time you make a trade and reset this counter at the start of each day using FirstBarOfSession. This sample can help reset values each day.

    3. On the second and third trade, enter only if the price is higher than the last trade that day.
    This involves more custom coding to keep track of the values you want. If you want to get the fill price of orders, will need to work with advanced handlers, and expose values with IExecution interface.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    61 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    40 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    21 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    23 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    51 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X