Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Run indicator on one instrument, and draw Global lines on another instrument.

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

    Run indicator on one instrument, and draw Global lines on another instrument.

    Hello, how are you, I need to make an indicator that, based on the parameters of an instrument, allows me to write in another instrument, for example a vertical line.


    For example, I want to place an indicator in the es, which with certain conditions marks a vertical line in the "ES", but also in the "NQ"

    if(---conditions of "ES"----){
    Draw.VerticalLine(this, Time[0].ToString()+ "taggreen", 0, true, "green"); // Global vertical line ES - ok

    Draw.VerticalLine(this, Time[0].ToString()+ "taggreen2", 0, true, "green2"); // Global vertical line NQ ??????????????

    }


    Thanks.

    #2
    Hello iradielt,

    Thank you for your post.

    In order to achieve this, you may add an NQ data series in your indicator with AddDataSeries():


    Then, you may work with your condition using ES as the primary series, then draw a vertical line. If you want to isolate any drawings to a particular instrument/data series, you could include the specific BarsInProgress as part of the condition. For more details regarding Multi-Time Frame & Instruments, please see the page below:


    Please let us know if we may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    51 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X