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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    384 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    249 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    210 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    297 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    260 views
    0 likes
    Last Post CarlTrading  
    Working...
    X