Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using the 'Opening' column in a custom indicator

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

    Using the 'Opening' column in a custom indicator

    Hi all,

    The MA column 'opening' contains the opening price. I'd like to use that value in a custom indicator. How do I access it?

    Thanks

    john

    #2
    Hello jkmott59,

    I have sent in that request to our development team to review what is expected here as you could get the 'Opening' in the Market Analyzer but not in a chart using the same code.

    I will get back with you once i receive an answer.
    JCNinjaTrader Customer Service

    Comment


      #3
      If it helps I don't use the charts, I would only use the value of 'Opening' in an indicator that would reside in another column in the MA

      Comment


        #4
        Hello jkmott59,

        Thanks for the information. Once, development gets back with what is expected I will be sure to confirm that as well.
        JCNinjaTrader Customer Service

        Comment


          #5
          Hello jkmott59,

          Here is what our development team came back with to set the value of the Opening price to a variable to be used in your Indicators calculations by using the OnMarketData() function. For example:

          Code:
          #region Variables
                  // Wizard generated variables
                      private double openingPrice = 0; // Default setting for OpeningPrice
                  // User defined variables (add any user defined variables below)
          #endregion
          
          protected override void OnMarketData(MarketDataEventArgs e)
          {
          	openingPrice = e.MarketData.Opening.Price;
          }
          You can read some additional information about OnMarketData() from the following link.
          http://www.ninjatrader.com/support/h...marketdata.htm

          Please let me know if I can be of further assistance.
          JCNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          67 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          36 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          59 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          62 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          53 views
          0 likes
          Last Post CarlTrading  
          Working...
          X