Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Instrument Drawing Objects

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

    Multi Instrument Drawing Objects

    I have a TriangleUp and TriangleDown I'd like to draw based on several criteria. This is in an indicator that calls both the MNQ and the MES. When I have the indicator it plots at the correct time it just plots for the wrong instrument (at times). So while price of the MNQ is about 11000 right now, it is plotting some of the arrows at 3800 or so which is where the MES is currently. How do I change the TriangleUp/Down code to specify which instrument to base its output on?

    Code:
    Draw.TriangleUp(this,"Up1"+CurrentBar,true,0,Low[0]-15,Brushes.Green);
    This is my current code which has always worked in the past but isn't working with multi instrument code.

    Below is a picture of the arrow plotting well below price.


    #2
    Hi BReal, thanks for posting. The script should draw on the primary series, so first make sure you are calling Draw.TriangleUp() within:

    if(BarsInProgress == 0)
    {
    //here
    }

    Then all references to the singular Low[] price array will be in reference to the primary series. If you want to use data from the secondary series use Lows[1][0] instead.

    Kind regards,
    -ChrisL

    Comment


      #3
      Great thanks! This is my first foray into writing indicators for multiple instruments. Another tool in the bag.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      637 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
      569 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