Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Hide some bars of a secondary data serie

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

    Hide some bars of a secondary data serie

    Hi,

    I have a chart with a main data serie 1 minute candlestick bars with tick replay. I have an indicator which uses OnRender to draw information based on ticks and custom candlesticks.
    The problem that I have is that I usually have gaps without tick data (I'm recording realtime data).
    In order to solve that I added on same panel a secondary data serie 1 minute candlestick bars without tick replay to fill the gaps.

    This more or less solve the problem when I set same bar width but I have the problem that the bar width of both data series does not match when I Zoom in / Zoom out (it changes alone).

    I would like to be able to hide or change barwidth or colours of some bars of the secondary dataserie in order to make them invisible when there are tick replay data.

    Any ideas about how I can do it?

    Thank you for your help.

    Regards

    #2
    Hello,

    Thanks for your post.

    This would be possible by right-clicking on the chart> Data Series> changing the color properties of the candlesticks, body outline, and wicks of the secondary data series to "Transparent".

    Please let me know if I may be of any further assistance.
    Marco G.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      thanks for answer.

      I already know how to do this, but i do not want to hide them all. I just want to hide them when there are tick replay data. What I need is that the secondary data serie (without tick replay) fills the empty data when there are not tick replay data recorded. If I make them all invisible when there is missing tick data there are no bar to show (I want to see the secondary data serie bar in that case).

      Are some way to change that settings bar by bar in my custom indicator?

      Regards

      Comment


        #4
        Another question, may be I can draw missing candles on tick replay using a secondary data series in the indicator (using AddDataSeries) without tick replay.

        If the primary data serie has tick replay enable, how can I add a secondary data serie without tick replay enable?

        Regards

        Comment


          #5
          Hello mbcmbc,

          If issues are stemming from an inability to record Tick Replay data or an issue trying to do so, I would suggest addressing that root issue as opposed to finding ways to identify where there may be gaps in a data series. I may suspect connection issues if you are getting gaps when recording data.

          If you have an indicator added to your Tick Replay series and your non Tick Replay series, you could use Bars.IsTickReplay to see if that data series is enabled with Tick Replay. You could then try to have the two indicators communicate and see if one has a bar with X timestamp, and then you could modify BarBrushes in one of the indicators accordingly. This would just change what is seen visually on the chart, and would be a band-aid fix for the issue above. Data would not be inserted into the data series that is missing data. This also starts to go beyond what we would support, so you would be on your own for getting the scripts to communicate and see if one has a bar and the other does not.

          An example that can demonstrate having scripts communicate via an AddOn can be found here - https://ninjatrader.com/support/foru...ument-backtest

          Data Series that are added via script will use Tick Replay if the primary data series uses Tick Replay. It cannot be switched on and off for added data series.

          Tick Replay is also very expensive. I would encourage you to add a single tick data series to your script and then use BarsArray[1].GetBid BarsArray[1].GetAsk and BarsArray[1].GetVolume to in place of analyzing with OnMarketData which would be much more performant. I have attached an example BuySellPressure indicator that uses this approach and can be compared with the BuySellPressure indicator that comes with NinjaTrader to give some direction for using a Multi Time Frame approach over Tick Replay. OneTickMultiSeriesTemplate can be referenced for a Multi Time Frame approach as well.

          I look forward to assisting.
          Attached Files
          JimNinjaTrader Customer Service

          Comment


            #6
            Thank you!

            I will try your approach.

            Regards

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Brevo, Today, 01:45 AM
            0 responses
            3 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            3 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            238 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            384 views
            1 like
            Last Post Gavini
            by Gavini
             
            Started by oviejo, Today, 12:28 AM
            0 responses
            6 views
            0 likes
            Last Post oviejo
            by oviejo
             
            Working...
            X