Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

automatic entry

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

    automatic entry

    I've noticed this afternoon that soon as I turn a strategy on it enters directly into the market, I assume it is just pairing up with the position had it been on the whole day. Can you explain to me again why this is happening? It's as if they're strategy positions but they're actually going through and are real positions.
    Thanks

    #2
    Hello Pistolpete,

    Thank you for your post.

    Yes, this is the reasoning behind this fill. There is a setting you can change if you like it to behave differently.

    Click on Tools > Options > Strategies tab, then NinjaScript tab.

    You can change the setting "On Starting a real-time strategy" from "Imediately submit live working historical order" to "Wait until flat before executing live".

    Click here for more information on the strategy settings.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan,
      I do have wait until flat before executing live clicked off.
      Any other reason why this would be occurring?

      Comment


        #4
        pistolpete,

        When you start up your strategy it has a strategy position. Whatever it is doing right now is done virtually till you reach a flat state. Then it will be live trades after it reaches or passes the flat state.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          if you go to options > Strategies > Ninjascript , check the otion where it says :
          Wait until flat before executing live and then hit ok , I hope this helps

          Comment


            #6
            dont process historical

            hi

            You can control this by a parameter you can set:
            process

            publicenum tradingModes
            {
            HistoricalAndRealtime,
            Realtime
            }


            private tradingModes tradingMode = tradingModes.HistoricalAndRealtime;

            [Description("Trading Mode: HistoricalAndRealtime: Simulator Account (use for testing - will plot trades for historical data and execute strategy positions), Realtime:= Realtime Trading (will not process, execute or plot strategy trades for historical data - only realtime data)")]
            [Category(
            "General")]
            public tradingModes TradingMode
            {
            get { return tradingMode; }
            set
            {
            if (tradingMode != value)
            {
            Print(
            "tradingMode changed " + value);
            tradingMode = value;
            }
            }
            }

            protectedoverridevoid OnBarUpdate()
            {
            if ((tradingMode == tradingModes.Realtime) && (Historical))
            {
            return;
            }
            ....
            }


            MicroTrends
            NinjaTrader Ecosystem Vendor - micro-trends.co.uk

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            111 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            59 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            38 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            41 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            78 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X