Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetStopLoss and SetProfitTarget for multiple instruments

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

    SetStopLoss and SetProfitTarget for multiple instruments

    Can you tell me if the SetProfitTarget and SetStopLoss methods are set up to work in strategies which trade multiple instruments?

    I am trading several currencies in one strategy and when certain conditions are met, I call these methods and then submit a market order.

    Will NT7 manage the stop and target properly for that instrument, and allow me to go on and call the methods again for the other instruments in the strategy?

    Or do these methods only work for the primary instrument?

    Thanks

    #2
    Hello Adamus,

    Yes, you can use Set statements in a multiinstrument strategy. NinjaTrader will submit stop loss and target orders according to the last values used for these statements. They will apply to either all entries or specific entries, depending on whether you specified an entry in fromEntrySignal.

    SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool simulated)
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Yes but once I have submitted the stop loss and target at one price for one instrument, e.g. 1.5400 and 1.5900, and the position and orders are live, I then go on to the next instrument.

      Assume I don't use a fromEntrySignal, but I set the stop loss and target again, this time to 0.8900 and 0.8950 and I put on a position for the next instrument, will that affect the stop loss and target orders on the previous instrument?

      Comment


        #4
        Yes, it will use the last value submitted and apply to other instruments if you're not using fromEntrySignal. If you're using calculation mode percent or ticks, then it submits these orders in relation to the entry price.

        If you're using mode price, then you would definitely want separate statements for each instrument. They can be applied to distinct entries only through fromEntrySignal used, so doing this will help you apply the values only to the instrument you want.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Finally managed to get my strategy working, with 21 forex pairs and using the fromEntrySignal label for with SetStopLoss and SetProfitTarget is working nicely in backtesting. Thanks for the help.

          Comment


            #6
            Thanks for the follow up, adamus.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Started by alifarahani, Today, 09:40 AM
            6 responses
            41 views
            0 likes
            Last Post alifarahani  
            Started by Waxavi, Today, 02:10 AM
            1 response
            21 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X