Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

remove stoploss

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

    remove stoploss

    Hello,

    for unknown reasons I can not move my stoploss with my dataprovider/broker here in Europe (no matter who is, just as information why I do this strange question).

    How can I please (instead of changing/modification a stoploss) bringing in my trade eg a new stoploss at breakeven and I remove the initial stoploss.

    I do not know how I can REMOVE a stoploss, sorry.

    Thanks
    Tony

    #2
    Hello tonynt,
    Thanks for your note.

    To assists you further may I know:
    • Who your connectivity provider / broker is.
    • Are you submitting the order live or in Sim101 account
    • Are you submitting the stops via a NinjaScript code or via an Atm template or submitting it manually.
    • And to clarify further are you trying to cancel the stop order first and then submit a new stop order


    I look forward to assisting you further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. I do submitting the order and stops within NT-script-strategy.

      Please, I only want to know how I can remove an existing stoploss. I need to do so as the broker/dataprovider does not accept price modification of stoploss - there are some problems maybe - so I want to solve this by bringing in a new stoploss and removing the "older" stoploss for not having 2 stops because once price is changing then I might have a position in other direction instead of flat.

      Thanks
      Tony


      Originally posted by NinjaTrader_Joydeep View Post
      Hello tonynt,
      Thanks for your note.

      To assists you further may I know:
      • Who your connectivity provider / broker is.
      • Are you submitting the order live or in Sim101 account
      • Are you submitting the stops via a NinjaScript code or via an Atm template or submitting it manually.
      • And to clarify further are you trying to cancel the stop order first and then submit a new stop order


      I look forward to assisting you further.

      Comment


        #4
        Hello Tony,
        Thanks for the clarification.

        It depends of how you submit the stop order.

        If you submit the stop orders via the Set() method then unfortunatley you cannot cancel it.

        However if you submit the stop order via the Exit() methods (like ExitLongStop) then you can cancel it using the CancelOrder() method, and assigning an IOrder object while submitting the stop order.

        For example:
        Code:
        //in variable
        IOrder stopOrd = null;
        
        //in OnBarUpdate
        if (condition)   //submit stop order
        {
            //submit stop order
           stopOrd = ExitLongStop(....);
        }
        
        if (condition)     //cancel stop order
        {
            if (stopOrd != null)CancelOrder(stopOrd);
        }


        Please refer to this sample code which further describes the CancelOrder method
        When using NinjaTrader's Enter() and Exit() methods, the default behavior is to automatically expire them at the end of a bar unless they are resubmitted to keep them alive. Sometimes you may want more flexibility in this behavior and wish to submit orders as live-until-cancelled. When orders are submitted as live-until
        Last edited by NinjaTrader_Joydeep; 11-14-2012, 06:59 AM.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Thank you,

          * is the ExitLongStop sent like setstoploss to brokers server, or does it only work on my Computer with NinjaTrader?

          * is it more CPU-intensive to work with IOrder than setstoploss?

          Thanks
          Tony

          Originally posted by NinjaTrader_Joydeep View Post
          Hello Tony,
          Thanks for the clarification.

          It depends of how you submit the stop order.

          If you submit the stop orders via the Set() method then unfortunatley you cannot cancel it.

          However if you submit the stop order via the Exit() methods (like ExitLongStop) then you can cancel it using the CancelOrder() method, and assigning an IOrder object while submitting the stop order.

          For example:
          Code:
          //in variable
          IOrder stopOrd = null;
          
          //in OnBarUpdate
          if (condition)   //submit stop order
          {
              //submit stop order
             stopOrd = ExitLongStop(....);
          }
          
          if (condition)     //cancel stop order
          {
              if (stopOrd != null)CancelOrder(stopOrd);
          }
          http://www.ninjatrader.com/support/h...ancelorder.htm

          Please refer to this sample code which further describes the CancelOrder method
          http://ninjatrader.com/support/forum...ad.php?t=18890

          Comment


            #6
            Hello Tony,
            If the order is in working or accepted state then the order will be at the brokers end or at the exchange.

            It depends on how complex your coding logic is. Otherwise the Set() method and the Exit() methods does the same thing (places stop/target orders).
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              Hello,

              thank you for your reply.

              What do you mean with "Otherwise..... does the same thing" You told me how to do with Iorder for having the same thing as setstoploss, no? so it should be the same thing

              But what I do not read and not between the lines - is referring to my question if IOrder is more CPU intensive than setstoploss or - if you want - setstoploss is more CPU intensive than working with Iorder for having a setstoploss.

              This is important as I had recently had already some error messages to shut down NinjaTrader because "out of memory....." and like this (do you think 20 charts and 30 strategies (each about 900 lines - because of customized buttons, as I "rebuilt" me buttons in the toolbar working like NT-charttrader but within my strategies to have it in one chart - is to much for a non-rocket-science-computer?)

              THANK YOU!

              Best
              Tony

              Originally posted by NinjaTrader_Joydeep View Post
              Hello Tony,
              If the order is in working or accepted state then the order will be at the brokers end or at the exchange.

              It depends on how complex your coding logic is. Otherwise the Set() method and the Exit() methods does the same thing (places stop/target orders).
              Last edited by tonynt; 11-14-2012, 01:09 PM. Reason: typing error

              Comment


                #8
                Hello Tony,
                By, "does the same thing" I mean both method submits an order at the end of the day.

                Now the difference lies that a Set() method can be simplistic (given you can simply append a one line code and the stops would be placed). For exit orders you have to custom code your own logic (true for Set() orders too, if you want to change the orders etc).

                30 strategies, 20 charts can be taxing, depending on what your PC configuration is, what your OS is (32 bit or 64 bit), are you running the strategies with Calculate on bar close set to true or false etc.

                You may refer to our performacen tips from our help guide.
                JoydeepNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by tonynt View Post
                  ...This is important as I had recently had already some error messages to shut down NinjaTrader because "out of memory....." and like this (do you think 20 charts and 30 strategies (each about 900 lines - because of customized buttons, as I "rebuilt" me buttons in the toolbar working like NT-charttrader but within my strategies to have it in one chart - is to much for a non-rocket-science-computer?)

                  THANK YOU!

                  Best
                  Tony
                  "Out of memory" errors will usually point to code problems that are causing a memory leak. Are you properly disposing of objects that you are calling repeatedly, by creating new instances? Can you call such objects as named objects instead? (Look at the things that you create with the new keyword.)

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Haiasi, Today, 06:53 PM
                  1 response
                  4 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by ScottWalsh, Today, 06:52 PM
                  1 response
                  11 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by ScottW, Today, 06:09 PM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by ftsc2022, 10-25-2022, 12:03 PM
                  5 responses
                  256 views
                  0 likes
                  Last Post KeyonMatthews  
                  Started by Board game geek, 10-29-2023, 12:00 PM
                  14 responses
                  244 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Working...
                  X