Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Instrument Questions

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

    Multi Instrument Questions

    I'm looking for information on the capabilities of multi-instrument indicators...

    Is it yet possible to have a price chart in panel 1 and a price/indicator in panel 2 and write an indicator in panel 3 that references panel 1 & 2 Price/Indicator data - programatically?

    Or is the only way to get 2 instruments into an indicator through an input parameter that gets the instrument name and sends it into an indicator?


    Thanks

    Matt

    #2
    I do it by having a parameter ("Symbol2") which can be set by the user, but which defaults to the second instrument on the chart.

    If you want to reference an indicator on the chart instead of an instrument, I've never done that; it might be possible but it would probably be a pain to figure out how to do it.

    -Kevin

    Code:
    // in the Variables region:
    
    private string symbol2 = "";
    
    // in Initialize():
    
    Add(Symbol2, BarsPeriod.Id, BarsPeriod.Value);
    
    // in the Properties region:
    
    [Description("Secondary Symbol; i.e. SPY or ES 03-10\nDefault = Secondary chart instrument")]
    [GridCategory("Parameters")]
    // Force this parameter to be displayed first
    [Gui.Design.DisplayName ("\tSymbol 2")]
    public string Symbol2
    {
        get 
        { 
    	if ((symbol2 == "") && (ChartControl != null) && (Instruments != null)) 
                for(int i=0; i<ChartControl.BarsArray.Length; i++)
    		if (ChartControl.BarsArray[i].Instrument.FullName != Instruments[0].FullName)
    		{
    		     symbol2 = ChartControl.BarsArray[i].Instrument.FullName;
    		     break;
    		}
    	return symbol2; 
         }
         set { symbol2 = value.ToUpper(); }
    }

    Comment


      #3
      Thanks!

      That's what I needed.


      Being able to access an indicator from another panel would be nice, but a symbol will do for now.

      Thanks again.

      Matt

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      625 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      359 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      562 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      567 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X