Quantower_in
  • Welcome to Quantower.in Help
  • Getting started
    • What's new
    • Installation
    • First start
    • Platform update
    • Control center
    • Workspaces, Binds, Groups
    • Templates
    • Set as Default
    • Symbols lookup
    • Table management
    • Backup & restore manager
    • General settings
    • Quantower Account
    • Quantower Licenses
  • Connections
    • Connections manager
    • Connection to Quandl
  • Analytics panels
    • Chart
      • Chart types
        • Time aggregation
        • Renko
        • Heiken Ashi
        • Kagi
        • Points & Figures
        • Range bars
        • Line break
        • Volume Bars
      • Chart overlays
      • Technical indicators
        • Oscillators
          • Aroon Indicator
          • Moving Average Convergence/Divergence
          • Awesome Oscillator
          • Accelerator Oscillator
          • %R Larry Williams
          • Momentum
          • Rate of Change
          • Commodity Channel Index
        • Moving averages
          • Exponential Moving Average
          • Simple moving average
        • Volatility
          • Average True Range
          • Standard deviation
        • Trend
          • ZigZag
      • Drawing tools
      • Volume analysis tools
        • Cluster chart
        • Volume profiles
        • Time statistics
        • Time histogram
        • Historical Time & Sales
      • Power Trades
      • VWAP
    • Watchlist
    • Time & Sales
    • Price Statistic
    • DOM Surface
    • Order Flow Surface
    • Option Analytics
    • TPO Profile Chart
  • Trading panels
    • Order Entry
      • Order Types
    • DOM Trader
    • Market depth
    • Trading simulator
    • History Player
    • FX Cell
  • Portfolio panels
    • Positions
    • Working Orders
    • Trades
    • Orders History
    • Synthetic Symbols
    • Historical Symbols
  • Information panels
    • Account info
    • Symbol Info
    • Currencies Exposure
    • Event Log
    • RSS
    • Reports
  • Miscellaneous
    • History Exporter
    • Symbol Mapping Manager
    • Market heat map
    • Stat matrix
    • Exchange times
    • Quote Board
    • Browser
    • Excel and RTD function
  • Quantower Algo
    • Introduction
    • Install for Visual Studio
    • Simple Indicator
    • Input Parameters
    • Built-In indicators access
    • Indicator with custom painting (GDI)
    • Using markers with indicators
    • Adding a custom indicator to Watchlist
    • Downloading history
    • Simple strategy
    • Access to trading portfolio
    • Trading operations
    • Example: Simple Moving Average
Powered by GitBook
On this page

Was this helpful?

  1. Quantower Algo

Adding a custom indicator to Watchlist

How to add a custom indicator to Watchlist panel properly? This guide will show you a useful method using which you can easily add an indicator.

PreviousUsing markers with indicatorsNextDownloading history

Last updated 5 years ago

Was this helpful?

How to make an indicator compatible with 'Watchlist’

Ok, let’s imagine, you have created a custom indicator and it works correctly when you add it to the ‘Chart’. But you want to add it to the ‘Watchlist’ panel too. Yes, Quantower supports this . Open ‘Watchlist’ -> click on ‘Indicators lookup’ -> and… you can’t find it. Hmm, something is wrong. And two questions come up: “Why I can’t see it on the list?” and “How can I add my indicator to the list?”.

Well, the reason is that your indicator doesn’t implement special "IWatchlistIndicator" interface. This is the marker which is used for filtering content into ‘Indicators lookup’ in ‘Watchlist’.

public class Best_Indicator : Indicator, IWatchlistIndicator
    {
        … Best_Indicator code.
    }

For example: Quantower platform has the built-in "Price Action Zones" indicator. It’s designed only for work on the ‘Chart’ panel because it uses . It doesn’t implement this interface, and you can’t use it in the ‘Watchlist’.

Ok, let’s remember. Before adding the indicator to the chart you need to select . But after adding an indicator to the ‘Watchlist’ you can customize input parameters and timeframe only. Hmm… “How does the Watchlist understand how deep the history needs to be downloaded?”.

‘IWatchlistIndicator’ interface provides ‘MinHistoryDepths’ property which must return a minimal history depths value for the current indicator. You need to implement it correctly and that’s all.

public class DoubleSMA: Indicator, IWatchlistIndicator
    {
        [InputParameter("First SMA period", 0, 1, 999, 1, 1)]
        public int FirstPeriod = 5;

        [InputParameter("Second SMA period", 1, 1, 999, 1, 1)]
        public int SecondPeriod = 10;

       public int MinHistoryDepths => this.FirstPeriod  + this.SecondPeriod ;

       … DoubleSMA indicator code
}
feature
custom drawing
‘TimeFrame’ and ‘Depth of history’
Input parameters of any indicator on Watchlist panel