Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Build Historical Ask and Bid For Renko

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

    Build Historical Ask and Bid For Renko

    hi, i'm try to build a historical series for ask and bid traded on renko chart..is possible?

    i see that page



    But i don't know how to do it..

    Anyone Help me?

    #2
    Hello esignal,

    You would need to add the renko bar series to your code using AddRenko(). Then use Closes to return the ask and bid values.




    Add your renko bar series to the State.Configure method of your code.

    Code:
    [LEFT]else if (State == State.Configure )
                                                 {
                                                                 AddRenko("ES 03-16" , 2, MarketDataType. Ask);
                                                                 AddRenko("ES 03-16" , 2, MarketDataType. Bid);
                                                 }
                                  }[/LEFT]
    In the OnBar Update section of your code you would add the logic of your code. You can use Closes here to reference your renko bars, I have included an example of this below:
    Code:
    protected override void OnBarUpdate()
    [LEFT]                              {       
    
                                                  if(Closes [2][0] > Closes[1][0])
    [LEFT]                                             {
                                                  Print("Bid is greater than the Ask" );[/LEFT]
    
                                                 }
    [LEFT]                              }[/LEFT]
    [/LEFT]

    AddRenko()
    Closes
    Shawn B.NinjaTrader Customer Service

    Comment


      #3
      I would like to implement in the historic data the following indicator for renko : Buy Sell Pressure Indicator

      Is correct that approach that you have mentioned? I must to use tick by tick or Use AddRenko with other data series...

      Or I have to add the pressure of the bid and ask tick that there are between a candle renko and the other?

      i see in that post : https://ninjatrader.com/support/help...ick_replay.htm
      Note: The system bar types "Line Break" and "Renko" cannot be used with Tick Replay and as a result, the Tick Replay option will be disabled when configured with those bar types.

      thanks
      Last edited by esignal; 01-21-2016, 04:05 PM.

      Comment


        #4
        Hello esignal,

        Unfortunately, since the Tick Replay option is not available for Renko bars, historical Buy Sell Pressure indicator values will not be displayed and will only populate based off real time data.

        The Buy Sell Pressure indicator utilizes OnMarketData() to plot its values. This method is not called historically, however, can be called historically if Tick Replay is enabled. As Tick Replay cannot be enabled for Renko bars, the indicator will not output values on historical Renko bars.

        You would need to modify the Buy Sell Pressure indicator to calculate values historically through each call of OnBarUpdate().

        Please, let us know if we may be of further assistance.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          If i use OnBarUpdate instead of OnMarketData() ,
          I lose tick than the other method ?

          Comment


            #6
            Hello esignal,

            Without Tick Replay, you will only be able to access the OHLC values of historical bars. You will not be able to access each tick that went into building the bar.
            Zachary G.NinjaTrader Customer Service

            Comment


              #7
              i don't understand.....
              You Say" You would need to modify the Buy Sell Pressure indicator to calculate values historically through each call of OnBarUpdate()."

              Ok...but also :" Without Tick Replay, you will only be able to access the OHLC values of historical bars. You will not be able to access each tick that went into building the bar."

              are two opposing concepts

              Can i get
              https://gyazo.com/fb7a20a4ccc7d5cf3c49349d7d4f06ec
              building with OnBarUpdate in historical with renko chart or not? excuse me but i don't understand your
              explanation
              Last edited by esignal; 01-26-2016, 11:07 AM.

              Comment


                #8
                Hello esignal,

                For indicators to calculate historically, the calculations would need to be in a method that can be called historically, such as OnBarUpdate(). The Buy Sell Pressure indicator does its calculations in OnMarketData(), which needs either real-time data or Tick Replay enabled to plot.

                If you would like the Buy Sell Pressure indicator to plot historically, you would need to have the indicator plot with OnBarUpdate(). However, with the way the indicator functions, this would not work.

                The screenshot provided does not look like the Buy Sell Pressure indicator; is this a different indicator?
                Zachary G.NinjaTrader Customer Service

                Comment


                  #9
                  no..it the same....i've changed some parameter...
                  To create historical Trade ask and bid for renko , can this solution :

                  AddDataSeries(BarsPeriodType.Tick, 1);

                  And here i sum all tick bid and ask between an update and the other of renko candle

                  Is possible? Or the result is bad

                  Comment


                    #10
                    Hello esignal,

                    Before doing this, ensure that your data provider provides historical bid and ask data. To see what types of data is provided by each connectivity provider, please take a look at this link from the NinjaTrader 8 help guide: http://ninjatrader.com/support/helpG...y_provider.htm

                    I would suggest taking a look at this link from our support forum on how you can count the number of ticks in each bar. While this refers to NinjaTrader 7, you can easily utilize the same process in NinjaTrader 8: http://ninjatrader.com/support/forum...85&postcount=6
                    Zachary G.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Tim-c, Today, 02:10 PM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by Taddypole, Today, 02:47 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post Taddypole  
                    Started by chbruno, 04-24-2024, 04:10 PM
                    4 responses
                    50 views
                    0 likes
                    Last Post chbruno
                    by chbruno
                     
                    Started by TraderG23, 12-08-2023, 07:56 AM
                    10 responses
                    399 views
                    1 like
                    Last Post beobast
                    by beobast
                     
                    Started by lorem, Yesterday, 09:18 AM
                    5 responses
                    25 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Working...
                    X