Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Stop loss Adjustement

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

    Stop loss Adjustement

    Hi,

    Trading Forex with always 2 targets but targets are not fixed (based on Fibonacci retracement).

    I would like to setup an ATM to move my stop to BE +2 pips when my first target is it (+2 pisp if I'm long, BE - 2 pips if I'm short).

    But since my targets are not a fixed amount of pips/ticks, haven't found a way to do it.

    Thanks for the help!

    #2
    Hello JourneyOfARookie,

    Thanks for writing in today, and welcome to our support forums!

    I have received your inquiry and I will submit a full response with instructions to set up this strategy.

    Our office is closing soon, so I will not be able to revisit this inquiry until tomorrow.

    Thanks in advance for your patience.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hello JourneyOfARookie,

      I have reviewed your strategy.

      If you require setting the your strategy's profit target to a price level from a Fibonacci Retracement drawing object, you will need to write your own script to access that drawing object. ATM strategies are not powerful enough to read from a drawing object.

      This can be done by drawing the Fibonacci Retracement object within your script and using its PriceLevel's to manage your profit target and your breakeven point.

      Extracting the PriceLevel from a Fibonacci Retracement tool may look like the following:

      Code:
      FibonacciRetracements myRetracements;
      myRetracements = Draw.FibonacciRetracements(this, "fib", true, 20, High[20], 2, Low[2]);
      for (int i = 0; i < myRetracements.PriceLevels.Count; i++)
        myPriceLevel = myRetracements.PriceLevels[i].Value;
      The Fibonacci Retracement tool may be referenced here for its full use within NinjaScript:


      Examples for accessing the PriceLevels can be found here: https://ninjatrader.com/support/help...ricelevels.htm

      The rest of your strategy can be made by using logic to control when you enter and exit.

      Oder Methods and management can be referenced here: https://ninjatrader.com/support/help...er_methods.htm

      If you do not have experience programming and have interest, I may provide you some direction on how to get started with NinjaScript.

      If you do not wish gain experience programming your strategies thorough script, you may create an ATM strategy with an auto-breakeven stop strategy. However you will not be able to place a dynamic Profit Target based on your Fibonacci Retracement price levels.

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

      Comment


        #4
        Thanks for the reply, I will look into it.

        In the meanwhile, how can I set a simple ATM strategy to move stop to BE+2 pips (if long and -2 pips if short) if price hit a specific price ?

        Comment


          #5
          Hello JourneyOfARookie,

          I have attached an image depicting how to create the breakeven point in the picture below:



          In the given example, 2 units will be traded on entry with an initial stop loss of 10. After 4 pips of profit the the first unit will trade and the stop loss for the second unit will move to 2 pips away in favorable direction from the average entry price. "Pips in favorable direction" means that the breakeven point will be placed above the entry price if long, and below the entry price if short.

          Here is the documentation on building ATM strategies in NinjaTrader 8

          ATM Strategies - https://ninjatrader.com/support/help...gement_atm.htm

          Stop Strategies - https://ninjatrader.com/support/help...gement_atm.htm

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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          12 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          7 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          6 views
          0 likes
          Last Post nandhumca  
          Started by The_Sec, Today, 03:37 PM
          0 responses
          3 views
          0 likes
          Last Post The_Sec
          by The_Sec
           
          Started by GwFutures1988, Today, 02:48 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Working...
          X