Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy wizard open order

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

    Strategy wizard open order

    Hi, I'm trying a very simple strategy to send a stop order without any condition, just to test, but this do not work.

    Here the code generated from strategy wizard:

    #region Using declarations
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Data;
    using NinjaTrader.Indicator;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Strategy;
    #endregion

    // This namespace holds all strategies and is required. Do not change it.
    namespace NinjaTrader.Strategy
    {
    /// <summary>
    /// Enter the description of your strategy here
    /// </summary>
    [Description("Enter the description of your strategy here")]
    public class OrderStart : Strategy
    {
    #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()
    {
    CalculateOnBarClose = false;
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    EnterLongStop(DefaultQuantity, GetCurrentAsk() + 1 * TickSize, "");
    }

    #region Properties
    #endregion
    }
    }

    #2
    Hello federicoo, and thank you for your question.

    Please first visit the strategies tab of the control center, and make sure your strategy remains enabled. It is enabled when it is checked. Please next check to see if there are any messages in the logs tab of your control center related to your strategy. If there are, please let us know what they are.

    I look forward to assisting further.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hi, the script is enable and the log only shows this:

      Enabling NinjaScript strategy 'OrderStart/f2346230055946aa95e95864ddd8893d' : On starting a real-time strategy - StrategySync=SubmitImmediately SyncAccountPosition=False EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=PerEntryExecution ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=Strategy ConnectionLossHandling=KeepRunning DisconnectDelaySeconds=10 CancelEntryOrdersOnDisable=True CancelExitOrdersOnDisable=True CalculateOnBarClose=False MaxRestarts=4 in 5 minutes

      Thanks

      Comment


        #4
        Thank you, I will need just one more piece of information to have a complete picture on my end. Are you able to start and run the SampleMACrossover strategy on your computer?

        I am testing with your strategy on my end and will report back with my findings.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Thank you, it is working now...

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          51 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          142 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          160 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          96 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          275 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X