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

how to use the Daily OHLC indicator as candle

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

    how to use the Daily OHLC indicator as candle

    i use intraday charts and would like to see how to plot daily OHLC as cancle to see how the candle is evolving at the hourly snapshot. Can this be done? I use the daily OHLC as a line plot overlay on the hourly bars but really i would like to see the hourly snapshot of the daily bar Click image for larger version

Name:	AnRNIvO.png
Views:	230
Size:	149.8 KB
ID:	1205292

    all i need is concept of how it can be done. i can program it out.. if its already there, let me know so i dont need to reinvest the wheel

    #2
    Hi junkone, thanks for posting. The Spread indicator has a candle stick version. You can use this as an example of how to do this:

    This is a conversion of the Spread Indicator with Candlesticks. Please contact the original author for any questions or comments.


    Kind regards,
    -ChrisL

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      well, i tried. i removed the secondary series and reused the values with DailyHighLowClose indicator values. There are a couple of things that is odd.
      1. dataseries daily high low close are truncated to 3 decimals
      2. the charting scale is bit off.

      could use some help here.
      Attached Files

      Comment


        #4
        Hi, the price scale is not formattable, but you can turn PaintPriceMarkers = true; then comment out the PlotBrushes[i][0] = Brushes.Transparent; and base.OnRender(chartControl, chartScale); to show the price markers in the price panel. This will show you the full number in the price panel.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          this is beautiful. the only last missing piece is that the indicator values for DailyClose, DailyHigh is truncating to 3 decimals. When i compare it to the CurrentDayOHL which is the source for this indicator value shows 5 decimals. How do i fix it?

          Click image for larger version

Name:	VHTIII1.png
Views:	154
Size:	109.8 KB
ID:	1205352

          Comment


            #6
            Hi junkone, that is just the way indicators are displayed. There is no way to format this.
            Chris L.NinjaTrader Customer Service

            Comment


              #7
              [ATTACH]n1205429[/ATTACH] i think we are discussing varied points.
              CurrentDayOHL uses a double to show the properties.
              public Series<double> CurrentOpen
              {
              get { return Values[0]; }
              }
              As you can see from screenshot, the format displayed is 5 decimal places

              I am assigning the same value to DailyBarsIntraday indicator.
              DailyOpen[0] = CurrentDayOHL().CurrentOpen[0]; // line number 93

              the properties is as follows

              [Browsable(false)]
              [XmlIgnore]
              public Series<double> DailyOpen
              {
              get { return Values[3]; }
              } Click image for larger version  Name:	gzHCHDY.png Views:	0 Size:	105.2 KB ID:	1205428

              However the values shown is truncated to 3 decimal places.

              This does not make sense. how do i fix it?





              Click image for larger version  Name:	gzHCHDY.png Views:	0 Size:	105.2 KB ID:	1205427
              Last edited by junkone; 06-16-2022, 10:37 AM. Reason: add attachment

              Comment


                #8
                Hi junkone, I am getting all decimal points in my version. I will attach it here in case something is different in your version.


                Kind regards,
                -ChrisL
                Attached Files
                Chris L.NinjaTrader Customer Service

                Comment


                  #9
                  the code you attached made the difference. Now i could really use the candle stick option for the indicators plots. hopefully it can handle the scaling which is really off here.

                  public override string FormatPriceMarker(double price)
                  {
                  //Print(price);
                  return price.ToString("N5");
                  }

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by wzgy0920, 04-20-2024, 06:09 PM
                  2 responses
                  26 views
                  0 likes
                  Last Post wzgy0920  
                  Started by wzgy0920, 02-22-2024, 01:11 AM
                  5 responses
                  32 views
                  0 likes
                  Last Post wzgy0920  
                  Started by wzgy0920, Yesterday, 09:53 PM
                  2 responses
                  49 views
                  0 likes
                  Last Post wzgy0920  
                  Started by Kensonprib, 04-28-2021, 10:11 AM
                  5 responses
                  191 views
                  0 likes
                  Last Post Hasadafa  
                  Started by GussJ, 03-04-2020, 03:11 PM
                  11 responses
                  3,231 views
                  0 likes
                  Last Post xiinteractive  
                  Working...
                  X