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

DrawLine on 2nd Instrument not working

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

    DrawLine on 2nd Instrument not working

    I have a chart with 2 instruments, one scaled on the left and one scaled on the right.

    Is there a way to make the DrawLine method draw on a particular scale (Left, Right, Overlay)?
    It appears it cannot draw on the scale of the secondary instrument.

    I have attached an indicator that is meant to be used for a chart with 2 instruments where the primary instrument is scaled on the Left and the secondary instrument is scaled on the Right. The indicator currently defaults to "6B 06-12" for 2nd instrument and therefore assumes "6E 06-12" for primary instrument.

    The indicator draws a line from session open to current price for each instrument.
    On the call to DrawLine for Instrument 2, when the 2nd parameter is set to 'false,' the line does not show up on the chart (due to the price being our of range for the current scale of primary instrument).
    When I change the 2nd parm to 'true' the line shows up and scrunches the scaling.

    Is this a bug that will be fixed in the future or is this a permanent 'feature'?

    Regards,
    Gary

    p.s.
    I believe that this may be related to the following issue:
    Attached Files

    #2
    Hello Gary,
    The draw object will plot on the primary bar series only. This is by design.

    You may simplify your indicator (remove the secondary bar series etc) and simply can add it on the 2nd chart instead. Please refer to this video which demonstrates how to apply an indicator based on another bar series..



    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      What I would like to do requires access to both data series as well as being able to draw things on the appropriate scale.

      Comment


        #4
        Hello,

        I will have this added to our suggestion list.

        Thank You very much and happy trading.

        -Brett

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by PaulMohn, Today, 03:49 AM
        0 responses
        7 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        10 views
        0 likes
        Last Post rocketman7  
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        4 views
        0 likes
        Last Post dustydbayer  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        23 views
        0 likes
        Last Post trilliantrader  
        Working...
        X