Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Market Profile - Single Prints - Indicator or Calculation

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

    Market Profile - Single Prints - Indicator or Calculation

    Hi guys,

    Do you know an indicator that allows you to plot the singles prints in Market Profile or Perhaps the way to calculate them?

    I've been trying to code it myself, but I struggle looking back in specific Trading Hours. FOr example from 9:30 am to 4:30 pm RTH, I need to look back if any previous bar has broken the Single print range.

    Any help will be very much appreciated.

    Best Regards
    Carlos
    Attached Files

    #2
    Hello Cyanez,

    You could take a look at the platforms built in market profile indicator VolumeProfile. That shows how it collects/renders data. The general way to work with the incoming data to form a profile would be to use OnMarketData.

    The type of display for a profile would generally use OnRender due to the requirements of placement of visuals, the volumeprofile indicator is a good starting point at that type of development.

    Depending on how you calculate the profile will determine if it can be used historically. If you are using OnMarketData you would also need to use TickReplay if you wanted to see it work historically. The indicator would otherwise work going forward in time.




    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi @NinjaTrader_Jesse

      I was looking for something a bit less sophisticated.

      So far this is what I have:

      Base on the following:
      - Market profile works basically on 30 min chart.
      - I have to Work RTH and ON separately unless I can use the Trading hour in conjunction. ( I mean, I have a costume Trading Hour that has RTH and ON in each day?


      This is the Scrip so far:


      // Set 1
      if ((Highs[1][1] > Highs[1][2])
      && (Times[0][0].TimeOfDay >= new TimeSpan(21, 30, 0))
      && (Times[0][0].TimeOfDay < new TimeSpan(4, 0, 0)))
      {
      Prior_High = Highs[1][0];
      }

      // Set 2
      if ((Prior_High <= Closes[1][0])
      && (Times[0][0].TimeOfDay >= new TimeSpan(21, 30, 0))
      && (Times[0][0].TimeOfDay < new TimeSpan(4, 0, 0))
      && (CurrentDayOHL1.CurrentHigh[1] < High[0]))
      {
      SPH = Lows[1][0];
      SPL = Highs[1][2];
      Draw.RegionHighlightY(this, @"CYMarketProfileSP Region highlight y_1 " + Convert.ToString(Close[0]), false, SPL, SPH, Brushes.Orange, Brushes.Aqua, 10);
      BackBrush = Brushes.Gold;
      }

      Basically, it works for each bar and checks if there is a previous bar that had totally or partially break the SP range ( SPL and SPH) But I struggle to refer to a specific bar ago.
      For example, I will need a loop that checks each High and Low of x bars ago, Let said the RTH is from 9:30 am to 4:00 pm, and currently, it is 11:30 am that means I should check 4 bars ago. I would like to know how I can calculate it because if I make the loop for the total 14 (30 min) bars in the RTH I will have an error when I check the bar ago that does not exist.

      In my previous post, the pic showed B period with the SP range, after that every new period must be tested in order to make sure there is no bar in the range otherwise the SP will be cover.
      I was thinking to use something like this:

      If ( Times[0][0].TimeOfDay >= new TimeSpan(11, 30, 0))
      {i = 4}
      If ( Times[0][0].TimeOfDay >= new TimeSpan(12, 00, 0))
      {i = 5}
      If ( Times[0][0].TimeOfDay >= new TimeSpan(12, 30, 0))
      {i =6}

      But it is not very efficient.

      Hope you can help me with this.

      Thank you in advance.

      Best Regards
      Carlos



      Comment


        #4
        Hello Cyanez,

        If you are trying to know a specific BarsAgo for a certain bar it would likely be easiest to store the bars index to a variable. For example you could add a time condition to check for 9:30am and then store the CurrentBar at that time. Later when you wanted to know the BarsAgo to get back to that time you could subtract the stored variable with the current index:

        Code:
        int barsAgo = CurrentBar - myStoredCurrentBar;

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Hi Cyanez,
          I'm a certified ninjatrader dev and i coded a similar tool , i've attached screenshots. Contact me in private if you want trial version of the tool.


          Click image for larger version  Name:	Single prints.png Views:	0 Size:	116.9 KB ID:	1198854
          Attached Files
          Last edited by mjtrad; 04-26-2022, 05:03 AM.

          Comment


            #6
            Hello. How do I respond for the trial of the single print indicator/script ?
            Please PM me.
            Many thanks in advance
            Last edited by NinjaTrader_Jesse; 11-30-2023, 12:23 PM. Reason: Do not include personal emails on the forum.

            Comment


              #7
              Hi,
              You can test it at : https://www.marketmastercoder.com/pr...ys-free-trial/

              Comment


                #8
                Can someone explain the significance of single prints?

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Haiasi, 04-25-2024, 06:53 PM
                2 responses
                17 views
                0 likes
                Last Post Massinisa  
                Started by Creamers, Today, 05:32 AM
                0 responses
                5 views
                0 likes
                Last Post Creamers  
                Started by Segwin, 05-07-2018, 02:15 PM
                12 responses
                1,786 views
                0 likes
                Last Post Leafcutter  
                Started by poplagelu, Today, 05:00 AM
                0 responses
                3 views
                0 likes
                Last Post poplagelu  
                Started by fx.practic, 10-15-2013, 12:53 AM
                5 responses
                5,407 views
                0 likes
                Last Post Bidder
                by Bidder
                 
                Working...
                X