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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    75 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    154 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    101 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    289 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X