Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sma/ema Hlco/4

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

    Sma/ema Hlco/4

    Hi,

    is it possible to set the SMA/EMA indicators to (High+Low+Close+Open)/4?

    if not, does anyone have a custom indicator which does that?

    cheers

    #2
    Hi sub5mango,

    Thanks for your post.

    You would need to store the ( Open + High + Low + Close ) / 4 calculations in a DataSeries object and pass this in as input to the moving average indicator.

    Here is a reference sample demonstrating the use of a DataSeries object -

    http://www.ninjatrader-support.com/vb/showthread.php?t=7299

    Here is a reference to the section of our HelpGuide discussing a DataSeries object -

    http://www.ninjatrader-support.com/HelpGuideV6/DataSeriesObject.html

    The code snippet below is an approximation of what you seek:

    myDataSeries.Set(( Open + High + Low + Close ) / 4);
    SMA(myDataSeries, periodValue)

    Comment


      #3
      thanks, that worked a treat

      code:
      myDataSeries.Set(((Open[0]+High[0]+Low[0]+Close[0])/4));AvgR.Set(EMA(myDataSeries, Period)[0]);

      Comment


        #4
        out of curiosity, what would you use this compound indicator to demonstrate or track?

        also, can you post a recent ES or TF or YM picture of this indicator?

        thanks

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        560 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        325 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
        547 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