OptimusFLOW
  • Welcome to OptimusFLOW Help
  • Getting started
    • First Time Users
    • Control center
    • Workspaces, Binds, Groups
    • Templates
    • Set as Default
    • Symbols lookup
    • Table management
    • Backup & restore manager
    • General settings
  • Connections
    • Connections manager
    • Connection to Optimus Futures
    • Connection to Paper to Trader dxFeed
    • Connection to Rithmic
    • Connection to Rithmic Prop
    • Connection to CQG
    • Connection to OANDA
  • Trading Journal
  • Analytics panels
    • Chart
      • Chart types
        • 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
        • Volume
          • Delta Flow
      • Drawing tools
      • Volume Analysis Tools | Volume Profiles | Footprint chart | VWAP
        • Cluster chart
        • Volume profiles
        • Time statistics
        • Time histogram
        • Historical Time & Sales
      • Power Trades
      • VWAP | Volume Weighted Average Price
    • Watchlist
    • Time & Sales
    • Price Statistic
    • DOM Surface
    • Option Analytics
    • TPO Profile Chart
  • Trading panels
    • Order Entry
      • Order Types
    • DOM Trader
    • Market depth
    • Trading simulator
    • Market Replay (History Player)
    • FX Cell
  • Portfolio panels
    • Positions
    • Working Orders
    • Trades
    • Orders History
    • Synthetic Symbols
    • Historical Symbols
  • Information panels
    • Account info
    • Symbol Info
    • Event Log
    • RSS
    • Reports
  • Miscellaneous
    • History Exporter
    • Market heat map
    • Stat matrix
    • Exchange times
    • Quote Board
    • Excel and RTD function
  • 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. 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, OptimusFLOW 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: OptimusFLOW 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