Page 1 of 1

One indicator, more panes

Posted: Tue Nov 14, 2006 11:47 am
by michal.kreslik
A simple solution to the need of having one indicator with plots on multiple panes:

Code: Select all

using NeoTicker;

namespace NeoMultiplePlots
{
    public class EntryPointClass : IDLIndicator
    {
        const int valueCount = 3;
        double[] values = new double[valueCount];
        int valueToPlot;

        public double IDLCallEx(NTIndicatorObjects N)
        {
            // sample values to plot:
            values[0] = N.Data1().get_Close(0);
            values[1] = 1 / N.Data1().get_High(0);
            values[2] = values[0] * values[1] * 3.5;
            //

            valueToPlot = N.Params().get_Items("Value to plot").Int;

            if (valueToPlot >= 0 && valueToPlot < valueCount)
            {
                N.ItSelf().set_Plot(1, values[valueToPlot]);
            }
            else
            {
                N.ItSelf().Success = false;
            }

            return 0;
        }
    }
}




Michal

attached: C#, DLL, IDL

Posted: Tue Nov 14, 2006 4:41 pm
by Luke
Lol. Great idea Michal!