Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tick Data Vs Minute Data

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

    Tick Data Vs Minute Data

    Hi,

    Can someone please explain why tick data and minute data produced different results on the same RSI method ?
    - is there a guide available on how to code with tick data correctly?

    {
    public class rsiquestion : Indicator
    {
    [Browsable(false)]
    [XmlIgnore]
    public Series<double> rsiTick
    {
    get { return Values[0]; }
    }

    [Browsable(false)]
    [XmlIgnore]
    public Series<double> rsiMinute
    {
    get { return Values[1]; }
    }
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"Enter the description for your new custom Indicator here.";
    Name = "rsiquestion";
    Calculate = Calculate.OnBarClose;
    IsOverlay = false;
    DisplayInDataBox = true;
    DrawOnPricePanel = true;
    DrawHorizontalGridLines = true;
    DrawVerticalGridLines = true;
    PaintPriceMarkers = true;
    ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;

    //Disable this property if your indicator requires custom values that cumulate with each new market data event.
    //See Help Guide for additional information.
    IsSuspendedWhileInactive = true;
    }
    else if (State == State.Configure)
    {
    AddPlot(Brushes.Cyan, "RSI tick");
    AddPlot(Brushes.Magenta, "RSI Minute");

    AddDataSeries("EURAUD", Data.BarsPeriodType.Tick, 1);
    AddDataSeries("EURAUD", Data.BarsPeriodType.Minute, 1);

    }
    }

    protected override void OnBarUpdate()
    {

    if (BarsInProgress != 0 && IsFirstTickOfBar)
    {
    if (CurrentBars[1] < 50)
    return;

    double rsiValueTick2 = RSI(BarsArray[1], 25, 5)[0];
    rsiTick[0] = rsiValueTick2;

    double rsiValueMinute2 = RSI(BarsArray[2], 25, 5)[0];
    rsiMinute[0] = rsiValueMinute2;
    }
    }
    }
    }

    // here you can see that the signals are completely different. (its the same with SMA() also )
    Why?. Thanks
    Click image for larger version  Name:	image.png Views:	0 Size:	48.9 KB ID:	1308635
    ​​
    Last edited by yertle; 06-26-2024, 02:18 AM.

    #2
    Hello yertle,

    This is may be due to the tick data being more granular which could allow for more datapoints to be used in the calculation. To answer this type of question you can use prints from a copy of the RSI to see how that input is specifically changing its calculation.

    Comment


      #3
      the input data is nearly the same... but the output differs greatly.
      i thought (IsFirstTickOfBar) would resolve this.

      But i am only using tick data so that the indicator can be used for any timeframe or bar type,

      the indicator is based on OHLC prices only. not market depth

      rsiTick input :1.60055
      rsiMinute input:1.60057
      rsiTick : 43.7528265528054
      rsiMinute :30.8441577832017
      rsiTick input :1.60055
      rsiMinute input:1.60057
      rsiTick : 43.7528265528054
      rsiMinute :30.8441577832017
      rsiTick input :1.60058
      rsiMinute input:1.60057
      rsiTick : 50.2103638559736
      rsiMinute :30.8441577832017
      rsiTick input :1.6006
      rsiMinute input:1.60057
      rsiTick : 53.8868153849523
      rsiMinute :30.8441577832017
      rsiTick input :1.60061
      rsiMinute input:1.60057
      rsiTick : 55.5945672568245
      rsiMinute :30.8441577832017
      rsiTick input :1.60062
      rsiMinute input:1.60057
      rsiTick : 57.2439666415843
      rsiMinute :30.8441577832017
      rsiTick input :1.60061
      rsiMinute input:1.60057
      rsiTick : 55.1116017573735
      rsiMinute :30.8441577832017
      rsiTick input :1.60062
      rsiMinute input:1.60057
      rsiTick : 56.788326060925
      rsiMinute :30.8441577832017
      rsiTick input :1.6006
      rsiMinute input:1.60057
      rsiTick : 52.6881784031575
      rsiMinute :30.8441577832017
      rsiTick input :1.60059
      rsiMinute input:1.60057
      rsiTick : 50.7786744539911
      rsiMinute :30.8441577832017
      rsiTick input :1.60055
      rsiMinute input:1.60057
      rsiTick : 44.1167507588451
      rsiMinute :30.8441577832017
      rsiTick input :1.60054
      rsiMinute input:1.60057
      rsiTick : 42.6592775958733
      rsiMinute :30.8441577832017
      rsiTick input :1.60057
      rsiMinute input:1.60057
      rsiTick : 48.0251496969141
      rsiMinute :30.8441577832017
      rsiTick input :1.60055
      rsiMinute input:1.60057
      rsiTick : 45.0946626445615
      rsiMinute :30.8441577832017
      rsiTick input :1.60056
      rsiMinute input:1.60057
      rsiTick : 46.7858698428966
      rsiMinute :30.8441577832017

      Code:
              protected override void OnBarUpdate()
              {
                  if (BarsInProgress != 0)
                  {
                      if (CurrentBars[2] < 50)
                          return;
      
                      if (IsFirstTickOfBar)
                      {
                          Print("rsiTick input :" + Closes[1][0]);
      
                          double rsiValueTick2 = RSI(Closes[1], 25, 5)[0];
                          rsiTick[0] = rsiValueTick2;
                      }
      
                      Print("rsiMinute input:" + Closes[2][0]);
                      double rsiValueMinute2 = RSI(Closes[2], 25,5)[0];
                      rsiMinute[0] = rsiValueMinute2;
      
                      Print("rsiTick : " + rsiTick[0]);
                      Print("rsiMinute :" + rsiMinute[1]);
      
                  }​

      Comment


        #4
        Hold up, I just worked around this problem. & I don't require the tick data for the OHLC calculations anymore

        Thank you.
        Last edited by yertle; 06-26-2024, 11:36 PM.

        Comment


          #5
          What was the fix? I'm trying to figure out how to work with per tick to get my RSI to match the 1 minute chart in my python script.

          Comment


            #6
            From what I recall, & what I understood.
            The tick data should not be used to calculate non Orderflow signals, where time data series can be used.

            NT8 builds all timeframes from 1 min data ( I dont know about seconds)
            Tick data should be used for Orderflow only.

            I might be wrong on that. But in this case I got 1minute data working as expected without needed to use tick data

            Comment


              #7
              Thanks for the reply... I'm connected to Ninja Trader via their client.dll and the live data feed is per tick. I just can't seem to figure out how to work with this to get close to the same value on the 1 minute chart in Ninja Trader. I've tried so many different things.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              605 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              351 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              560 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              561 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X