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 GussJ, 03-04-2020, 03:11 PM
            16 responses
            3,281 views
            0 likes
            Last Post Leafcutter  
            Started by WHICKED, Today, 12:45 PM
            2 responses
            19 views
            0 likes
            Last Post WHICKED
            by WHICKED
             
            Started by Tim-c, Today, 02:10 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by Taddypole, Today, 02:47 PM
            0 responses
            5 views
            0 likes
            Last Post Taddypole  
            Started by chbruno, 04-24-2024, 04:10 PM
            4 responses
            53 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Working...
            X