Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Mestor, 03-10-2023, 01:50 AM
    16 responses
    388 views
    0 likes
    Last Post z.franck  
    Started by rtwave, 04-12-2024, 09:30 AM
    4 responses
    31 views
    0 likes
    Last Post rtwave
    by rtwave
     
    Started by yertle, Yesterday, 08:38 AM
    7 responses
    29 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by bmartz, 03-12-2024, 06:12 AM
    2 responses
    22 views
    0 likes
    Last Post bmartz
    by bmartz
     
    Started by funk10101, Today, 12:02 AM
    0 responses
    7 views
    0 likes
    Last Post funk10101  
    Working...
    X