Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simulated Stop Loss Market Orders for Automated Trading

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

    #16
    NinjaScript stop loss setting

    I have written a NinjaScript strategy to "calculate on bar close" and that upon certain conditions, a stop limit order is to be entered, but how do I also tell it that when that order is filled a stop loss must be entered which is equal to the high closing price 1 bar ago?

    Comment


      #17
      djdinut1, you can call SetStopLoss for this and designate the Close[1] price value to be used - http://www.ninjatrader-support.com/H...tStopLoss.html

      aljafp, sorry missed the code posted earlier.

      1. Please clarify with your broker what orders types are supported for the HSI - it could be StopMarket orders are not supported and thus synthetically simulated on PATS, an order type which we unfortunately do not support.

      2. Please clarify with your broker as per 1

      3. Unfortunately those synthetic orders types are not supported, thanks for the suggestion.
      BertrandNinjaTrader Customer Service

      Comment


        #18
        Originally posted by NinjaTrader_Bertrand View Post
        djdinut1, you can call SetStopLoss for this and designate the Close[1] price value to be used - http://www.ninjatrader-support.com/H...tStopLoss.html

        aljafp, sorry missed the code posted earlier.

        1. Please clarify with your broker what orders types are supported for the HSI - it could be StopMarket orders are not supported and thus synthetically simulated on PATS, an order type which we unfortunately do not support.

        2. Please clarify with your broker as per 1

        3. Unfortunately those synthetic orders types are not supported, thanks for the suggestion.
        hi, As i specified in post #10 of this thread.
        I am testing my codes with IB first.
        And i am getting this problem with IB which i am very surprise, since IB simulates StopMarket Orders for HSI and i am surprise Ninja cannot handle.

        I suspect its an issue with ATI interface, because i tested using a ninjascript strategy with IB , and StopMarket orders are send properly.
        So i believe problem lies with the ATI interface.


        As for supporting synthetic stop orders with Patsystems, according to openquant, they will just send the stop orders via Patsystems API.
        If the broker's implementation supports synthetic stop orders, it will just be send to the SyOMS server. So its transparent to them. So i am again surprise that Ninja cannot support.
        Last edited by aljafp; 02-12-2010, 05:16 PM.

        Comment


          #19
          Hello,

          I will have someone reply to you on Monday. Thank you for your patience.
          DenNinjaTrader Customer Service

          Comment


            #20
            aljafp, as noted the PATS synthetic ordertypes are unfortunately not supported by us - for your testing with IB, please send us your trace and log files via the Help > Mail to Support feature, this will give us better insight into your issue, thanks.
            BertrandNinjaTrader Customer Service

            Comment


              #21
              Originally posted by NinjaTrader_Bertrand View Post
              aljafp, as noted the PATS synthetic ordertypes are unfortunately not supported by us - for your testing with IB, please send us your trace and log files via the Help > Mail to Support feature, this will give us better insight into your issue, thanks.
              you guys REQUESTED code samples which i provided in posts #7 and #15 of this thread. Are you saying you guys managed to run the code samples with the same instrument and found nothing wrong ?

              Comment


                #22
                aljafp,

                Code was needed to see you are not just typing in incorrect code which happens very often. Logs and traces are needed to be able to analyze the scenario. After analyzing then we can see if it is a setup issue, an intrinsic issue as mentioned earlier by Bertrand and Jason, or some other issue. Please provide as requested. Thank you.
                Josh P.NinjaTrader Customer Service

                Comment


                  #23
                  I just saw this thread after i Googled 'poor fills' on the HSI. I am trialing a strategy from a third party and i assume i am the first to try through IB and NT on the HKFE's HSI. I am getting some wild fills on IB simulator. At times my market order gets filled 50 - 60 points away from the market..with catastrophic results..as one can imagine!

                  Is there a work around for this?

                  Obviously I cannot see the code...but the third party is an NT partner.

                  Cheers,



                  CanOz

                  Comment


                    #24
                    CanOz, do you trade on Sim101 here or the IB Paper account?
                    BertrandNinjaTrader Customer Service

                    Comment


                      #25
                      Both, but the trouble is with IB's paper trader for sure. Market replay, and the NT SIM is fine.

                      Comment


                        #26
                        Have you checked what slippage you would get with a regular market order on the Paper account if you trade manually and via TWS directly?
                        BertrandNinjaTrader Customer Service

                        Comment


                          #27
                          No i have not, but i will tomorrow. Thanks Bertrand.

                          Comment


                            #28
                            The market orders executed through Interactive Brokers TWS execute at market. Where anything executed through NT at market gets filled erratically. I have confirmed this today.

                            CanOz

                            Comment


                              #29
                              Thanks for the follow up and testing CanOz, could you please contact me via Help > Mail to Support so I could review your trace / logs files for the sequence of events seen when you were testing from NT?

                              Thanks,
                              BertrandNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by StrongLikeBull, Yesterday, 04:05 PM
                              1 response
                              12 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by Mestor, 03-10-2023, 01:50 AM
                              14 responses
                              375 views
                              0 likes
                              Last Post z.franck  
                              Started by molecool, 10-09-2017, 10:48 AM
                              5 responses
                              1,621 views
                              0 likes
                              Last Post trader-ap  
                              Started by The_Sec, Yesterday, 03:53 PM
                              1 response
                              12 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by mmenigma, Yesterday, 03:25 PM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Working...
                              X