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 cmoran13, Yesterday, 01:02 PM
            0 responses
            30 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            22 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            160 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            95 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            148 views
            2 likes
            Last Post CaptainJack  
            Working...
            X