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

Reduce gap at opening session

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

    Reduce gap at opening session

    Hello,

    Is there a way to eliminate the gap at opening session between the close at 4 and open price at 9:30?

    Often there is a gap, lets say 27 points this morning for emini. If closing was at 3846.25 and opening the next day is 3818.75 is it possible to reajust the opening price to be equal to the closing of last day and reduce of 27.5 pts all following prices by the same amount?

    TY

    #2
    Hello frankduc,

    Thanks for your reply.

    Yes, you can redraw the bars however you wish. The indicator HeikenAshi8 is an example of drawing bars that are not presenting real price. It effectively removes the bars and draws bars based on its formulas.

    This indicator is publicly available on our NinjaTrader Ecosystem website:Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:

    Note — To import NinjaScripts you will need the original .zip file.

    To Import:
    1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
    2. From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
    3. Select the downloaded .zip file
    4. NinjaTrader will then confirm if the import has been successful.

    Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

    Once installed, you may add the indicator to a chart by:
    • Right-click your chart > Indicators... > Select the Indicator from the 'Available' list on the left > Add > OK

    Here is a short video demonstration of the import process: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.

    Last edited by NinjaTrader_PaulH; 01-22-2021, 08:29 AM. Reason: Clarified description
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Ok, but you cant change the price of the candles? I need to reajust all actual prices from 9:30 to be at the same level than the price at 4pm previous day.
      I dont see how its possible.
      Can it be possible to redraw all candles 10 pts higher from 9:30 till 4pm for example?

      Comment


        #4
        Hello frankduc,

        Thanks for your reply.

        I think your questions are best answered by downloading the indicator and applying it to an instrument. To best see the difference I would add two occurrences of the same data series and apply the indicator to one of those data series which will then show the difference.

        You can draw anything you wish, it won't be real but it will meet your visual needs if that is what you want.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Paul,

          I did that and i dont understand what you mean by add two occurrences of the same data series.
          I am not sure what your indicator is actually doing. To me its just like applying a different candlestick chart style.

          ty

          Comment


            #6
            Hello frankduc,

            Thanks for your reply.

            Here is a short video to help: https://Paul-ninjaTrader.tinytake.co...Nl8xNTgyNDY2Nw
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Hello,

              I was able to make the modification i wanted. Is it just visual or the new prices can be calculated by indicators?

              For example, i reajusted the price to make it fit the last close but if i input a VWMA or SMA it make no difference the VWMA will return the same result with or without the reajustment. I was expecting the VWMA to behave differently and create a slightly different curve.

              TY

              Attached Files

              Comment


                #8
                Hello frankduc,

                Thanks for your reply.

                Correct, the moving averages will default to the default price which is the underlying bar price data.

                The indicator HeikenAshi8 has 4 public plots that represent the price value of each HeikenAshi candle. For example, the plot HAClose provides the Close price of the Heiken-Ashi candle and this can be used as the input series to other indicators, such as the moving averages. You can do the same as the HeikenAshi8 indicator to make your pricetypes available for other indicators.
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  Hi Paul,

                  Ok, what you are saying is that my indicator that work on chartstyle candlestick will work on HeikenAshi8 if i switch the chart style proprieties to HeikenAshi?

                  There are no HeikenAshi chartstyle in chartstyle prorpieties available?

                  I just did a small test to make the candle fit the previous day close:

                  Code:
                  int barsAgo = ChartBars.ToIndex-Bars.GetBar(MyDateTime);
                  
                  
                  //Clear out regular candles
                  BarBrushes[0] = Brushes.Transparent;
                  CandleOutlineBrushes[0] = Brushes.Transparent;
                  
                  if (CurrentBar < (ChartBars.ToIndex-barsAgo))
                  {
                  HAOpen[0] = Open[0];
                  HAHigh[0] = High[0];
                  HALow[0] = Low[0];
                  HAClose[0] = Close[0];
                  return;
                  }
                  
                  
                  HAClose[0] = Open[0]-10;
                  HAOpen[0] = High[0]-10;
                  HAHigh[0] = Low[0]-10;
                  HALow[0] = Close[0]-10;
                  HAClose[0] is a proprietary method of NT? Which one should i use for a use of Candlestick?

                  TY

                  Comment


                    #10
                    Hello frankduc,

                    Thanks for your reply.

                    What I am trying to suggest is that you create an indicator, similar to Heiken-Ashi8, to remove the actual price bars and to then draw your own. I am not suggesting using the HeienAshi8 indicator. The HeikenAshi8 indicator makes the plots available that you can use in other indicators to provide the new false data you create and you would want to do the same on your own indicator.

                    If you would like this created for you, we can provide a reference link to 3rd party programmers in the Ninjatrader ecosystem that would be able to meet your needs.
                    Paul H.NinjaTrader Customer Service

                    Comment


                      #11
                      Ok,

                      That would mean i have to use a foor loop and get all close prices of a series for the period i am looking for, than subtract or sum all close prices by the difference between previous close and morning opening. Create a list than modify my existing indicator than use my new fake data to provide entry prices for the new Heiken-Ashi8. Thats a lot of trouble.

                      I thought it was possible to do more simple. I could probably do that myself but its a lot of trouble. 3rd party suck.

                      TY

                      Comment


                        #12
                        Is there a way we can get in the core data and modify the data series? I get the data from IB, there must be a way in NT we can subtract for example by 10 points each price without having to modify the indicator? I am talking about modify the data in Close[0];

                        Comment


                          #13
                          Hello frankduc,

                          Thanks for your reply.

                          No, there is not.
                          Paul H.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by rocketman7, Today, 01:00 AM
                          0 responses
                          1 view
                          0 likes
                          Last Post rocketman7  
                          Started by wzgy0920, 04-20-2024, 06:09 PM
                          2 responses
                          27 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, 04-23-2024, 09:53 PM
                          2 responses
                          74 views
                          0 likes
                          Last Post wzgy0920  
                          Started by Kensonprib, 04-28-2021, 10:11 AM
                          5 responses
                          193 views
                          0 likes
                          Last Post Hasadafa  
                          Working...
                          X