Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

trouble with spot losses

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

    trouble with spot losses

    Dear friends.
    I have set up. Stop loss and teke profit
    SetStopLoss(400);
    SetProfitTarget(1500);

    But size of stop loss changing in high range, from 300 usd to 2000. How can I fix this?

    #2
    I have attached list of my trades
    Attached Files

    Comment


      #3
      daglas, what timeframe / chart are those trades placed on? Are those backtested results you run through?

      Comment


        #4
        it's 15-20 pips range bars. It's not back test, it's live trading on demo account.

        Comment


          #5
          Thanks, did you set those stop losses to be simulated in code, so NT would wait until price triggered the stop and then send a market order?

          Comment


            #6
            how can I do such settings? to simulate stop losses in code.

            Comment


              #7
              You would set the simulated parameter to 'true' in the SetStopLoss() call.

              Comment


                #8
                Originally posted by NinjaTrader_Bertrand View Post
                You would set the simulated parameter to 'true' in the SetStopLoss() call.

                http://www.ninjatrader.com/support/h...etstoploss.htm
                Thanks I shall try this.
                I have modify my strategy. And collecting results of trading. Also I want to ask you about take profit size. It has different size in trades to. How I can fix size of take profit?
                As I see it has not simulation mode.

                Comment


                  #9
                  Hello,

                  Just to make sure we are on the same page to you mean by size the order QTY is different or the distance from the entry price to the stop loss/ profit target price is different?

                  -Brett
                  BrettNinjaTrader Product Management

                  Comment


                    #10
                    Originally posted by NinjaTrader_Brett View Post
                    Hello,

                    Just to make sure we are on the same page to you mean by size the order QTY is different or the distance from the entry price to the stop loss/ profit target price is different?

                    -Brett
                    I have set take profit in currency. QTY of trades are different, but take profit is differ too.
                    I have set up take profit at 1500 dollars, and I have take profits for trades from 30-500 usd.
                    Please check previously attached file with trades list.

                    Comment


                      #11
                      What size would you like the take profit to be? Can you please post a snippet of the code you are using for your profit?
                      MatthewNinjaTrader Product Management

                      Comment


                        #12
                        protected override void Initialize()
                        {
                        CalculateOnBarClose = true;
                        SetStopLoss(400,true);
                        SetProfitTarget(1500);

                        }

                        Comment


                          #13
                          When using SetProfitTarget, the qty will be based off the position size.

                          If you wanted to specify the qty, you would need to use a limit order with ExitLongLimit or ExitShortLimit:

                          MatthewNinjaTrader Product Management

                          Comment


                            #14
                            Originally posted by NinjaTrader_Matthew View Post
                            When using SetProfitTarget, the qty will be based off the position size.

                            If you wanted to specify the qty, you would need to use a limit order with ExitLongLimit or ExitShortLimit:

                            http://www.ninjatrader.com/support/h...tlonglimit.htm
                            Thanks. I shall try using fixed lot size (1 contract). And I shall check take profit size.

                            Comment


                              #15
                              I have troubles with stop loses and take profits.
                              I have attached list of my trades. Some times take profits and stop loses did not work.
                              I have create a code for closing positions with market orders. But this code did not work at some time frame. I shall post this code next time.
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

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