• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

draw horizontal lines at values of an indicator

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

    draw horizontal lines at values of an indicator

    Hello, does anyone know how to build an indicator which draws for any given timeframe (also intraday) configurable horizontal lines at the values of any given indicator calculated for the monthly weekly and daily timeframes?
    For example if on an hourly chart we have 3 EMAs with periods, say 20; 50; 200, the indicator should draw on the chart nine horizontal lines at the values that such 3 EMAs would have when calculated for the daily, weekly and monthly timeframes. (…. ideally picking up the same format - line type, color, thickness – of the indicator)
    If such indicator already exists, could you please provide some directions on where to find it?
    Thanks. GT

    #2
    Hello guidoisot,

    Thank you for your note.

    I am unaware of an indicator which does this however I would suggest checking out the Indicator section of our forum.

    http://ninjatrader.com/support/forum...ks.php?catid=1

    To code this you would need to add a secondary data series of day/month, for which you’d pass to the EMA then set to the value of the plot. Please see MultiTime Frame section of our helpguide.

    http://ninjatrader.com/support/helpG...nstruments.htm

    I have put together a sample indicator which has two plots, 1 being set to the 5 period EMA of a daily data series and 1 to the 5 period EMA of the monthly data series.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Thank you Alan
      it looks like your sample indicator does not compile in NT8 (is it perhaps for ver.7 ?) I have tried to build it for ninjatrader 8, but I was not able to do it.
      I attach an image of what I have done.
      However before reading your email I noticed that there is a partially similar ninjatrader8 default indicator called "constant lines", maybe it is possible to derive what I am looking for from it.
      Another possible candidate to generate the indicator perhaps could be this one:

      http://ninjatrader.com/support/forum...1&d=1430675662

      Regards. GT
      Attached Files

      Comment


        #4
        Hello guidoisot,

        The indicator I provided was written in NT7, which is the version of NinjaTrader this forum post is in.

        I have converted it to NT8 for you and attached it.

        I’m not sure you would need the sample you linked to for what you’re looking to do, however the attached script will get you started.

        If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.

        A link to our Help Guide with tutorials can be found below:
        http://ninjatrader.com/support/helpG.../tutorials.htm

        The entire Alphabetical Reference can be found with the following link:
        http://ninjatrader.com/support/helpG..._reference.htm

        The best way to begin learning NinjaScript is to use the Strategy Wizard. With the Strategy Wizard you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.

        I'm also providing a link to a pre-recorded set of videos 'Strategy Wizard 301' and 'NinjaScript Editor 401' for you to view at your own convenience.

        Strategy Wizard 301 - https://www.youtube.com/watch?v=FmBi...56536A44DD7105
        NinjaScript Editor 401 - https://www.youtube.com/watch?v=K8v_...56536A44DD7105

        If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our help guide first:

        http://ninjatrader.com/support/helpG...g_concepts.htm

        I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

        You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:

        Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
        Click here to see our NinjaScript Tips: http://www.ninjatrader.com/support/f...ead.php?t=3229

        These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

        There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37

        You can also contact a professional NinjaScript Consultants or Educators who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like a list of professional NinjaScript Consultants or Educators who would be happy to create or modify any script at your request or assist you in learning NinjaScript.

        Please let me know if I may be of further assistance.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Grantx, Today, 08:22 AM
        0 responses
        1 view
        0 likes
        Last Post Grantx
        by Grantx
         
        Started by Swing123, Today, 08:21 AM
        0 responses
        1 view
        0 likes
        Last Post Swing123  
        Started by lunardiplomacy, Today, 07:57 AM
        0 responses
        3 views
        0 likes
        Last Post lunardiplomacy  
        Started by Tagliareni, Yesterday, 08:10 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by SDaCosta30, Today, 04:19 AM
        2 responses
        11 views
        0 likes
        Last Post SDaCosta30  
        Working...
        X