Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How place a entry price below current price

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

    How place a entry price below current price

    Hello NT8 support,

    I'd like to place an entry order at a specific price given a set of conditions. But I am having trouble doing so. Example:

    IF (Conditions on bar close)

    {
    EnterLongLimit(Convert.ToInt32(DefaultQuantity), (Close[0] - 3), "");
    }

    The above is meant to place a long entry order 12 ticks (3 points) below the close price at the time of the conditions. However, what happens when I test this is that the limit moves to be 12 ticks below the current price as it moves, so the limit never gets touched. I can confirm that the condition is not happening every bar. How can I make it so that the limit stays in place so that when it is touched by the price, there is an entry. thank you!

    #2
    Hello Austiner87, thanks for writing in.

    The best way to see if the condition is being reached would be to use a Print statement within the condition e.g.

    IF (Conditions on bar close)
    {
    Print("Condition Hit");
    EnterLongLimit(Convert.ToInt32(DefaultQuantity), (Close[0] - 3), "");
    }

    If the order keeps getting updated, it means EnterLongLimit is being hit. If you can confirm the condition is being hit multiple times, you would need to either save the price level the order is submitted at and re-use that price every bar the order should be active (in the managed approach, resting orders are canceled on every bar unless they are resubmitted) or adjust your condition so that it does not get hit when not needed and use the special overload for EnterLongLimit to prevent the order from canceling at the end of every bar:

    EnterLongLimit(int barsInProgressIndex, bool isLiveUntilCancelled, int quantity, double limitPrice, string signalName) //set isLiveUntilCancelled to true to keep the order alive.


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    46 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    66 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X