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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    35 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    12 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X