Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stopmarket order not being created

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

    Stopmarket order not being created

    I am trying to create TP and Stopmarket order for my order. The TP order is being placed but the stopmarket order is not. Could someone help me with this?

    Code:
    EnterLongStopLimit(NumberOfContracts, limitPrice, stopPrice, "LongOrder");
    SetProfitTarget("LongOrder", CalculationMode.Price, tpPrice);
    ExitLongStopMarket(_indicatorCandleLowForLong, "LongOrder");

    #2
    I changed it to use SetStopLoss and it is working now. Not sure how the two are handled differently, but can close this topic thank you

    Comment


      #3
      Hello sofortune,

      The reason for that is because you were submitting a ExitLongStopMarket instead of calling one of the Set methods, ExitLongStopMarket expects that you are already in a position which was entered using the entry name specified, when submitting the entry it is not yet in a position so that exit method is ignored. The set methods just set an internal note that targets should submit once the entry fills, those orders are not submitted at the same time that you submit the entry, they wait for the fill before submitting.

      Comment


        #4
        Thanks that makes sense now

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        50 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
        69 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