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 CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          45 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          136 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          190 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          100 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          141 views
          0 likes
          Last Post cmoran13  
          Working...
          X