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 judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    59 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    21 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    10 views
    0 likes
    Last Post cre8able  
    Working...
    X