Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Product of SetProfitTarget

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

    Product of SetProfitTarget

    Will you look at the following image:https://www.screencast.com/t/h3c0NGzZ The three entries for USD/CHF are a product of the SetProfitTarget("Sell short #1", CalculationMode.Pips, (-Target1Pips)); The Order to Enter was at 0.96263 and the SetProfit was placed at 0.96413 which was 15 pips below the entry and was absolutely correct but it was rejected and was followed by another entry at 0.96284 which came with an error message that said 'cannot be higher than entry. i do not understand the correct entry being rejected and then being followed with an additional entry..

    #2
    Hello galsermil,

    If you got the error that the order was on the wrong side of the market it is possible that after the entry filled and the target was then submitted, the price had moved and the price for that target was invalid. The price difference between the entry and the target is very small so that is one possibility this something that you keep seeing happen or can re create with playback?



    Comment


      #3
      Jesse, if you look at the sequence of the orders, you will see that the correct entry is available for a correct target which is made available and rejected.the message with the rejection i
      https://www.screencast.com/t/e8WsYwQ5 The next entry is as you say and price has moved outside the entry price. The message is : https://www.screencast.com/t/KE7tu2Kdc My question is why are there two attempts at a 'Profit Target' and what is cancelling the first one. ;

      Comment


        #4
        Hello galsermil,

        I was not commenting on the sequence of the orders but that the price which is calculated for the target, it is not valid at that time. The entry price could be valid and then the target could be invalid if you are using a very tight offset, that all depends on the active market and when the target is submitted. The error you are posting only comes up if the price used for the order is not correct based on the side of the market it should be on. In this case your limit price was above the ask and it instead needs to be below the ask to be valid.


        I would not be able to say why there may have been two attempts on a target, the first was not cancelled but was rejected, that is noted in the "State" column of your first image.



        Comment


          #5
          For whatever reason, I could not get four <SetProfitTargets. to work but it worked just fine when I figured out how to reduce the number to two but for my purposes, that would not work either as on closing the second trade, I need to close both entries and therefore I used <SetProfitTarget> to set the target for the first trade but I have gone to <ExitLong/ShortLimit> to set the target for the second trade. I have a question as to how to convert from a Currency offset but I have started a new ticket to deal with that.. Thanks for you help.

          Comment

          Latest Posts

          Collapse

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