Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MTF replay adx value problem

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

    MTF replay adx value problem

    I try to test multi time frame strategy using replay, but if I start strategy day before i get different results, if I start same day or couple hours ealier.

    this is small simulation what you can use and verify behaviour.
    add this one to your strategy

    This is big problem for me because realtime results not match market replay results.
    I mean entries,


    use Calconbarclose=false

    protected override void Initialize()
    {
    Add(PeriodType.Range, 150);
    CalculateOnBarClose = true;
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    if(CurrentBar<100)
    return;

    if(Historical==true)
    return;

    if(BarsInProgress!=0)
    return;

    if(FirstTickOfBar==false)
    return;

    double a=ADX(BarsArray[1],5)[0];

    Print(Time[0]+" "+a.ToString());


    }

    #2
    do adx support BarsArray[0]
    or input[0]

    Comment


      #3
      Don't know how ADX is calculating values, but values are different if you start "calculating ealier".
      Ithere is maybe bug in ADX calculation logic.
      Or some problem with replay.

      Comment


        #4
        jokujoku,

        Please be aware that the bar type you are using is "time independant". As such, you will not have consistent time intervals between bars when starting conditions are different.

        Also, please be aware of discrepancies between backtesting and real time trading : http://www.ninjatrader.com/support/h...rical_data.htm

        Please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Hey test that strategy, and use market replay only, if you start you replay just couple hours ealier, than exampl 12GMT , whats adx values,then you start strategy and roll your replay one day or two day ealier, your adx value is different, it should not, !!!!!!!!!!!!!!!!!!!!
          Last edited by jokujoku; 01-24-2012, 04:50 AM.

          Comment


            #6
            ADX is not calculating values correctly I don't know is the problem ADX or market replay.
            This is happening in market replay, so i don't know how well it is is calculated in live.

            You can also adx indicator 5 period your chart you can see very values are diffrent.
            Its really depend how did you start replay

            example start replay yesterday 10GMT, then start replay two days ago and let if run untill yesteryda 12GMT you can see ADX values are different,
            Last edited by jokujoku; 01-24-2012, 04:53 AM.

            Comment


              #7
              jokujoku, what are you comparing the ADX value to? To another platform as well?

              For the data, does your Market Replay and historical data come from the exact same datasource?

              As otherwise you could be running on different data here if you compare recorded / downloaded replay data generating ADX values compared to another historical data source.

              Comment


                #8
                Check the code below I am using that. I am using replay all the time when its calculating ADX.

                example
                1) Connect market replay.

                2) go 1/24/2012 08.00 GMT. Start runing strategy / Market Replay, look adx values

                go 1/23/2012 18:00 GMT Start running strategy /Market Replay to ----> 09.00 GMT 1/24/2012
                You can see from output window or chart if you add adx indicato, adx values are different.
                It depends when did you start running market replay,

                Same data all the time same platform.

                Comment


                  #9
                  jokujoku,

                  ADX has a period input so it factors in previous results for current values. It takes a little while to stabilize so that its the same as previous results.

                  Also, are you still using time independent bars to calculate your ADX? If so, this behavior is to be expected as time independence means that each bar will cover a non-uniform time interval. Time independent charts are sensitive to initial starting point.

                  Please let me know if I may assist further.
                  Adam P.NinjaTrader Customer Service

                  Comment


                    #10
                    Thats a problem sometimes, I have to polute world and keep my computer running just for ADX indicator. Because if I wake up morning and start runing my strategy ADX value is not same if I keep running my computer overnight. Anyhow good to know ADX behaviour. is there other indicators which are behaving similar ways, so i don't waste time and banging my head to wall, and thingking whats problem in my strategy. The value difference is not huge, but sometimes its enough not to trigger trade.
                    Thanks

                    Comment


                      #11
                      jokujoku,

                      I would suspect that this may be a time independence issue. Please try running it on a time-based chart and see if you have similar issues.
                      Adam P.NinjaTrader Customer Service

                      Comment


                        #12
                        ADX different values

                        I have the same problem with the ADX values which are different for the same instrument, period and timeframe in Metatrader 4 and Ninja Trader 7 .And the difference is quite big , in NT is 37,53 but in MT4 is 26,14.

                        Can you please help me to find out what is the problem , even if the data providers are different i don't think it should be an issue because the Moving Averages calculated are almost the same for both.

                        It's frustrating to use a strategy which relies on ADX but gives you a different perspective when using different platforms for the SAME DATA

                        The question in the back of my mind is which platform should i use.?

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        648 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        369 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        108 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        572 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        574 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X