Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BackTesting

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

    BackTesting

    Hi,

    I am using the Strategy Analyser in Ninja 7 for the first time and nothing happened! that it returns no test data!
    ///
    ...
    ...
    ..

    protected override void OnBarUpdate()
    {
    double value=MACD(12, 26, 9).Diff[0];
    ThisMacd= value;
    if (Position.Quantity ==0 && value<0 && OpenOrder == null)
    {
    OpenOrder=EnterLong(10,"O_MACDLong");
    }
    if (Position.Quantity !=0 && value>0 && OpenOrder == null && CloseOrder==null)
    {
    if (ThisMacd*LastMacd>0 && ThisMacd<LastMacd)
    {
    CloseOrder=ExitLong("C_MACDLong","O_MACDLong");
    }
    }
    LastMacd=ThisMacd;

    }

    protected override void OnOrderUpdate(IOrder order)
    {
    if (OpenOrder != null && OpenOrder == order)
    {

    if (order.OrderState == OrderState.Filled)
    OpenOrder = null;
    }
    if (CloseOrder != null && CloseOrder == order)
    {

    if (order.OrderState == OrderState.Filled)
    CloseOrder = null;
    }
    }

    Thanks.

    #2
    Hello,
    I have tested this on my end and I do see trades submitted.
    What data provider are you connected to?
    What instrument and date range do you have selected?
    If you backtest the SampleMACrossover do you see trades submitted?
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your response!

      I'm connected with NinjaTrader Continuum (Demo).
      For test I use AAPL .Range :[2016-06-01 to 2016-06-17].
      No trades submitted with SampleMACrossover for me!

      Comment


        #4
        I use ZB 03-16 and it's work! I think it's a problem of data!

        Comment


          #5
          Hello,
          NinjaTrader Continuum does not provide data for stocks, only Futures and Index data. To backtest on stocks you will need to connect to a data provider that offers this data.
          I have provided a link below to our Help Guide that goes over understanding the data provided by various connectivity providers.

          http://www.ninjatrader.com/support/h...rical_data.htm
          Cody B.NinjaTrader Customer Service

          Comment


            #6
            Thanks for your response!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by SteveAU, Yesterday, 08:35 PM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by nduckste, Today, 02:00 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by John Bogui, Today, 06:07 AM
            0 responses
            3 views
            0 likes
            Last Post John Bogui  
            Started by watchinggoodman, Today, 05:45 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_ChrisSch  
            Started by cummish, Today, 03:40 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jason  
            Working...
            X