Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to set ATR as stop loss?

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

    how to set ATR as stop loss?

    Hi,

    I'm trying to set my stop loss and profit target using ATR, but when going thru the wizard I only see Mode=Percent/Price/Ticks.

    Can someone help with the setting them as follows:

    1. stop loss 2 ATR ( That's My risk).
    2. take profit 6 ATR

    Thanks.

    #2
    Hello john_robertson00,

    Thank you for your post.

    I have created a video detailing how to set this up in the Strategy Wizard, you may view this video at the following link: http://screencast.com/t/ZxPsnlm6uC

    Please let me know if I may be of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello john_robertson00,

      Thank you for your post.

      I have created a video detailing how to set this up in the Strategy Wizard, you may view this video at the following link: http://screencast.com/t/ZxPsnlm6uC

      Please let me know if I may be of further assistance.
      Hi Patrick:

      I would like to develop a strategy to enter long when SMA-5 cross over SMA-13 and vive versa for short.
      Also, I would like to set a trailing stop loss for the above trades along the ATR TRAILING STOP indicator line.
      Appreciate your help in preparing a video as above.
      Thank you in advance.
      Regards,

      Raj

      Comment


        #4
        Hello Raj,

        Thank you for your post.

        I have created a video for your request at the following link: http://screencast.com/t/rvAAVHgcZ

        Please let me know if you have any questions.

        Comment


          #5
          Thank you very much for the video Patrick. A Visual showing is always great.
          Appreciate it.

          Comment


            #6
            Moving stop loss in automatic

            example I want to go short at 1.2780 with a stop loss at 1.2790

            the
            price moves to 1.2770 immediately.

            so I want my stop will
            automatically move to the 1.2780 price on the price entry

            by strategy automatic Wizard not script


            CAN HELP ME??

            Comment


              #7
              Hello d-a-n-y87,

              Thank you for your post and welcome to the NinjaTrader Support Forum!

              I have created a video on your inquiry, you may view this video at the following link: http://screencast.com/t/Df62IvO1n

              Please see our Help Guide articles on How to use the Strategy Wizard as well as NinjaScript Strategies. More information on these subjects can be found below:
              I'm also proving a link to a recently recorded 'Automated Strategy Development Webinar' video for you to view at your own convenience: Automated Strategy Development Level 1 - NinjaTrader Training - 3/26/2013

              There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under Tools--> Edit NinjaScript--> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)

              We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:
              These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

              Lastly, you can attend one of our live Automated Strategy Development Webinars to help you get up to speed on developing strategies:


              We also have Premium Paid Educational events where you will join a NinjaScript expert for a pair of 6-8 hour long intensive courses designed to provide you with in-depth training on how to create, test and deploy fully automated strategies.



              If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
              Click here for a list of certified NinjaScript Consultants

              Comment


                #8
                Re patrick

                thanks for the reply, but I meant another setting,

                for example if the price reaches +10 tick gain after an hour of time just at that moment I want you to stop moving.

                with the trailing stop this would not happen.

                Comment


                  #9
                  Hello d-a-n-y87,

                  Thank you for your response.

                  Adjusting the Stop Loss to a new value and then stopping it after a certain condition is not possible in the Strategy Wizard.

                  However, you can hard code such conditions in NinjaScript directly. For a reference sample on monitoring Stop Loss and Profit Targets please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=5790

                  Please let me know if you have any questions.
                  Last edited by NinjaTrader_PatrickH; 05-08-2013, 12:30 PM.

                  Comment


                    #10
                    could you make a video of how you should do to solve the problem, because I'm Italian and I do not understand the solution you sent me

                    Comment


                      #11
                      Hello ,

                      Thank you for your response.

                      I would not be able to detail this in a short video, but I have provided an example of adjusting the Stop Loss based on your conditions below:
                      Code:
                              #region Variables
                      		private bool enter = true;
                      		private int enterTime = 0;
                      		private int sinceEntry = 0;
                      		private double stopStop = 0;
                              #endregion
                      
                              protected override void Initialize()
                              {
                                  
                              }
                              protected override void OnBarUpdate()
                              {	
                      			//Only run on Real-Time Data
                      			if(Historical)
                      				return;
                      			
                      			//Only enter new position once
                      			if(enter)
                      			{
                      				EnterLong();
                      				enterTime = ToTime(Time[0]); //Track entry time
                      				enter = false; //No more entries
                      			}
                      			
                      			//Check if we are in a long position
                      			if(Position.MarketPosition == MarketPosition.Long)
                      			{
                      				sinceEntry = ToTime(Time[0]) - enterTime; //Difference between current time and entry time
                      				
                      				//Set the Stop Loss 1 tick behind current price if an hour has not passed since the entry
                      				if(sinceEntry < 6000)
                      				{
                      					SetStopLoss(CalculationMode.Ticks, 1);
                      					stopStop = Close[0] - (1 * TickSize);
                      				}
                      				
                      				//Stop updating Stop Loss after 10 ticks in profit and an hour has passed
                      				if(Close[0] >= Position.AvgPrice + (10 *TickSize) && sinceEntry >= 6000)
                      				{
                      					SetStopLoss(CalculationMode.Price, stopStop);
                      				}
                      			}
                              }
                      Please let me know if you have any questions.

                      Comment


                        #12
                        I'm sorry but I do not understand the script but only wizard

                        Comment


                          #13
                          Hello d-a-n-y87,

                          Thank you for your response.

                          Adjusting the Stop Loss to a new value and then stopping it after a certain condition is not possible in the Strategy Wizard.

                          Comment


                            #14
                            I can test the automatic strategy with market replay?

                            Comment


                              #15
                              Hi,

                              Yes, you can use market replay to run your strategies and test them just like it was a live market.
                              MatthewNinjaTrader Product Management

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by lightsun47, Today, 03:51 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post lightsun47  
                              Started by 00nevest, Today, 02:27 PM
                              1 response
                              10 views
                              0 likes
                              Last Post 00nevest  
                              Started by futtrader, 04-21-2024, 01:50 AM
                              4 responses
                              46 views
                              0 likes
                              Last Post futtrader  
                              Started by Option Whisperer, Today, 09:55 AM
                              1 response
                              14 views
                              0 likes
                              Last Post bltdavid  
                              Started by port119, Today, 02:43 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post port119
                              by port119
                               
                              Working...
                              X