• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Stop Loss in Strategy Builder question

  • Filter
  • Time
  • Show
Clear All
new posts

    Stop Loss in Strategy Builder question

    Hey all,

    I have a very simple, quick and easy question (I think). I did my due diligence but couldn't come up with the answer.

    In the Strategy Builder, under Stops and Targets, I set a "Trailing Stop." I start the strategy and it works fine; I enter positions according to my conditions. However, once I'm in the position and my Trailing Stop loss is set, how do I simply move the trailing stop, manually, in chart trader, without the stop automatically moving, once I've clicked and held on the stop loss with my cursor?

    Thank you!

    Hello Sh00tHerMcGavin,

    Thanks for your post and welcome to the NinjaTrader forums!

    The trailing stop method is intended to operate autonomously as are most strategies meaning that they are not intended to be operated with intervention such as manually moving an order. The strategy code specifies the stop position and will continue to assert that.

    If you would like to create a strategy where you can adjust the stops and targets on the fly then you would need to work directly in Ninjascript using specific ATMstrategy methods. The strategy builder cannot be used to create this type of strategy. You can create a script that will locate entries according to your conditions and upon an entry fill will apply a preselected ATM strategy template that applies the stop and target as defined in the ATM strategy. This then allows you to manually adjust on the fly the stop and profit target. Once either have been filled, control returns back to the Ninjascript strategy to find the next entry. A working example of this type strategy is in your Ninjatrader platform called "SampleAtmStrategy". The strategy code contains comments that help explain the method functions used.

    Here is a link to the help guide section for the special ATM methods required: https://ninjatrader.com/support/help...gy_methods.htm

    Paul H.NinjaTrader Customer Service



      Thanks a lot for your reply, that all makes sense.

      Also, I have another question. And I think you can answer it directly. I was searching on how to build two different MACD crossover time frames. I found this forum in which (coincidentally) you had replied to. The video you posted helped tremendously. However I wanted to take it a step further. Can I create two MACD crossovers in the same condition? You created a 10,000 Tick on CL, and applied it to the MACD. Could you also create different Tick value, applied to the MACD? For example. A MACD, based on a 10,000 Tick chart, that is greater than 0. Then, a MACD, based on a 1000 Tick chart, cross above 0. Here's what it looks like in the strategy builder.

      "If All"
      MACD(<Primary>(10000 Tick), 12,26,9).MACD[0]>0
      CrossAbove(MACD(<Primary>(1000 Tick), 12, 26, 9).Default, 0, 1)

      Enter Long- duh

      I hope this makes sense. Here's is the forum I'm referencing. https://ninjatrader.com/support/foru...frame-settings

      Thanks Paul!


      Looking back, you may have answered this question as well. https://paul-ninjatrader.tinytake.co...Q3NV82NDM3NzYz

      Last edited by Sh00tHerMcGavin; 01-05-2019, 12:48 PM.


        Hello Sh00tHerMcGavin,

        Thanks for your reply.

        In the strategy builder, if you have added the secondary data series then yes you can create a condition set that looks at the MACD crossing of both the primary (chart) bars and the added data series.

        I've attached an example of MACD crossing above the average line for both the chart bars and an added 10k tick data series in the strategy builder.

        Click image for larger version

Name:	shootermcgavin-1.PNG
Views:	68
Size:	11.5 KB
ID:	1044528
        Paul H.NinjaTrader Customer Service


        Latest Posts


        Topics Statistics Last Post
        Started by behindthewheel, Today, 10:39 AM
        1 response
        Last Post NinjaTrader_Jim  
        Started by Newtrader101, Today, 10:46 AM
        3 responses
        Last Post NinjaTrader_ChristopherJ  
        Started by tecmisc1, Today, 10:42 AM
        2 responses
        Last Post NinjaTrader_ChrisL  
        Started by ballboy11, Today, 10:35 AM
        1 response
        Last Post NinjaTrader_Kate  
        Started by fredfred, Today, 10:30 AM
        1 response
        Last Post NinjaTrader_Melissa