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 NullPointStrategies, Today, 05:17 AM
            0 responses
            39 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            124 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            64 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            41 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