Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Correct approach for EnterLongStopMarket

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

    Correct approach for EnterLongStopMarket

    Using a minute bars.
    I place an Entry Stop one tick above the price high of the bar.
    Sometimes the bars gaps higher.and my next bar opens above the stop, then retrace and then continues higher.

    Because of it the order gets rejected and the strategy terminates.

    What's the correct approach to avoid the strategy to terminate prematurely leaving a stop entry one tick above the high.?
    I use Managed approach. Should I move to unmanaged or ATM or the result would be the same?

    And a major question: If I get an order Rejection or Unable to change order and I'll be able to catch the error with OnOrderUpdate() what is the correct way to handle it so the strategy won't terminate prematurely? One has to move to unmanaged approach for it?


    On a separate note, setting Calculate On each tick, is it exactly equivalent to use a one tick bar chart ?
    Thank you
    Gio
    Last edited by giogio1; 11-22-2024, 06:40 AM.

    #2
    Hello giogio1,

    You would need to add a condition to check if the price you calculate for the order is on the wrong side of the market, if so you could do anything like submit a market order or recalculate a new price.

    To handle rejections you need to turn off rejection handling.



    Using a 1 tick chart would be the equivalent of using on each tick, OnBarClose is called for each tick in both cases.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    79 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X