Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print stop loss and profit target.

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

    Print stop loss and profit target.

    Hi.
    My strategy when working with TWS do not print stop loss and profitt target on chart when stop loss or profit target is filled. This stop loss or profit target appear on chart when I reload the strategy. Buy and sell order are printed Ok.
    Same strategy if working with NT simulator acc print stop loss and profit target on chart, no problem. What colud be possible reason of this?
    Rgds
    Czarek

    #2
    I will check my problem carrefully and I see that olny stop loss order are not printed. Trarget limit, buy to cover enter orders are OK. Only stop are not shown on chart. I use simple strategy made by strategy wizard.
    This is stop loss code:
    protected override void Initialize()
    {

    SetStopLoss("", CalculationMode.Ticks, Stop1, false);
    SetProfitTarget("", CalculationMode.Ticks, Limit1);
    CalculateOnBarClose = true;
    }

    What colud be the possible reason for it?

    Comment


      #3
      Please enable "TraceOrders = true" in the Initialize() method, then inspect the output in the Output window to get an idea why this method may be ignored.
      RayNinjaTrader Customer Service

      Comment


        #4
        Ray.
        I enabled "TraceOrders = true.
        If I set stop and profit as show in former message
        stop loss orders are placed or filled there is nothing shown in Output window but orders are placed and executed by TWS.
        Only enteries and update on bar close are shown:
        2008-8-20 8:41:00 Entered internal PlaceOrder() method at 2008-8-20 8:41:00: Action=Buy OrderType=Market Quantity=25,000 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''

        If I stop loss and profit to each entry. Output window shows:
        2008-8-20 9:16:00 Entered internal PlaceOrder() method at 2008-8-20 9:16:00: Action=SellShort OrderType=Market Quantity=25,000 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
        2008-8-20 9:16:00 Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Ticks Value=3 Currency=0 Simulated=False
        2008-8-20 9:16:00 Entered internal SetStopTarget() method: Type=Target FromEntrySignal='' Mode=Ticks Value=7 Currency=0 Simulated=False

        But in both cases only entry orders are printed. Do you have any idea about possiblem reason??
        Czarek

        Comment


          #5
          What instrument are you trading?
          RayNinjaTrader Customer Service

          Comment


            #6
            I've just test it right now with 3 instruments MHI, EuroDollar and NQ. EuroDollar, MHI - both has same problem. The sample I send you before comes from Eurodollar.
            NQ working OK.

            Comment


              #7
              Can you see if you have the same problem on ZS (SoyBeans)? Also, this is a live account and NOT an NT internal sim account such as SIM101?
              RayNinjaTrader Customer Service

              Comment


                #8
                Ray.
                I have tested 4 instruments NQ,MHI, EURUSD ans ZS with TWS connection.
                With Sim101 all of them print all orders on chart, no problem.
                With real account only NQ working properly.
                MHI, EURUSD and ZS print only entry ordres (Buy, Sell, ). StopLoss and ProfitTaget are not printed during strategy working. All orders apprared when I reload strategy.
                Do you have idea of possbile reason??
                Czarek

                Comment


                  #9
                  This is a bug which will be fixed with next update (2-3 weeks from now).

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  560 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  325 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  547 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  547 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X