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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      157 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      91 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      143 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      130 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X