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