One indicator, more panes

NeoTicker indicators

Moderator: moderators

User avatar
michal.kreslik
rank: 1000+ posts
rank: 1000+ posts
Posts: 1032
Joined: Sat May 13, 2006 2:40 am
Reputation: 0
Location: Monte Carlo, Monaco
Real name: Michal Kreslik
Gender: Male
Contact:

One indicator, more panes

Postby michal.kreslik » Tue Nov 14, 2006 11:47 am

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
Attachments
MultiplePlots.zip
(3.01 KiB) Downloaded 68 times

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

Luke
rank: 50+ posts
rank: 50+ posts
Posts: 65
Joined: Sat Jul 01, 2006 1:46 pm
Reputation: 0
Gender: Male

Postby Luke » Tue Nov 14, 2006 4:41 pm

Lol. Great idea Michal!


Return to “NeoTicker indicators”