Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can anyone see the error compile code CS1513 ?

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

    Can anyone see the error compile code CS1513 ?

    Can anyone see the error?

    [Parameter("Stop Type", "Stop")]
    StopType StopType = StopType.Trailing;

    [Parameter(
    "StopMode", "Stop")]
    StopMode StopMode = StopMode.Percent;

    [Parameter(
    "CrossoverExitEnabled", "Exit")]
    bool CrossoverExitEnabled = true;

    [Parameter(
    "OCA Exit Enabled", "Exit")]
    bool OCAExitEnabled = true;
    [Parameter(
    "Stop Exit Enabled", "Exit")]
    bool StopExitEnabled = true;

    SMA sma1;
    SMA sma2;


    // for the orders used by this strategy
    Order mar****rder,
    limitOrder,
    stopOrder;
    [Parameter(
    "Order quantity (number of contracts to trade)")]
    double Qty = 3;
    publicoverridevoid OnStrategyStart()
    {
    // set up the moving averages, based on closing prices
    sma1 = new SMA(Bars, Length1, Color1);
    sma2 =
    new SMA(Bars, Length2, Color2);
    // 0 means draw both averages on the price chart
    Draw(sma1, 0);
    Draw(sma2,
    0);
    }

    #2
    no, as you havent provided the full code

    Comment


      #3
      mccallum28,

      Unfortunately there is not enough information there, however based on the error code you likley have not closed one of the statements.

      I would suggests locating all of the end braces ( } )in this section and highlighting each one, which should highlight the corresponding brace above ( { ) and make sure these are set as expected.

      If you cannot make any progress, please provide us with more of the code.
      MatthewNinjaTrader Product Management

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      633 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      364 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      567 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X