Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Errors on strategy activation

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

    Errors on strategy activation

    I'm using custom indicator in my strategy. It does compile fine, however when I try to activate the strategy, it gives me errors and crashing the chart/NT. Please see the screenshots of what I am getting in attachment. The parts of the code that referring to the indicator are:

    public class Scalp1 : Strategy
    {
    private D3SpotterRSI d3;

    #region Variables
    // Wizard generated variables
    // User defined variables (add any user defined variables below)
    #endregion

    /// <summary>
    /// This method is used to configure the strategy and is called once before any strategy method is called.
    /// </summary>
    protected override void Initialize()
    {
    SetProfitTarget("long", CalculationMode.Ticks, 50);
    SetProfitTarget("short", CalculationMode.Ticks, 50);
    SetProfitTarget("long1", CalculationMode.Ticks, 20);
    SetProfitTarget("short1", CalculationMode.Ticks, 20);

    CalculateOnBarClose = false;

    d3 = new D3SpotterRSI();
    Add(d3);
    }

    and :

    // Condition set 1
    if (Position.MarketPosition == MarketPosition.Flat

    && d3.LastUpArrowBar == CurrentBar - 1)

    // Condition set 2
    if (Position.MarketPosition == MarketPosition.Flat

    && d3.LastDownArrowBar == CurrentBar - 1)


    Please advise, thank you in advance.
    Attached Files

    #2
    Hello meowflying,

    Thank you for your post.

    Please send me your log and trace files for today so that I may look into what occurred. You can do this by going to the Control Center-> Help-> Mail to Platform Support. Please refer this thread in the body of the e-mail: "http://www.ninjatrader.com/support/forum/showthread.php?t=73081"

    Comment


      #3
      Email sent.

      Originally posted by NinjaTrader_PatrickH View Post
      Hello meowflying,

      Thank you for your post.

      Please send me your log and trace files for today so that I may look into what occurred. You can do this by going to the Control Center-> Help-> Mail to Platform Support. Please refer this thread in the body of the e-mail: "http://www.ninjatrader.com/support/forum/showthread.php?t=73081"

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      646 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      367 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 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