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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    128 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    117 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X