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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    169 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    326 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    252 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    353 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    180 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X