Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to change order with no native error

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

    #16

    Hi,

    Thanks for the reply. Can you please update the file and send me as I have tried that as well and it doesn't work.

    I have printed the prices on the console too and band upper price is above the market price.

    Bid Price 21877.25

    Band Upper price 21882.3570079829

    This is for the NQ futrures

    if (pos.MarketPosition == MarketPosition.Long)
    {

    Print(GetCurrentBid() + " " + band.Upper[0]);
    AtmStrategyChangeStopTarget(0, band.Upper[0], "TARGET1", atmStrategyId);
    //AtmStrategyChangeStopTarget(0, band.Lower[0], "Target1", atmStrategyId);

    }
    else
    {

    Print(GetCurrentBid() + " " + band.Lower[0]);
    AtmStrategyChangeStopTarget(0, band.Lower[0], "TARGET1", atmStrategyId);
    //AtmStrategyChangeStopTarget(0, band.Upper[0], "Target1", atmStrategyId);
    }​

    Attached Files

    Comment


      #17
      Hello azh_ali,

      As long as the price being used is a valid price that should allow you to change the target price using that method.

      Comment


        #18
        It doesnt do that. Can you confirm if you it works for you?
        I have attached a screenshot and hardcoded the price which is above the current price.

        Click image for larger version  Name:	image.png Views:	0 Size:	509.1 KB ID:	1332270
        Please run the atm and see its not working. However, stop works fine

        Comment


          #19
          I figured it out.

          FOr targets
          AtmStrategyChangeStopTarget(newPrice, 0, "TARGET1", atmStrategyId);

          For stops

          AtmStrategyChangeStopTarget(0, stopPrice, "STOP1", atmStrategyId);

          I was sending values in the second parameter for both the cases.

          thx for looking​

          Comment

          Latest Posts

          Collapse

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