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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      61 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      148 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      98 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X