Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My Questions

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

    #46
    Use TraceOrders = true to debug your strategy as per this tip: http://www.ninjatrader-support.com/v...ead.php?t=3627
    Josh P.NinjaTrader Customer Service

    Comment


      #47
      System Backtest for Forex

      Hi,

      I have some Questions about trading with systems on the forex market.
      I have a IB account and use the IB datafeed.
      So I have the historical IB data for backtesting.

      Are the IB data good for backtesting? Or should I choose others?
      I heard that esignal is good?(good history and realtime feed)

      If I trade the system live, so its better to take the realtime data from IB datafeed?Or an other vendor?

      I think that its the best for my relatimetrading to take the IB feed, because
      this prices are realy to trade. If I take an other it could be that the price witch is there is not to trade on my broker.

      Comment


        #48
        I can't comment on whether IB is good or bad for historical data, you would have to make the determination yourself. For trading, you should use the IB real-time feed since it is the market prices they trade from. Any other feed would be incorrect.
        RayNinjaTrader Customer Service

        Comment


          #49
          ProfitTrail

          Can someone take a look at this schort script-the problem is I dont no why the profittrail not works?!


          #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 Testtrail : 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 = true;

          SetTrailStop("L", CalculationMode.Ticks, 500, false);

          SetStopLoss("L", CalculationMode.Ticks, 250, false);


          }

          /// <summary>
          /// Called on each bar update event (incoming tick)
          /// </summary>
          protected override void OnBarUpdate()
          {
          if (CurrentBar < 120)
          {
          return;
          }
          if(Position.MarketPosition == MarketPosition.Flat &&
          CrossAbove(Momentum(100),0,1))
          {
          EnterLong("L");
          SetTrailStop("L", CalculationMode.Ticks, 500, false);
          SetStopLoss("L", CalculationMode.Ticks, 250, false);


          }
          /*if(Position.MarketPosition == MarketPosition.Long &&
          BarsSinceEntry() == 100 )
          {
          ExitLong("L");
          }*/





          }

          #region Properties
          #endregion
          }
          }

          Comment


            #50
            I suggest debugging your strategy as per here to understand what's going on: http://www.ninjatrader-support.com/v...ead.php?t=3627

            Also: Please post issues not related to the original post in a new thread.

            Comment


              #51
              Hugo1,

              Just checking back to see if you have resolved the issues. Please also take note that you cannot use SetStopLoss() and SetTrailStop() concurrently. Check out the "Tips" section of this article: http://www.ninjatrader-support.com/H...TrailStop.html
              Josh P.NinjaTrader Customer Service

              Comment


                #52
                Hi Josh,

                Thanks , no problem ! it works!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                599 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                344 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                103 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                558 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                557 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X