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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X