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 a second instrument value in chart as text

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

    Plot a second instrument value in chart as text

    I want to create an indicator that plots just the price of a second instrument in a chart. It could be as the Net Change indicator style. Any idea or example?

    Thanks

    #2
    Hello Impeesa,

    Thanks for your post.

    I'm not aware of an existing indicator that does that.

    You could use the Market analyzer to display the price of any number of instruments, however, this would be a separate window.

    If you would like to construct an indicator yourself, you would need to use the AddDataSeries() method for the added instrument: https://ninjatrader.com/support/help...dataseries.htm

    To display the text you would need to use Draw.TextFixed(): https://ninjatrader.com/support/help..._textfixed.htm

    If you would like this created for you, we can provide a link to 3rd party programmers available through the NinjaTrader Ecosystem.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Paul

      OK. I add instrument by AddDataSeries and I use Draw.TextFixed() but... where in the sintax I include last value of that instrument and how?

      Comment


        #4
        Hello Impeesa,

        Thanks for your reply.

        If you run the indicator with Calculate.OnPriceChange (or Calculate.OnEachTick) the Close[0] will be the current price of the forming bar, which is what you want.

        Here is a quick example of Draw.TextFixed: Draw.TextFixed(this, "tag1", Close[0].ToString(), TextPosition.TopRight);
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by slightly, Today, 12:49 AM
        0 responses
        2 views
        0 likes
        Last Post slightly  
        Started by sdauteuil, 09-23-2021, 10:16 AM
        4 responses
        1,208 views
        0 likes
        Last Post jacobpescaia44  
        Started by agclub, 04-21-2024, 08:57 PM
        5 responses
        34 views
        0 likes
        Last Post agclub
        by agclub
         
        Started by ESHunter, Yesterday, 08:06 PM
        2 responses
        18 views
        0 likes
        Last Post ESHunter  
        Started by ETFVoyageur, 05-07-2024, 07:05 PM
        19 responses
        151 views
        0 likes
        Last Post ETFVoyageur  
        Working...
        X