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

How to read a number below or above a bar

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

    How to read a number below or above a bar

    I have a custom indicator developed by a vendor which sometimes plots a number in blue above or below the bar. I want to detect when the number is placed in blue and based on that I want to build a strategy. I am basically a Metatrader developer and have no idea how to detect and read this in NinjaTrader 8

    Can someone please help, is it possible?

    #2
    Hello abhay,

    Thanks for your post.

    Strategies typically reference data from indicators through plots that are added in the indicator with AddPlot(). The strategy can then reference these plots in their own logic. A plot will be a public Series<double> which would essentially be a series of values. There isn't a good way to check the brush color of a plot externally, so the best course of action would be if the strategy had a separate plot or a public Series<bool> that could tell you if that plot is one color or another.

    I'll include some information on plots, how they can be referenced in a strategy and how public variables can be used to expose values from an indicator and used in a strategy. I would suggest reaching out to the vendor directly to inquire if they have plots that you could use from the indicator, or if there is any other advice they can give for building strategies with their product.

    Demo - https://drive.google.com/file/d/1Qxn...w?usp=drivesdk

    AddPlot() - https://ninjatrader.com/support/help...s/?addplot.htm

    Exposing indicator values that aren't plots - https://ninjatrader.com/support/help...alues_that.htm

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Jim Thanks so much for some guidance. I see these are instructions on how to addPlot, but is there a way to readPlots. In Metatrader it is so easy to read any custom object created on the chart by just right clicking and you can see the name and values. In NinjaTrader I am struggling on how to see what are these plots created and their types or values.

      Unfortunately the vendor is Mike Valtos, he is soooo bad that he will almost never respond to any query. Even my indicator that I purchased and he somehow had an expiry date on it without telling me and he won't respond to remove that or answer in any way.

      Warning to everyone don't buy anything from Mike Valtos until you have a proof that he will respond to your queries.
      Last edited by abhay; 10-24-2018, 11:25 AM.

      Comment


        #4
        Hello abhay,

        In the demo I show how the MACD indicator's plots can be referenced. You can use the Strategy Builder to create a simple condition involving an indicator like the MACD where you can select one of several plots that the indicator has. After clicking View Code, you can see the resulting reference to that plot. After changing the plot in the Builder and clicking View Code again, you can see how another plot gets referenced. I would also suggest taking these steps with other indicators to get more familiar with how they can be used in strategies.

        The Builder is really a great tool for picking up NinjaScript syntax. I've included a link for the Strategy Builder 301 tutorial that provides further direction on using this tool.

        Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt90GAs9k

        Let me know if there is anything else I can assist with.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Today, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Started by olisav57, Today, 07:39 PM
        0 responses
        7 views
        0 likes
        Last Post olisav57  
        Started by trilliantrader, Today, 03:01 PM
        2 responses
        22 views
        0 likes
        Last Post helpwanted  
        Started by cre8able, Today, 07:24 PM
        0 responses
        10 views
        0 likes
        Last Post cre8able  
        Working...
        X