Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Effort Index

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

    Effort Index

    Hello!

    I found this indicator in the forum but it is not a NinjaTrader version. Is someone willing to convert it to NT8.1 and share it here?

    Thank you for your help.
    Attached Files

    #2
    Hello diegomezhur,

    This thread will remain open for any community members that would like to code this as a convenience to you.

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services.

    You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!
    Programming Services - https://ninjatraderecosystem.com/sea...mming-services
    Educators - https://ninjatraderecosystem.com/sea...ures=education

    You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third party services for NinjaTrader all pricing and support information will need to be obtained through the consultant.

    This 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 companies and services 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.​
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello diegomezhur,

      This thread will remain open for any community members that would like to code this as a convenience to you.
      Hi NinjaTrader_ChelseaB,

      I have have written this Effort Index indicator and will post it shortly after I check for export version compatibility.

      Cheers!

      Comment


        #4
        Originally posted by diegomezhur View Post
        Hello!

        I found this indicator in the forum but it is not a NinjaTrader version. Is someone willing to convert it to NT8.1 and share it here?

        Thank you for your help.
        I did the conversion however needs further work here is V1


        -------------------------------------------------

        region Using declarations
        using System;
        using System.Windows.Media;
        using System.Xml.Serialization;
        using System.ComponentModel;
        using System.ComponentModel.DataAnnotations;
        using NinjaTrader.Cbi;
        using NinjaTrader.Gui.Tools;
        using NinjaTrader.NinjaScript;
        using NinjaTrader.Data;
        using NinjaTrader.Gui.Chart;
        #endregion

        // This namespace holds all indicators and is required. Do not change it.
        namespace NinjaTrader.NinjaScript.Indicators
        {
        public class EffortVersusResultIndex : Indicator
        {
        private Series<double> Vrg;
        private Series<double> arg;
        private Series<double> rsg;
        private Series<double> sro;
        private Series<double> Vro;
        private Series<double> rso;
        private Series<double> snor;
        private Series<double> Vnor;
        private Series<double> rnor;
        private Series<double> EI;

        private Series<double> rgSeries;
        private Series<double> rsSeries;

        [NinjaScriptProperty]
        [Range(20, 200)]
        [Display(Name = "Volume Lookback Period", Order = 1, GroupName = "Parameters")]
        public int Vlp { get; set; }

        protected override void OnStateChange()
        {
        if (State == State.SetDefaults)
        {
        Description = @"Volume Price Analysis - Effort Versus Result Index";
        Name = "EffortVersusResultIndex";
        Calculate = Calculate.OnEachTick;
        IsOverlay = false;
        AddPlot(Brushes.Orange, "Result");
        AddPlot(Brushes.Green, "Effort");
        AddPlot(Brushes.Turquoise, "EffortIndex");

        // Set default value for Vlp
        Vlp = 50;
        }
        else if (State == State.DataLoaded)
        {
        Vrg = new Series<double>(this);
        arg = new Series<double>(this);
        rsg = new Series<double>(this);
        sro = new Series<double>(this);
        Vro = new Series<double>(this);
        rso = new Series<double>(this);
        snor = new Series<double>(this);
        Vnor = new Series<double>(this);
        rnor = new Series<double>(this);
        EI = new Series<double>(this);

        rgSeries = new Series<double>(this);
        rsSeries = new Series<double>(this);
        }
        }

        protected override void OnBarUpdate()
        {
        if (CurrentBar < Vlp) return;

        double rg = High[0] - Low[0];
        double rs = Math.Abs(Close[0] - Close[1]);

        rgSeries[0] = rg;
        rsSeries[0] = rs;

        Vrg[0] = SMA(Volume, Vlp)[0];
        arg[0] = EMA(rgSeries, Vlp)[0];
        rsg[0] = EMA(rsSeries, Vlp)[0];

        sro[0] = rg / arg[0];
        Vro[0] = Volume[0] / Vrg[0];
        rso[0] = rs / rsg[0];

        double smax = MAX(sro, Vlp)[0];
        double smin = MIN(sro, Vlp)[0];
        double Vmax = MAX(Vro, Vlp)[0];
        double Vmin = MIN(Vro, Vlp)[0];
        double rmax = MAX(rso, Vlp)[0];
        double rmin = MIN(rso, Vlp)[0];

        snor[0] = (sro[0] - smin) * 100 / (smax - smin);
        Vnor[0] = (Vro[0] - Vmin) * 100 / (Vmax - Vmin);
        rnor[0] = (rso[0] - rmin) * 100 / (rmax - rmin);

        EI[0] = rnor[0] / Vnor[0];

        // Plotting
        Values[0][0] = snor[0];
        Values[1][0] = -Vnor[0];
        Values[2][0] = EI[0];
        }

        region Properties
        [Browsable(false)]
        [XmlIgnore]
        public Series<double> Result
        {
        get { return Values[0]; }
        }

        [Browsable(false)]
        [XmlIgnore]
        public Series<double> Effort
        {
        get { return Values[1]; }
        }

        [Browsable(false)]
        [XmlIgnore]
        public Series<double> EffortIndex
        {
        get { return Values[2]; }
        }
        #endregion
        }
        }


        region NinjaScript generated code. Neither change nor remove.

        namespace NinjaTrader.NinjaScript.Indicators
        {
        public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
        {
        private EffortVersusResultIndex[] cacheEffortVersusResultIndex;
        public EffortVersusResultIndex EffortVersusResultIndex(int vlp)
        {
        return EffortVersusResultIndex(Input, vlp);
        }

        public EffortVersusResultIndex EffortVersusResultIndex(ISeries<double> input, int vlp)
        {
        if (cacheEffortVersusResultIndex != null)
        for (int idx = 0; idx < cacheEffortVersusResultIndex.Length; idx++)
        if (cacheEffortVersusResultIndex[idx] != null && cacheEffortVersusResultIndex[idx].Vlp == vlp && cacheEffortVersusResultIndex[idx].EqualsInput(input))
        return cacheEffortVersusResultIndex[idx];
        return CacheIndicator<EffortVersusResultIndex>(new EffortVersusResultIndex(){ Vlp = vlp }, input, ref cacheEffortVersusResultIndex);
        }
        }
        }

        namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
        {
        public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
        {
        public Indicators.EffortVersusResultIndex EffortVersusResultIndex(int vlp)
        {
        return indicator.EffortVersusResultIndex(Input, vlp);
        }

        public Indicators.EffortVersusResultIndex EffortVersusResultIndex(ISeries<double> input , int vlp)
        {
        return indicator.EffortVersusResultIndex(input, vlp);
        }
        }
        }

        namespace NinjaTrader.NinjaScript.Strategies
        {
        public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
        {
        public Indicators.EffortVersusResultIndex EffortVersusResultIndex(int vlp)
        {
        return indicator.EffortVersusResultIndex(Input, vlp);
        }

        public Indicators.EffortVersusResultIndex EffortVersusResultIndex(ISeries<double> input , int vlp)
        {
        return indicator.EffortVersusResultIndex(input, vlp);
        }
        }
        }

        #endregion

        Comment


          #5
          Hello upwell123,

          To export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:
          1. Click Tools -> Export -> NinjaScript Add-on...
          2. Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
          3. Click the 'Export' button
          4. Enter the script name in the value for 'File name:'
          5. Choose a save location -> click Save
          6. Click OK to clear the export location message
          By default your exported file will be in the following location:
          • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
          Below is a link to the help guide on Exporting NinjaScripts.
          http://ninjatrader.com/support/helpG...nt8/export.htm


          If you would like to share your work, I recommend posting this in the User App Share Submissions.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by samish18, Today, 04:59 PM
          0 responses
          3 views
          0 likes
          Last Post samish18  
          Started by oneybuchi2, Today, 03:48 PM
          0 responses
          7 views
          0 likes
          Last Post oneybuchi2  
          Started by Graci117, 06-19-2024, 01:39 PM
          6 responses
          54 views
          0 likes
          Last Post Graci117  
          Started by farawayz, Today, 01:20 PM
          0 responses
          11 views
          0 likes
          Last Post farawayz  
          Started by rjm1903, Today, 01:10 PM
          0 responses
          6 views
          0 likes
          Last Post rjm1903
          by rjm1903
           
          Working...
          X