• 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

Drawing horizontal lines on multiple charts

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

    Drawing horizontal lines on multiple charts

    Hi there
    I presume this is the right place to make such a post and that if not someone will let me know thank you for that.
    My question is, is it feasible to do the following programatically.
    Create a hoz line on a given chart (call it the source chart) and give it a unique tag
    Copy/past/recreate/attach that line on all charts for the same pair with a timeframe the same or smaller TF than the source chart.
    For example I have a workspace with 9 tabs.
    Each tab have a chart of a forex pair say GBPUSD with a progressively smaller TZ starting at 1Month then 1W/1D/4H/1H/30m/15/5m/1m
    Let the 1H chart be the source chart.
    I create a hoz line on this 1H chart.
    I then the script to recreate/attach that hoz line on the 4 charts with smaller TF (30m/15m/5m/1m)

    There is a feature built in where a hoz line can be set to be drawn on all charts
    (Drawing Objects > Hoz Line Properties > General > Attach to > GBPUSD (All charts)

    So such a script would be a variation on this.
    I want a line to be attached to all charts with smaller TF than the original.
    Hope this makes sense.

    Can this be done within the NT8 development environment?

    Thank you for any replies

    #2
    Hello slouw,

    Thank you for your note.

    The ability to filter which charts will display a global drawing object is not supported but may be possible.

    A possible solution may be to create an indicator which will write to a file the price of a horizontal line that is drawn. Then in another indicator you could read this file, and if the file contains a horizontal line to draw and the charts current interval is greater than x value, draw a horizontal line on the at chart.

    I suggest seeing the following,
    https://ninjatrader.com/support/foru...d.php?p=546887

    And the following sample on reading from a file,
    https://ninjatrader.com/support/foru...ead.php?t=3476

    To pull a charts BarsPeriod value you could see,
    https://ninjatrader.com/support/help...barsperiod.htm

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by JohnAymin, Today, 02:38 PM
    0 responses
    3 views
    0 likes
    Last Post JohnAymin  
    Started by Rmos22, Today, 02:20 PM
    2 responses
    14 views
    0 likes
    Last Post Rmos22
    by Rmos22
     
    Started by sawtooth500, Today, 12:59 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_Spencer  
    Started by Steve L, Yesterday, 09:36 PM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by MichaelAlexander, 04-25-2017, 03:28 AM
    9 responses
    1,171 views
    0 likes
    Last Post dani neira  
    Working...
    X