Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple MacD Cross Over

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

    Simple MacD Cross Over

    I created a simple MacD cross over strategy - cross above go short - cross below go long.

    At the last screen in the strategy wizard I set a profit of 10 ticks and a stop loss of ten ticks.

    When it actually runs it enters and exits based on the MacD cross over and not by the profit or stop loss (seems to be ignoring the profit and stop loss part.

    Any suggestions?

    Thanks.
    Attached Files

    #2
    Hello,

    Thank you for writing in.

    When using the Strategy builder, SetProfitTarget() and SetStopLoss() get placed in Initialize(). This results in static profit targets and stop losses that are based on the entry price alone. If you unlock the code, these calls may be moved to OnBarUpdate() to dynamically change them depending on your chosen logic.

    When you are enabling your strategy, are you using PerEntryExecution or ByStrategyPosition?

    Please see here for more information on the managed approach to submitting orders:


    If you would like further assistance, could you include the .cs for your strategy so I may reproduce it on my end?

    Comment


      #3
      Originally posted by NinjaTrader_Jim View Post
      Hello,

      Thank you for writing in.

      When using the Strategy builder, SetProfitTarget() and SetStopLoss() get placed in Initialize(). This results in static profit targets and stop losses that are based on the entry price alone. If you unlock the code, these calls may be moved to OnBarUpdate() to dynamically change them depending on your chosen logic.

      When you are enabling your strategy, are you using PerEntryExecution or ByStrategyPosition?

      Please see here for more information on the managed approach to submitting orders:


      If you would like further assistance, could you include the .cs for your strategy so I may reproduce it on my end?
      Thank you Jim. Merry Christmas.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X