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 Waxavi, 04-19-2024, 02:10 AM
            3 responses
            41 views
            0 likes
            Last Post gaz0001
            by gaz0001
             
            Started by Max238, Today, 01:28 AM
            2 responses
            26 views
            0 likes
            Last Post NinjaTrader_ChristopherJ  
            Started by Shansen, 08-30-2019, 10:18 PM
            25 responses
            949 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by JonesJoker, 04-22-2024, 12:23 PM
            8 responses
            42 views
            0 likes
            Last Post JonesJoker  
            Started by timko, Today, 06:45 AM
            0 responses
            6 views
            0 likes
            Last Post timko
            by timko
             
            Working...
            X