Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator based on another indicator

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

    Indicator based on another indicator

    I'm trying to create and indicator based on the calculated variables from another indicator(PriorDayOHLC).

    After searching and reading what's available online (http://www.ninjatrader.com/support/f...ead.php?t=4991) and downloading the "SampleBoolSeries.zip", I'm still confused about the steps required.

    How do I call the OHLC from the "PriorDayOHLC" indicator (variables are below)? Do I create BoolSeries and used them in the calculations? What is needed for the #region Properties?

    Thanks for the help.

    #region Variables

    // Wizard generated variables
    // User defined variables (add any user defined variables below)
    private DateTime currentDate = Cbi.Globals.MinDate;
    privatedouble currentOpen = 0;
    privatedouble currentHigh = 0;
    privatedouble currentLow = 0;
    privatedouble currentClose = 0;
    privatedouble priordayOpen = 0;
    privatedouble priordayHigh = 0;
    privatedouble priordayLow = 0;
    privatedouble priordayClose = 0;
    privatebool showOpen = true;
    privatebool showHigh = true;
    privatebool showLow = true;
    privatebool showClose = true;
    #endregion

    void Initialize()
    {
    Add(new Plot(Color.Orange, PlotStyle.Hash, "Prior Open"));
    Add(new Plot(Color.Green, PlotStyle.Hash, "Prior High"));
    Add(new Plot(Color.Red, PlotStyle.Hash, "Prior Low"));
    Add(new Plot(Color.Firebrick, PlotStyle.Hash, "Prior Close"));

    #2
    Hello 2Look4me,

    You would not be able to get the variables as they are private the class object only.

    You would want to access the PriorOpen, High, Low, and Close dataseries which can be done with the following -

    PriorDayOHLC().PriorOpen[0];
    PriorDayOHLC().PriorHigh[0];
    PriorDayOHLC().PriorLow[0];
    PriorDayOHLC().PriorClose[0];

    http://www.ninjatrader.com/support/h...r_day_ohlc.htm
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Cal, that helped.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      559 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      546 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X