Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SL and PT did not place

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

    SL and PT did not place

    Hello,
    I am running automated strategy and i faced problem, that sl and pt orders were not placed when limit order was filled. how is this possible? Luckily i came to computer and closed position manually, but if i was not price could run away from sl... is there a way how this could be handled properly? how to find out that sl or pt were not properly "placed" after entry limit price was filled.

    #2
    Hello kujista,

    In this situation we would need more detail on what you were doing in code to better understand what could have happened. How are you submitting the targets and what code was being used when this happened?

    Comment


      #3
      3 actions were made:

      1. SetStopLoss(tradeItem.EntryName, CalculationMode.Price, tradeItem.StopLoss_Price, false);
      ​2. SetProfitTarget(tradeItem.EntryName, CalculationMode.Price, tradeItem.ProfitTarget_Price);
      ​3. t.Order = EnterLongLimit(timeFrameTicks, true, t.Contracts, t.EntryPrice, t.EntryName);

      These were commands which place order... nothing significant was called.

      Comment


        #4
        Hello kujista,

        In the code you provided two different variables are being used as the entry name, are you certain that the entry name was specified correctly for the targets?

        1. SetStopLoss(tradeItem.EntryName, CalculationMode.Price, tradeItem.StopLoss_Price, false);
        ​2. SetProfitTarget(tradeItem.EntryName, CalculationMode.Price, tradeItem.ProfitTarget_Price);
        ​3. t.Order = EnterLongLimit(timeFrameTicks, true, t.Contracts, t.EntryPrice, t.EntryName);​

        Comment


          #5
          Yes definitiely... This code works in 99%... this happend twice, i suggest some connection problem or something...

          Comment


            #6
            Hello kujista,

            You will likely need to enable traceorders and monitor for the next time this happens to see if the orders are being ignored for some reason. If the orders were not submitted at all that would generally be due to an incorrect signal name being used or the targets are being called at an incorrect time. The Set methods need to be called right before the entry order just like the 3 lines of code you provided, if you have the Set methods being called in a different part of your logic or outside the entry condition its possible that could relate to the problem. The Set methods should be part of the entry condition.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            88 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            134 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
            67 views
            0 likes
            Last Post PaulMohn  
            Working...
            X