Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Call Multiple TF's from an indicator

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

    Call Multiple TF's from an indicator

    Hi,

    I have made and indicator that simply either returns True or False.

    Now i am making another indicator that will call the original indicators output for 5 different Timeframes.

    I have read all the help forums but simply cant work out how to do it.

    I have added 5 timeframes in the original indicaor..... How do I call/assign them in the second indicator?

    I thought i may just be able to assign it like this

    double indicator = Indicator(parameters go here)[data series number goes here?];

    But no luck


    Thanks.



    This is the initialise function for the indicator that returns the bool value.


    protected override void Initialize()
    {
    //Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
    Overlay = true;
    CalculateOnBarClose = false;

    Add(PeriodType.Minute, 5);
    Add(PeriodType.Minute, 15);
    Add(PeriodType.Minute, 30);
    Add(PeriodType.Minute, 60);
    Add(PeriodType.Minute, 180);
    Add(PeriodType.Day, 1);
    }

    #2
    Marty, you would need to direct the custom indicator to use your desired series in the bars array, so for example -

    double myIndicator = SMA(Closes[2][0], 20)[0];

    would mean you're calculating the SMA on the Close value of the 2nd added (so in total 3rd) series in your script.



    Arrays for Lows, Highs, Opens, Medians....are available as well depending on what price type you wish to work on.

    Comment


      #3
      Thanks.. Works now.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      636 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      568 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      571 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X