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 cre8able, Today, 03:20 PM
          0 responses
          5 views
          0 likes
          Last Post cre8able  
          Started by Fran888, 02-16-2024, 10:48 AM
          3 responses
          47 views
          0 likes
          Last Post Sam2515
          by Sam2515
           
          Started by martin70, 03-24-2023, 04:58 AM
          15 responses
          114 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by The_Sec, Today, 02:29 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by jeronymite, 04-12-2024, 04:26 PM
          2 responses
          31 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X