User login

  

Developing Custom Indicator

What is an Indicator in PTL?

Indicator is a technical instrument  linked up to a certain chart. Indicators applied for analysis of economic performance and predictions for future performance. Indicators can not trade automatically and are intended for implementing of analytical functions only. ProTrader has internal templates for your own indicators. There are also a lot of standard indicators are completed available.

Creating a New Indicator

If you need a new indicator, start ProTrader Desktop and create a new project for the Indicator. After creating the project a code template for the Indicator appears in the Editor. If you need, you can modify the information in comments.

To set the view of indicator line use SetIndicatorLine.

You obliged to specify indicator's line type. Specify line Name, Color, Weight and  Style.

If you want your module to show more than one indicator, add one more SetIndicatorLine function.
Set SeparateWindow as true if you want your indicator to be displayed in a separate chart window.

SetIndicatorLine(string name, Color color, int width, LineStyle style)

    public enum LineStyle
    {
        SimpleChart = 0,
        DotChart,
        DotLineChart,
        IsoDotChart,
        ShapedChart,
        ShapedDotChart,
        ShapedDoubleDotChart,
        HistogrammChart,
        ArrowChart
    }

To draw indicator line you may use platform.SetValue function.

Running an Indicator

After you have finished programing, run your indicator. Press F5 or right click in the Script and select Run. The window with indicators settings appears. Click OK and you will see it in the Tester panel. After running you could change required Instrument and period in Tester panel.

12345

Comments