Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Configure Add(PeriodType....) via input

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Configure Add(PeriodType....) via input

    Hi,

    i want to create a multiple TimeFrame Indicator, wich plot various calculations depending of inputs. For example:

    I want to plot a 5 min SMA in a 1 min chart. I create an Indicator where I can select type (Tick, min, day....) and value (5 for 5min...)

    can I check this in protected override void initialize()?

    for example:
    Code:
    protected override void initialize()
    {
         if(TimeFrame = "Minute")
         Add(PeriodType.Minute, Value);
         if(TimeFrame = "Tick")
         Add(PeriodType.Tick, Value);
        .......
    Jens

    #2
    Hi Jens, unfortunately dynamically adding series with logic in the Initialize() would not be supported. You could add all series need and then plot selectively as desired.

    Comment


      #3
      Hi Bertrand,

      now I got an 'unfortunatly' again...... So I have two write one indicator for every timeframe I want to add..... And I hoped, that I can do this without my global variable...

      jens

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      127 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      105 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      85 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      105 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      86 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X