Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

no fills

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

    no fills

    When i open a chart, choose a strategy and enable it, i dont get any fills?
    Whats might be the problem?

    #2
    Hello sosMsos,

    When i open a chart, choose a strategy and enable it, i dont get any fills?
    Whats might be the problem?
    • The conditions aren't true for entry.
    • You're not displaying trade executions.


    If you want to test a basic strategy, use the provided SampleMACrossOver, and make sure PlotExecutions are enabled in the right click > Data Series screen. This should generally produce trades and show fills on the chart.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      ya executions are plotted.
      What dos this mean:

      • The conditions aren't true for entry.

      Backtesting works great

      Here the strategy:



      #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("trendfollow2minchart")]
      public class trendfollow2minchart : 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()
      {
      Add(PeriodType.Day, 1);
      //Add("^TICK", PeriodType.Minute, 1);
      Add(RSI(4, 0));
      Add(RSI(9, 0));
      Add(EMA(21));
      Add(EMA(55));
      Add(EMA(200));
      Add(ATR(14));

      CalculateOnBarClose = true;
      }

      /// <summary>
      /// Called on each bar update event (incoming tick)
      /// </summary>
      protected override void OnBarUpdate()
      {
      // Condition set 1
      if (EMA(BarsArray[1], 21)[0] > EMA(BarsArray[1], 55)[0]
      && EMA(BarsArray[1], 55)[0] > EMA(BarsArray[1], 200)[0]
      && EMA(BarsArray[1], 55)[0] > EMA(BarsArray[1], 55)[1]
      && EMA(BarsArray[1], 200)[0] > EMA(BarsArray[1], 200)[1]
      && CrossBelow(RSI(4, 0).Avg, 30, 1))

      {
      if (BarsInProgress == 0)
      EnterLong(DefaultQuantity, "");
      }
      // SetStopLoss("",CalculationMode.Ticks, (ATR(14)[0]) * (250), false);

      // Condition set 2
      if (CrossAbove(RSI(9, 0).Avg, 70, 1))
      {
      ExitLong("");
      }
      // Condition set 3
      if (CrossBelow(RSI(4, 0).Avg, 78, 1))
      {
      ExitLong("");
      }
      // Condition set 3
      if (CrossBelow(RSI(9, 0).Avg, 30, 15)
      && CrossAbove(RSI(9, 0).Avg, 45, 1))
      {
      ExitLong("");
      }
      }

      #region Properties
      #endregion
      }
      }

      Comment


        #4
        What dos this mean:

        The conditions aren't true for entry.
        That means the signals aren't returning true to process orders.

        If you are adding daily series to your strategy, you should look at the amount of data loaded on the chat to make sure there is enough. Check this in the Right Click > Data Series screen.

        Check log tab of control center for any error messages.

        In order to track what your strategy is doing, you can debug with Print() statements and TraceOrders output.

        Use plenty of Print() statements to verify values are what you expect.

        Add TraceOrders = true to your Initialize method and you can then view output related to strategy submitted orders through Tools > Output window.

        It may also help to add drawing objects to your chart for signal confirmation. Additional help for these items is available at the following links:

        Debugging your NinjaScript code.
        TraceOrders
        Drawing Objects.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,280 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
        52 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Working...
        X