Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot output dependend on Instrument

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

    Plot output dependend on Instrument

    I have an indicator the shows OHLC of a defined time range of yesterday in a default Chart template.

    I want to add this indicator to the Market Analyzer with different products that have different pit sessions. E.g. Gold and Oil.

    1) I could add multiple instruments, and then add the indicator several times to the strategy analyzer. Each time selecting a different plot.

    2) i would prefer to add the indicator only one time. Is it possible to let the indicator detect the instrument and then calculate a different routine

    if instrument = gold

    ...
    plot x

    else if instrument = oil

    ....
    plot x

    #2
    Hello markus1000,

    1. Yes, you may add the indicator multiple times and specify a plot at each different one.

    2. It would be but you would have to use the same plot but change the single plots value based on the Instrument. For example:

    if ( Instrument.MasterInstrument.Name == "GC" ) PlotA.Set( 5 );

    if ( Instrument.MasterInstrument.Name == "CL" ) PlotA.Set( 6 );
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    132 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    74 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    117 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    112 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    89 views
    0 likes
    Last Post CarlTrading  
    Working...
    X