Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetStopLoss problem

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

    #16
    Originally posted by NinjaTrader_Josh View Post
    Please add TraceOrders = true and copy paste the output from the Output Window when you feel it did not work. Thank you.
    10/8/2009 6:40:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Ticks Value=38 Currency=0 Simulated=False

    10/8/2009 6:40:00 PM Entered internal PlaceOrder() method at 10/8/2009 6:40:00 PM: Action=SellShort OrderType=Market Quantity=0.1M LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
    10/8/2009 6:40:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Ticks Value=0.00384613903327469 Currency=0 Simulated=False

    38 pips 10/8/2009 6:45:00 PM

    10/8/2009 6:45:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Ticks Value=38 Currency=0 Simulated=False

    Comment


      #17
      texasnomad,

      That 3rd line looks erroneous. You should not submit any tick value at 0.0038. Please check everywhere in your code and ensure that this value is never used.
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        Originally posted by NinjaTrader_Josh View Post
        texasnomad,

        That 3rd line looks erroneous. You should not submit any tick value at 0.0038. Please check everywhere in your code and ensure that this value is never used.
        I already did that. That's why the log file I posted prints 38 pips and not .0038 pips.

        Comment


          #19
          10/8/2009 6:40:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Ticks Value=0.00384613903327469 Currency=0 Simulated=False

          It is receiving the 0.0038 from somewhere as indicated by the TraceOrders output. Remember that Set() methods are applied to all orders following it. What I suggest you try is to cast the value to your int value in a new variable and call that new variable in the Set() method instead of giving it any opportunity to ever take on a decimal.
          Josh P.NinjaTrader Customer Service

          Comment


            #20
            It's fixed. There was a setstoploss function that i overlooked inside one of my functions.

            Thanks for your patience.

            Comment

            Latest Posts

            Collapse

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